New IAX Trunk - Inbound Calls Failing

I am trying to set up an inbound IAX trunk but calls to it are failing (outbound is fine)

The details are:
OUTGOING

type=peer
context=iax
auth=md5
host=providerip
username=roebuck
secret=xxxxxx
trunk=yes

INCOMING
type=user
context=iax-inbound
auth=md5
host=providerip
username=roebuck
secret=xxxxxx
trunk=yes

The failure in the log file is:
[2014-06-20 10:23:19] ERROR[1937] chan_iax2.c: Call rejected, CallToken Support required. If unexpected, resolve by placing address {Provider IP} in the calltokenoptional list or setting user roebuck requirecalltoken=no

I have tried adding requirecalltoken=no to the bottom of the user details but then the calls still fail but there is nothing in the log.

Any advice?

Mark

http://www.voip-info.org/wiki/view/Asterisk+config+iax.conf

Thanks Alan.

I have read the ink off the page on that one, as far as I can see it is all set up correctly.

I suspect now its something to do with the inbound route. Do you know which config file I would find the following line in?

[iax-inbound]
exten => 742402,1,Dial(SIP/XXXXXX)

My provider is asking me to check it.

M

Most likely in one of the extension_* files.

grep -i 742402 /etc/asterisk/extension*

I find these lines in extensions_additional.conf

exten => 742402,1,Set(__FROM_DID=${EXTEN})
exten => 742402,n,Gosub(app-blacklist-check,s,1())
exten => 742402,n,Set(CDR(did)=${FROM_DID})
exten => 742402,n,ExecIf($[ “${CALLERID(name)}” = “” ] ?Set(CALLERID(name)=${CALLERID(num)}))
exten => 742402,n,Set(CHANNEL(musicclass)=default)
exten => 742402,n,Set(__MOHCLASS=default)
exten => 742402,n,Ringing()
exten => 742402,n,Set(__CALLINGPRES_SV=${CALLERPRES()})
exten => 742402,n,Set(CALLERPRES()=allowed_not_screened)
exten => 742402,n(dest-ext),Goto(timeconditions,1,1)

I don’t know much about how freepbx works but as the extensions.conf file is empty, it looks to me like it is rewriting it as extensions_additional.conf and changing things from the way my provider might expect.

The iax trunk refers to an inbound context of ‘iax-inbound’ and it appears that this context is not present in the extensions_additional.conf file - I am therefore wondering how I make the system accept these calls.

The inbound route is called iax-inbound and looks for a DID of 742402 - sending it directly to one of my time conditions.

Regards

Mark.

RESOLVED…

The context in the user details for the trunk should refer to the DID, see below. I am not sure if this will change for different systems, but the context can be found in the extensions_additional.conf file.

You also need to add the requirecalltoken=no

[username]
type=user
auth=md5
host=sip.aql.com
username=username
secret=password
trunk=yes
context=ext-did-0002
requirecalltoken=no

Regards

Mark.