[asterisk-dev] Attended transfers in queue_log

Mark Michelson mmichelson at digium.com
Thu Jun 12 17:07:53 CDT 2008


Atis Lezdins wrote:
> On Thu, Jun 12, 2008 at 7:47 PM, Mark Michelson <mmichelson at digium.com> wrote:
>> I just finished merging a change into the trunk branch which corrects a
>> long-standing deficiency of the queue_log: the inability to log attended transfers.
>>
>> A bit of background: prior to the merge, a blind transfer made by a queue member
>> would show up in the queue_log as a TRANSFER event. Attended transfers, however,
>> due to the limitations of what information was available to app_queue, did not
>> log a TRANSFER event. Instead, they appeared as a COMPLETECALLER event. With the
>> recent addition of a "fixup" phase to datastores during channel masquerades, I
>> realized that this could facilitate a means by which to correctly log an
>> attended transfer in the queue_log. Yesterday, I created a branch to make this a
>> reality and this morning I merged the branch into trunk.
>>
>> Now the question arises: should this change also be merged into 1.4? My thinking
>> is that the majority of users would be very happy to see attended transfers
>> properly logged in the queue_log. The big thing holding me back right now is
>> that there are many third-party applications that use the data in the queue_log
>> to generate statistics. While I don't know of the specifics of these
>> applications' internals, I know that any sort of change to what is expected may
>> cause problems. To any who have written such apps, would such a change cause a
>> problem? Would it actually be helpful? Thanks in advance for your replies.
> 
> Hello,
> 
> Just saw the commit. No opinion upon merging in 1.4 (however this
> sounds like a feature).
> 
> I just wanted to add, that maybe it would be better to somehow
> separate blind and attended transfers. Btw, from my understanding of
> code, queue log entry will have duration until completion  of attended
> transfer, wouldn't it be better to use duration until start of
> attended transfer? Or just log both, that way it would be distinct
> from blind transfer.
> 
> Regards,
> Atis

It would be trivial to change the names of the TRANSFER messages in the log to 
TRANSFER(BLIND) and TRANSFER(ATTENDED) or something similar in trunk. If I were 
to backport this to 1.4 though, I would not add the clarification due to the 
third party tools which use the queue_log as their input source.

Regarding the logging of various times, that will be very cumbersome to try to 
implement. The problem at the root of it all is that app_queue loses complete 
control of the thread once the queue caller and the queue member are bridged. 
This means that getting information back to app_queue about things like when the 
queue member initiated the transfer is next to impossible. It may be possible to 
implement a datastore on the queue member's channel, but the problem is that the 
datastore would have to be globally accessible since it may need to be accessed 
by any of the files that implement transfer code as well as app_queue. 
Furthermore, getting the time correct may be tricky if the queue member attempts 
a transfer but fails. Also, if local channels are used for queue members, then 
that opens a new can of worms regarding where the datastore resides.

Separating the times is certainly possible, but unless it is absolutely 
necessary, the effort and potential nastiness that may result is not worth it in 
my view.

Mark Michelson



More information about the asterisk-dev mailing list