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

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Tue Aug 8 06:30:35 MST 2006


On Monday 07 August 2006 16:02, Douglas Garstang wrote:
> UA-A ---> Asterisk-1 ---> IAX2 ---> Asterisk-2 ---> UA-B

> The call from Asterisk-2 to UA-B has to be a SIP call, because UA-B only
> talks SIP. It doesn't know anything about IAX2. I ABSOLUTELY do care about
> the other side, because when Asterisk-2 calls my AGI script that dials
> UA-B, it sets agi_type to IAX2, not SIP. If that UA-B transfers or forwards
> a call, and sends a 'Moved Temporarily' SIP message back to Asterisk-2,
> Asterisk-2 re-enters the dial plan again with agi_type set to IAX2 again,
> not SIP. Because the type is IAX2, we've lost our rdnis value which is
> essential for forwarding calls, and we've lost dnid which is essential for
> transferring calls.

From Asterisk-2's point of view, the call is both IAX2 and SIP; unless you're 
leaving something out (I did see your other message), the call is BOTH IAX2 
*AND* SIP, and "what technology" the call is depends on how you look at it.  
This appears to be an issue outside of Asterisk because as Kevin said, 
Asterisk doesn't "flag" calls as being of one technology or another.  Indeed 
it makes no sense to do that from Asterisk's point of view, as it can be 
bridging between two or even more channel technologies.

I am guessing Asterisk is setting the call_type to IAX2 because the source of 
the call *is* IAX2, but that is only a guess.

It really does appear that your own scripting needs to be smarter, perhaps 
even so much so that you need to specifically set some dialplan variables 
before the AGI is called, and maybe even include some smarts to prevent it 
from looping calls when you receive the temporary failure messages.

> Well, that seems to be the problem. IAX, from what I understood was
> supposed to be exactly designed for this kind of thing. As soon as I
> changed to SIP between the Asterisk boxes, these problems went away.

I really do fail to see this as an IAX2 issue... Asterisk will have the same 
trouble routing a call using any two different technologies.  You can't have 
Asterisk drop out of the loop if it has to bridge two different 
technologies...  That's like saying you want to drive from New York to 
London, but you refuse to accept that the ocean liner you drive your car on 
to must be there for the trip across the ocean...  or something.  :-)

-A.



More information about the asterisk-dev mailing list