[asterisk-users] CHANNEL(aor) CHANNEL(contact) return nothing

Joshua Colp jcolp at digium.com
Wed May 20 11:45:50 CDT 2015

Jean-Denis Girard wrote:
> Hash: SHA1
> Le 20/05/2015 00:50, Joshua Colp a écrit :
>> It looks like this is an incoming leg, in which case that information
>> isn't available. There is no association of an AOR and Contact on
>> incoming legs (it MAY be possible to deduce but it certainly wouldn't
>> work in all cases). Since you specify one explicitly on outgoing, that
> 's
>> when it is available.
> When you say it may be possible, could you be more specific: is there
> another dialplan function / application to use ?

The code to do it doesn't directly exist. The trouble is that on an 
incoming call the only thing you have to absolutely bind the session to 
the device is the endpoint (since it was identified against it). In the 
case of a contact and AOR you MAY be able to deduce it by looking at the 
Contact flowing across the dialog. This won't always work though since 
they may not match, and sometimes you have to ignore parts of the URI to 
make a loose match.

Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

More information about the asterisk-users mailing list