[asterisk-users] Best way to know a call is being transfered

Marcelo Terres mhterres at gmail.com
Mon May 29 07:22:42 CDT 2017


Unfortunately, the transfer AMI events were introduced just in Asterisk13.

But, you can set the __TRANSFER_CONTEXT variable and probably the
__GOTO_ON_BLINDXFR (this one I never used) to control the transfer in
your own way.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables

Regards,
Marcelo H. Terres <mhterres at gmail.com>
IM: mhterres at jabber.mundoopensource.com.br
https://www.mundoopensource.com.br
https://twitter.com/mhterres
https://linkedin.com/in/marceloterres


On 29 May 2017 at 10:06, Jonas Kellens <jonas.kellens at telenet.be> wrote:
> Hello
>
> thank you for your answer.
>
> However this does not help me to know when a call is being transfered.
>
> My question is simple : if A calls B, and then B tranfers (unattened or
> attended) the call to C, how can I know this happens ?? I see it happening
> on the CLI, but how can I "catch" this, for example in the dialplan logic ?
> Or through AMI perhaps ?
>
>
>
> Kind regards.
>
> J.
>
>
>
> Op 29-05-17 om 10:16 schreef Jonathan H:
>
>> Well, once you've upgraded to a version of Asterisk which didn't
>> become "EOL - DO NOT USE - NO FIXES" (!) almost 2 years ago, then you
>> might be able use logging which was introduced 5 years ago in Asterisk
>> 11. Although the "transfers" section in the info below says it "can be
>> a little tricky...". Read on!
>>
>> https://wiki.asterisk.org/wiki/display/AST/Call+Identifier+Logging
>>
>> ------------------------------------
>>
>> Call ID Logging (which has nothing to do with caller ID) is a new
>> feature of Asterisk 11 intended to help administrators and support
>> givers to more quickly understand problems that occur during the
>> course of calls. Channels are now bound to call identifiers which can
>> be shared among a number of channels, threads, and other consumers.
>>
>> Transfers
>>
>> Transfers can be a little tricky to follow with the call ID logging
>> feature. As a general rule, an attended transfer will always result in
>> a new call ID being made because a separate call must occur between
>> the party that initiates the transfer and whatever extension is going
>> to receive it. Once the attended transfer is completed, the channel
>> that was transferred will use the Call ID created when the transferrer
>> called the recipient.
>>
>> Blind transfers are slightly more variable. If a SIP peer 'peer1'
>> calls another SIP peer 'peer2' via the dial application and peer2
>> blind transfers peer1 elsewhere, the call ID will persist. If on the
>> other hand, peer1 blind transfers peer2 at this point a new call ID
>> will be created. When peer1 transfers peer2, peer2 has a new channel
>> created which enters the PBX for the first time, so it creates a new
>> call ID. When peer1 is transferred, it simply resumes running PBX, so
>> the call is still considered the same call. By setting the debug level
>> to 3 for the channel internal API (channel_internal_api.c), all call
>> ID settings for every channel will be logged and this may be able to
>> help when trying to keep track of calls through multiple transfers.
>>
>>
>> On 29 May 2017 at 08:17, Jonas Kellens <jonas.kellens at telenet.be> wrote:
>>>
>>> Hello
>>>
>>> using Asterisk 1.8.32.3.
>>>
>>> What is the best way of knowing a call is being transfered (attended and
>>> unattended) ? And also knowing whereto (sip user) the call is being
>>> transfered and who is the transferer ?
>>>
>>> So I can log this information.
>>>
>>>
>>>
>>> Kind regards.
>>>
>>> J.
>>>
>>>
>>> --
>>> _____________________________________________________________________
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> Check out the new Asterisk community forum at:
>>> https://community.asterisk.org/
>>>
>>> New to Asterisk? Start here:
>>>        https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>     http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>      https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list