I am having a problem where an inbound call to a SIP ATA is not routing to the defined context.
The set up is:
SIP based ATA
Asterisk 1.2.5
SIP based phone
I place a call from the PSTN the SIP ATA answers and then routes the call to the context defined in the general section and not the context defined for the device. If I remove the context definition in the General section then the Asterisk tries to route the call to the default context and not the one defined for the device.
The inbound device in question is
[Excel_Max_1]
This should deliver the calls to the context [excel_max_inbound]
It actually delivers the call to [nact_utah]
The config files are as follows: (I striped all but the basic config out for testing)
sip.conf
[general]
bindaddr = 0.0.0.0
port = 5060
context = nact_utah
disallow = all
allow = ulaw
allow = alaw
allow = g729
allow = gsm
bindport = 5060 ; Port to listen on
[1002]
type = peer
host = dynamic
username = 1002
secret = 1002
mailbox = 1002@nact_utah
callerid = "Bob Jones" <8018021461>
[1461]
type = peer
host = dynamic
username = 1461
secret = 1461
mailbox = 1461@nact_utah
callerid = <1461>
[1003]
type = friend
host = dynamic
username = 1003
secret = 1003
mailbox = 1003@nact_utah
callerid = "Jane Smith" <8018021460>
[1001]
type = peer
host = dynamic
username = 1001
secret = 1001
mailbox = 1001@nact_utah
callerid = "Bob Smith" <1001>
[Excel_Max_1]
type = friend
host = xxx.xxx.xxx.xxx
context = excel_max_inbound
[1000]
type = peer
host = dynamic
username = 1000
secret = 1000
mailbox = 1000@nact_utah
callerid = "Bob Jones" <1000>
[scott_test]
type = friend
host = dynamic
username = scott_test
secret = scott_test
callerid = 8018021415
nat = yes
extensions.conf
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
[globals]
CONSOLE=Console/dsp
IAXINFO=guest
LD_TRUNK=SIP/Excel_Max_1
TRUNK=SIP/Excel_Max_1
RING_STD=20
RING_EXTENDED=35
EXT_OPTIONS=Ttr
[tollfree]
; Long distance context accessed through trunk interface
exten => _1800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:0})
exten => _1888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:0})
exten => _1877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:0})
exten => _1866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:0})
[North_American]
exten => _1NXXNXXXXXX,1,Dial(${TRUNK}/${EXTEN:0})
[International]
exten => _011.,1,Dial(${TRUNK}/${EXTEN:0})
[incoming]
exten => s,1,Answer
exten => s,n,Goto(1003,1)
[excel_max_inbound]
;include => nact_utah
;exten => _X.,1,Answer
;exten => _X.,n,Goto(nact_utah,1461,1)
exten => 8018021461,1,Answer
exten => 8018021461,n,Goto(1461,1)
[nact_utah]
include => tollfree
include => North_American
include => International
;include => excel_max_inbound
exten => 1461,1,Dial(SIP/1461,${RING_STD},${EXT_OPTIONS})
exten => 1461,n,Voicemail(u1461)
exten => 1461,n,Voicemail(b1461)
exten => 1000,1,Dial(SIP/1000,${RING_STD},${EXT_OPTIONS})
exten => 1000,n,Voicemail(u1000)
exten => 1000,n,Voicemail(b1000)
exten => 1001,1,Dial(SIP/1001,${RING_STD},${EXT_OPTIONS})
exten => 1001,n,Voicemail(u1001)
exten => 1001,n,Voicemail(b1001)
exten => 1002,1,Dial(SIP/1002,${RING_STD},${EXT_OPTIONS})
exten => 1002,n,Voicemail(u1002)
exten => 1002,n,Voicemail(b1002)
exten => 1003,1,Dial(SIP/1003,${RING_STD},${EXT_OPTIONS})
exten => 1003,n,Voicemail(u1003)
exten => 1003,n,Voicemail(b1003)
exten => 1010,1,Dial(IAX2/scott_test,${RING_STD},${EXT_OPTIONS})
exten => 1010,n,Voicemail(u1010)
exten => 1010,n,Voicemail(b1010)
exten => 1011,1,Dial(SIP/scott_test,${RING_STD},${EXT_OPTIONS})
exten => 1011,n,Voicemail(u1010)
exten => 1011,n,Voicemail(b1010)
; Voicemail access extension
exten => 6000,1,VoicemailMain
exten => 6000,2,Hangup
; Conference rooms
exten => 2000,1,Meetme(2000|Mc)
The debug from the call is:
Sending to 208.187.44.30 : 5060 (non-NAT)
Found RTP audio format 0
Peer audio RTP is at port 208.187.44.31:13000
Capabilities: us - 0x10e (gsm|ulaw|alaw|g729), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
Looking for 8018021461 in nact_utah (domain 208.187.44.53)
Reliably Transmitting (no NAT) to 208.187.44.30:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 208.187.44.30;received=208.187.44.30
From: 00000000<sip:00000000@208.187.44.30:5060>;tag=1719700115f63
To: 8018021461<sip:8018021461@208.187.44.53:5060>;tag=as7e75be68
Call-ID: EXCEL-CSP255.6b7.89955.690@208.187.44.30
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:8018021461@208.187.44.53>
Content-Length: 0
---
Destroying call 'EXCEL-CSP255.6b7.89955.690@208.187.44.30'
Sending to 208.187.44.30 : 5060 (non-NAT)
Found RTP audio format 0
Peer audio RTP is at port 208.187.44.31:12996
Capabilities: us - 0x10e (gsm|ulaw|alaw|g729), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
Looking for 8018021461 in nact_utah (domain 208.187.44.53)
Reliably Transmitting (no NAT) to 208.187.44.30:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 208.187.44.30;received=208.187.44.30
From: 00000000<sip:00000000@208.187.44.30:5060>;tag=1711872615f63
To: 8018021461<sip:8018021461@208.187.44.53:5060>;tag=as648d74fc
Call-ID: EXCEL-CSP255.6af.89955.740@208.187.44.30
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:8018021461@208.187.44.53>
Content-Length: 0
---
Destroying call 'EXCEL-CSP255.6af.89955.740@208.187.44.30'
Sending to 208.187.44.30 : 5060 (non-NAT)
Found RTP audio format 0
Peer audio RTP is at port 208.187.44.31:12992
Capabilities: us - 0x10e (gsm|ulaw|alaw|g729), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
Looking for 8018021461 in nact_utah (domain 208.187.44.53)
Reliably Transmitting (no NAT) to 208.187.44.30:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 208.187.44.30;received=208.187.44.30
From: 00000000<sip:00000000@208.187.44.30:5060>;tag=1703662815f63
To: 8018021461<sip:8018021461@208.187.44.53:5060>;tag=as6e65e179
Call-ID: EXCEL-CSP255.6a7.89955.790@208.187.44.30
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:8018021461@208.187.44.53>
Content-Length: 0
---
Destroying call 'EXCEL-CSP255.6a7.89955.790@208.187.44.30'
Sending to 208.187.44.30 : 5060 (non-NAT)
Found RTP audio format 0
Peer audio RTP is at port 208.187.44.31:12988
Capabilities: us - 0x10e (gsm|ulaw|alaw|g729), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
Looking for 8018021461 in nact_utah (domain 208.187.44.53)
Reliably Transmitting (no NAT) to 208.187.44.30:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 208.187.44.30;received=208.187.44.30
From: 00000000<sip:00000000@208.187.44.30:5060>;tag=1663969915f63
To: 8018021461<sip:8018021461@208.187.44.53:5060>;tag=as200f50c4
Call-ID: EXCEL-CSP255.67f.89955.870@208.187.44.30
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:8018021461@208.187.44.53>
Content-Length: 0
---
Destroying call 'EXCEL-CSP255.67f.89955.870@208.187.44.30'