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

Douglas Garstang dgarstang at oneeighty.com
Thu Aug 3 15:05:54 MST 2006


> -----Original Message-----
> From: Douglas Garstang 
> Sent: Thursday, August 03, 2006 12:45 PM
> To: Asterisk Developers Mailing List
> Subject: RE: [asterisk-dev] 'IAX2 call variable passing 
> between servers
> '
> 
> 
> > -----Original Message-----
> > From: Kevin P. Fleming [mailto:kpfleming at digium.com]
> > Sent: Thursday, August 03, 2006 12:29 PM
> > To: Asterisk Developers Mailing List
> > Subject: Re: [asterisk-dev] 'IAX2 call variable passing 
> > between servers
> > '
> > 
> > 
> > ----- Douglas Garstang <dgarstang at oneeighty.com> wrote:
> > > > CDR(ACCOUNTCODE) on the receiving server. The value that was 
> > > > in CDR(ACCOUNTCODE) on the sending server is never 
> > > > transferred and will not be visible on the receiving server.
> > > 
> > > So... are you saying that CDR's are passed through IAX2?
> > > I inspected the value of ${CDR(accountcode)} at the 
> remote Asterisk
> > > system, but still got 'default'
> > 
> > Did you read the last three lines of the quoted text?
> 
> Realised after my post that I'd misread it. 
> 
> We need to pass variables through IAX2. If user A calls user 
> B, and user B is on a different Asterisk system, when the 
> second Asterisk system receives the call, the accountcode, 
> dnid, rdnis etc are completely gone. 
> 
> Also, If user B, who is on a SIP phone, transfers or forwards 
> a call at that point, when Asterisk re-enters the dial plan 
> to process the transfered/forwarded call, it does so with a 
> type of IAX2 still, not 'Local' or SIP. It appears as if the 
> initial trunk is overriding in some way all subsequent calls 
> that the second Asterisk system processes, and it doesn't 
> matter what protocol we're using, we are limited by IAX2. 
> 
> For example, when user B forwards a call, the rdnis variable 
> is set. If the phone is communicating with Asterisk via SIP, 
> and Asterisk executes an AGI script, the rdnis variable is 
> passed to it, and the call type is 'SIP. However, in the case 
> where user B is on a second Asterisk system and forwards a 
> call, rdnis us 'unknown' and the call type is 'IAX2', 
> eventhough it's a SIP call! This is really breaking things.

So, to anyone that cares...

I switched over and used SIP to trunk calls between Asterisk boxes. After doing this, this problem I described above went away. When user B on Asterisk B forwards or transfers his calls, Asterisk #2 calls the AGI script again with rdnis, dnid and so on set accordingly. I can also pass the accountcode in an extra SIP header.

As someone who I was explaining this to pointed out to me, IAX = Inter Asterisk Exchange. This is exactly the kind of thing that IAX was designed for, and SIP seems to handle it better. Maybe someone needs to re-evaulate the relevancy of IAX2.

Doug.







More information about the asterisk-dev mailing list