Home Forum Developers IP0x problem with IAX2 trunk - can't receive inbound calls

JRPassphrase Registration Control

In order to register on this site, you must first submit the passphrase below.

TODO list for each hardware target can be found as sticky topic in the corresponding forum


luckman212
useravatar
User Info

problem with IAX2 trunk - can't receive inbound calls

Hi all,
I am having a problem with inbound calls on my IAX2 trunk.  I have an IAX2 trunk set up with newyork.voip.ms (74.63.41.218)
They "hit" my PBX but are unable to establish.
I get the following error logged to my asterisk CLI:

Code:

[Jul 12 18:26:42] ERROR[326]: chan_iax2.c:4323 handle_call_token: Call rejected, CallToken Support required. If unexpected, resolve by placing address 74.63.41.218 in the calltokenoptional list or setting user voipms requirecalltoken=no

Hmm I thought, OK let me try to add those criteria. 
So I added the following changes:

iax.conf

Code:

[general]

calltokenoptional = 74.63.41.218

users.conf

Code:

[123456]                    <=== this is just an example

context = DID_123456
host = newyork.voip.ms
username = 123456
secret = xxxxxx
insecure = very
requirecalltoken = no       <=== added this line
trunkname = voipms
hasiax = yes
registeriax = yes
hassip = no
registersip = no
trunkstyle = voip
hasexten = no
contact =
qualify = 10000
disallow = all
allow = g729,ulaw,gsm

It still doesn't work even after rebooting the pbx.  I get the exact same error.  Is asterisk ignoring those settings maybe?  More general question:  where should the IAX trunks be defined?  because in many asterisk guides it seems like they are in iax.conf but switchfin seems to put them in users.conf -- is this "right" ?  (I'm running asterisk 1.4 compiled from svn 278)

thanks for any advice on this!!
oh and P.S.- yes I can make outbound calls over that trunk.  it shows up "green" in the GUI as well...
http://i.imgur.com/msQW1.png


Administrator has disabled public posting
luckman212
useravatar
User Info

Re: problem with IAX2 trunk - can't receive inbound calls

Adding some more info:

I tried 'iax2 set debug' to enable IAX2 debugging, and here is the console output when I make an inbound call (I changed some of the numbers for privacy)

Code:

IP04*CLI> iax2 set debug

IAX2 Debugging Enabled
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW   
   Timestamp: 00001ms  SCall: 05469  DCall: 00000 [74.63.41.218:4569]
   VERSION         : 2
   CALLED NUMBER   : 6465551212
   CODEC_PREFS     : (ulaw|g729|gsm)
   CALLING NUMBER  : 2124567890
   CALLING PRESNTN : 0
   CALLING TYPEOFN : 0
   CALLING TRANSIT : 0
   CALLING NAME    : SMITH JOHN
   LANGUAGE        : en
   USERNAME        : voipms
   FORMAT          : 4
   CAPABILITY      : 57606
   ADSICPE         : 2
   DATE TIME       : 2010-07-14  02:10:44

Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: AUTHREQ
   Timestamp: 00002ms  SCall: 00130  DCall: 05469 [74.63.41.218:4569]
   AUTHMETHODS     : 3
   CHALLENGE       : 894062272
   USERNAME        : voipms

Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: AUTHREP
   Timestamp: 00008ms  SCall: 05469  DCall: 00130 [74.63.41.218:4569]
   MD5 RESULT      : 1bbf10e59dd51e04baa5130905ab8e88

Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: ACK   
   Timestamp: 00008ms  SCall: 00130  DCall: 05469 [74.63.41.218:4569]
Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: REJECT
   Timestamp: 00008ms  SCall: 00130  DCall: 05469 [74.63.41.218:4569]
   CAUSE           : No authority found
   CAUSE CODE      : 50

does this help in the diagnosis at all?  I am stumped here..... like I said I can make outbound calls no problem on this trunk!


Administrator has disabled public posting
luckman212
useravatar
User Info

Re: problem with IAX2 trunk - can't receive inbound calls

more information, after reviewing this page:
http://www.voip-info.org/wiki/view/Aste … rity+found

edit:
here is another interesting/relevant page
http://www.voip-info.org/wiki/view/Aste … entication

They say you NEED the trunk (user) name to match what is sent in the inbound IAX2 message.  so I changed the IAX2 trunk context name from the numeric [123456] format which was assigned by switchfin GUI to [voipms] which is the username sent 'to' by the provider (you can see from the above logs).

I had to manually edit the users.conf and extensions.conf heavily to change them in all the various contexts but after saving and rebooting my pbx, now I am getting a different error:

Code:

Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: REJECT 

   Timestamp: 00012ms  SCall: 00687  DCall: 07703 [74.63.41.218:4569]
   CAUSE           : No such context/extension
   CAUSE CODE      : 3

I think I am making progress with this issue but because my knowledge is so limited It is taking me a lot longer than it should.  If anyone has any advice I would love to hear!


Administrator has disabled public posting
Albi90
useravatar
User Info

Re: problem with IAX2 trunk - can't receive inbound calls

mmmm looks a little bit strange i would have thought that it would match the context based on IP/Port like SIP or if it is based on your context name then by the CALLED NUMBER which i presume is your username.

Sorry Luke i have no experience with IAX but seems strange to try and match on "voipms".

If you find out why let us know we should be able to make it easier to set up in the GUI 4.0.


Administrator has disabled public posting
luckman212
useravatar
User Info

Re: problem with IAX2 trunk - can't receive inbound calls

I am going to try to ask their support staff about this.  I agree that matching on the 'voipms' seems odd.  Especially if you have multiple trunks from the same provider-  how could the PBX determine how to route the calls?  Voip.ms is a very large & quite popular trunk provider so I am surprised that this is how it is set up.  Let me ask them and I will report back.  thanks.


Administrator has disabled public posting
luckman212
useravatar
User Info

Re: problem with IAX2 trunk - can't receive inbound calls

Hi guys, well after speaking a lot with this provider, they recommended deleting IAX2 trunk and registering via SIP protocol.  Since doing this, all problems are solved.   So I guess IAX2 is better for linking 2 asterisk pbx together but maybe not so good for trunk itself.  Anyway, thank you and this turns out to be limitation of IAX2 and nothing switchfin's fault. smile


Administrator has disabled public posting
arturoportilla
useravatar
User Info

Re: problem with IAX2 trunk - can't receive inbound calls

for you Albi90 here is the soluiton:
Now Using File Editor:

if the call is guest, ( NO-AUTHENTICATED ) then.

iax.conf
[general]
calltokenoptional=192.168.1.150/255.255.255.255
...
...
...


---  OR  ---

iax.conf
[guest]
requirecalltoken=no
...
...
...

Both Work for me.  and i think the GUI 4.0 must be fixed, if it is desired

i think if the call is registered (Aka AUTHENTICATED)
will no need IP Verification.

The GUI 4.0 need to allow registration. so may be this will no be a problem again.
same in SIP or IAX


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 2587  Total Topics: 299  Total Polls: 1  Total Posts: 1727  Dormant
User Info:   Newest User :  user2553   Members Online: 0   Guests Online: 300
Online  There are no members online
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked