[Asterisk-Users] Strange IAX behaviors

Brian Cuthie brian at systemix.com
Sun Apr 25 13:09:05 MST 2004


I've been setting up a couple of * boxes with IAX trunking between 
them.  But I've been seeing some strange IAX behavior.  Asterisk version 
is latest CVS-04/21/04-18:10:19.

Here's what I'm doing: the boxes are peers, and I have setup my iax.conf 
file to look something like this:

<< machine1 >>

[iaxuser]
type=friend
username=iaxuser
secret=foo
auth=md5
context=iaxuser-incoming
host=machine2

<< machine2 >>

[iaxuser]
type=friend
username=iaxuser
secret=foo
auth=md5
context=iaxuser-incoming
host=machine1

Now where things get weird is when I put the following line in the 
extensions.conf file of machine1

switch => IAX2/iaxuser

authentication fails during dialing when machine2 sends the challenge 
for authentication. The reason is that the username sent with the 
challenge isn't the one defined for iaxuser.

Now, interestingly, if I change the switch line to include the user name

switch => IAX2/iaxuser at iaxuser

things work great! 

Anybody have any idea what's happening here? Is this a bug? I would 
think that the username would be implied by the definition for the 
connection (as it seems to be for Dial(IAX2/iaxuser/${EXTEN})).

Another interesting thing that I've seen is that if a call comes in 
through an IAX connection and then tries to do a remote diaplan 
translation using 'switch', it seems to fail with a message stating that 
there's no 'xxxx at incoming-context' (where xxxx is the number to match, 
and 'incoming-context' is the context defined for calls from my IAX 
provider). I've triple checked the dialplan, and I'm convinced it's not 
the problem. Changing the incoming-context to use 
Dial(IAX2/iaxuser/xxxx) works fine (notice that I don't need to 
explicitly define the username here as I did with the 'switch' parameter).

Cheers,

Brian



More information about the asterisk-users mailing list