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

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Fri Aug 11 10:36:34 MST 2006


On Friday 11 August 2006 13:03, Douglas Garstang wrote:
> Ah that reminds me. I absolutely disagreed with your statements about
> Asterisk not re-entering the dialplan. It does... you can see it on the
> console.

No, he's saying it *does* re-enter the dialplan; that's all it can do...

Box-A gets a call from a SIP peer.  Box-A sets the channel type to SIP.

Box-A's dialplan sends to call to an IAX2 peer, Box-B, who accepts it.  Box-A 
now has two call legs:  one from the sipphone to Box-A of type SIP, and one 
from Box-A to Box-B of type IAX2.  The complete call itself is now of a 
mixed-type (SIP and IAX2).

Box-B has a call from Box-A, an IAX2 peer.  This leg is by definition an IAX2 
call type.

Box-B has no idea that the call originated from a sip phone.  It doesn't need 
to.  It has an audio and control stream of type IAX2 from Box-A.

Box-B tries to dial a SIP peer.  The peer fails to answer or responds with a 
"fuck off, I'm busy" code.

Box-B *STILL* has only one call leg; it is a call from an IAX2 peer.  The SIP 
leg was never completed, so why should it be of type SIP now?

If you want Box-B to know the details about Box-A's relationship with the 
other leg of the call, you need to make Box-A push that information (make it 
available) via IAXVAR() so that Box-B can extract it.

You want the variables ${RDNIS} and ${DNID} to be set correctly on Box-B from 
Box-A's data.  Since Box-A is the one originating the call, I would tend to 
agree with you on this, since this is precisely how normal Telephony switches 
work.  However, Tilghman's patch provides a workaround until such a time as 
you can correct this bug (IMO yes it's a bug).

However, I suggest right now to use the workaround, pick your battles and 
start an ENTIRELY NEW bug/thread regarding how IAX2 does not correctly pass 
over standard telephony-related variables as it should.

If I'm missing something please don't hesitate to let me know, but I really 
think this whole matter of not getting arbitrary variable data from Box-A to 
Box-B through IAX2 is solved, and solved rather nicely.

-A.



More information about the asterisk-dev mailing list