[asterisk-dev] 'IAX2 call variable passing between servers '

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Mon Aug 14 12:38:55 MST 2006


On Monday 14 August 2006 13:44, Douglas Garstang wrote:
> The problem is coming up when Asterisk tries to make a new call to the
> destination that SIP/foo recommends. Because the type of the call is IAX,
> no rdnis is set, eventhough the phone on pbxB has forwarded the call.

It's time for me to eat some crow here.  I was under the impression that 
Asterisk wouldn't jump back into the dialplan on a 302, but it does indeed do 
this.  So, if pbxA calls in to pbxB's [ooga] context, and pbxB calls SIP/foo 
but gets a 302 to SIP/bar, pbxB will do the equivalent of Goto(ooga,bar,1).

The exception to this is if the Dial() 'i' flag is used.  In that case, Dial() 
will quit with a BUSY ${DIALSTATUS}, and ${CALLERID(DNID)} will show the 
original extension.  I have not, however, found a variable that tells me what 
the SIP phone has suggested for a redirection.  ${CALLERID(RDNIS)} does *not* 
contain this information, and in my testing this is all SIP-to-SIP, no IAX2 
at all.

Again: this is not an IAX2 issue; this is a chan_sip issue.

This does appear to be a bug, although a corner-case one.  I've filed it as 
bug 7729.  Joshua is helping me write a patch to fix this so that DNID 
contains the correct number to call (from the 302 Contact header) and RDNIS 
the correct redirecting number (from the Diversion header).

-A.



More information about the asterisk-dev mailing list