[asterisk-users] IAX Variables

Douglas Garstang dgarstang at oneeighty.com
Thu Aug 3 10:05:27 MST 2006


> -----Original Message-----
> From: Douglas Garstang 
> Sent: Thursday, August 03, 2006 10:30 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [asterisk-users] IAX Variables
> 
> 
> I'm a little confused about something. If IAX2 doesn't 
> support passing variables like the accountcode for example, 
> between Asterisk servers, why do all the examples have it 
> defined in iax.conf? If the protocol doesn't support it, then 
> why have it set for an IAX user agent?

Now I'm even more confused! I installed an IAX soft phone on my desktop. I set the accountcode in iax.conf for the user, along with all the usual settings. extensions.conf has:

exten => 124,1,Answer
exten => 124,2,Wait,1
exten => 124,3,NoOp(${ACCOUNTCODE})

I dial 124, and voila... there's the account code for this user on the screen. 

So then, I went to my destination Asterisk peer, and in my context where calls to this peer originate/terminate (as defined by DUNDi) put:

exten => _X.,2,                     NoOp(ACCOUNTCODE is ${ACCOUNTCODE})
exten => _X.,3,                     AGI(ipt/terminator.py)

... and guess what, the accountcode is set to 'default'.

So, I'll ask again. If variables like the account code can be set for an IAX user agent, and passed from Asterisk to the dial plan, why can't they be passed with IAX from one Asterisk system to another? Makes no sense to me. I must be missing something.

Also, if the account code IS being passed, the output from 'iax2 debug' on the console doesn't show this variable at all during call setup. Why doesn't an iax2 debug show ALL variables, and only a small subset of them?

Doug.



More information about the asterisk-users mailing list