Inbound call routing by FXO lines with linksys spa400 problem?

As my title.
I have asterisk now 3.0 with ip address 192.168.100.249
and SPA400 with 4FXO lines,
named as my fxo pstn numbers:83361111 83362222 83363333 83364444
IP address 192.168.100.253

I set a virtual exten 9000 for IVR on asterisk
a trunk named spa400


type=peer
user=9000
host=192.168.100.253
dtmfmode=rfc2833
canreinvite=no
context=from-trunk
insecure=very


I don’t set any inbound route,and I can get inbound and outbound calls without any problem.

But,now I need to route inbound calls by pstn line numbers.
for example:how could I use 83364444 to route my inbound call to a extension No. 114?
Thanks a lot,everyone.

When I use a foreign cellphone to call 83364444
captured following log.

From: No Name - 83364444sip:[email protected];tag=fd64a8c0-13c4-523a4bd2-a565861-3c074469
SIP Display info: No Name - 83364444
SIP from address: sip:[email protected]
SIP from tag: fd64a8c0-13c4-523a4bd2-a565861-3c074469
To: sip:[email protected]
SIP to address: sip:[email protected]
SIP to address User Part: 83364444
SIP to address Host Part: 192.168.100.253
Call-ID: [email protected]
CSeq: 1 INVITE
Via: SIP/2.0/UDP 192.168.100.253:5060;branch=z9hG4bK-523a4bd2-a565861-58264eee
Transport: UDP
Sent-by Address: 192.168.100.253
Sent-by port: 5060
Branch: z9hG4bK-523a4bd2-a565861-58264eee
Max-Forwards: 70
Supported: replaces,timer,100rel
Contact: sip:[email protected]:5060;transport=UDP
Contact URI: sip:[email protected]:5060;transport=UDP
Content-Type: application/SDP
Content-Length: 294
Message Body

No. Time Source Destination Protocol Length Info
115 26.800222000 192.168.100.249 192.168.100.253 SIP 602 Status: 100 Trying |

Frame 115: 602 bytes on wire (4816 bits), 602 bytes captured (4816 bits) on interface 0
Ethernet II, Src: Vmware_fc:fa:53 (00:0c:29:fc:fa:53), Dst: Cisco-Li_0f:d1:f4 (00:1a:70:0f:d1:f4)
Internet Protocol Version 4, Src: 192.168.100.249 (192.168.100.249), Dst: 192.168.100.253 (192.168.100.253)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Source port: sip (5060)
Destination port: sip (5060)
Length: 568
Checksum: 0x85cb [validation disabled]
Session Initiation Protocol (100)
Status-Line: SIP/2.0 100 Trying
Status-Code: 100
[Resent Packet: False]
[Request Frame: 114]
[Response Time (ms): 1]
Message Header
Via: SIP/2.0/UDP 192.168.100.253:5060;branch=z9hG4bK-523a4bd2-a565861-58264eee;received=192.168.100.253
Transport: UDP
Sent-by Address: 192.168.100.253
Sent-by port: 5060
Branch: z9hG4bK-523a4bd2-a565861-58264eee
Received: 192.168.100.253
From: No Name - 83364444sip:[email protected];tag=fd64a8c0-13c4-523a4bd2-a565861-3c074469
SIP Display info: No Name - 83364444
SIP from address: sip:[email protected]
SIP from tag: fd64a8c0-13c4-523a4bd2-a565861-3c074469
To: sip:[email protected]
SIP to address: sip:[email protected]
SIP to address User Part: 83364444
SIP to address Host Part: 192.168.100.253
Call-ID: [email protected]
CSeq: 1 INVITE
Server: -2.11.0beta2(11.2.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:[email protected]:5060
Contact URI: sip:[email protected]:5060
Content-Length: 0

No. Time Source Destination Protocol Length Info
116 26.817025000 192.168.100.249 192.168.100.253 SIP/SDP 909 Status: 200 OK |

Frame 116: 909 bytes on wire (7272 bits), 909 bytes captured (7272 bits) on interface 0
Ethernet II, Src: Vmware_fc:fa:53 (00:0c:29:fc:fa:53), Dst: Cisco-Li_0f:d1:f4 (00:1a:70:0f:d1:f4)
Internet Protocol Version 4, Src: 192.168.100.249 (192.168.100.249), Dst: 192.168.100.253 (192.168.100.253)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Source port: sip (5060)
Destination port: sip (5060)
Length: 875
Checksum: 0xea1e [validation disabled]
Session Initiation Protocol (200)
Status-Line: SIP/2.0 200 OK
Status-Code: 200
[Resent Packet: False]
[Request Frame: 114]
[Response Time (ms): 18]
Message Header
Via: SIP/2.0/UDP 192.168.100.253:5060;branch=z9hG4bK-523a4bd2-a565861-58264eee;received=192.168.100.253
Transport: UDP
Sent-by Address: 192.168.100.253
Sent-by port: 5060
Branch: z9hG4bK-523a4bd2-a565861-58264eee
Received: 192.168.100.253
From: No Name - 83364444sip:[email protected];tag=fd64a8c0-13c4-523a4bd2-a565861-3c074469
SIP Display info: No Name - 83364444
SIP from address: sip:[email protected]
SIP from tag: fd64a8c0-13c4-523a4bd2-a565861-3c074469
To: sip:[email protected];tag=as211f7e56
SIP to address: sip:[email protected]
SIP to address User Part: 83364444
SIP to address Host Part: 192.168.100.253
SIP to tag: as211f7e56
Call-ID: [email protected]
CSeq: 1 INVITE
Server: -2.11.0beta2(11.2.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:[email protected]:5060
Contact URI: sip:[email protected]:5060
Content-Type: application/sdp
Content-Length: 263
Message Body

No. Time Source Destination Protocol Length Info
117 26.976708000 192.168.100.253 192.168.100.249 SIP 489 Request: ACK sip:[email protected]:5060 |

Frame 117: 489 bytes on wire (3912 bits), 489 bytes captured (3912 bits) on interface 0
Ethernet II, Src: Cisco-Li_0f:d1:f4 (00:1a:70:0f:d1:f4), Dst: Vmware_fc:fa:53 (00:0c:29:fc:fa:53)
Internet Protocol Version 4, Src: 192.168.100.253 (192.168.100.253), Dst: 192.168.100.249 (192.168.100.249)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Source port: sip (5060)
Destination port: sip (5060)
Length: 455
Checksum: 0x25e8 [validation disabled]
Session Initiation Protocol (ACK)
Request-Line: ACK sip:[email protected]:5060 SIP/2.0
Method: ACK
Request-URI: sip:[email protected]:5060
Request-URI User Part: 9000
Request-URI Host Part: 192.168.100.249
Request-URI Host Port: 5060
[Resent Packet: False]
[Request Frame: 114]
[Response Time (ms): 178]
Message Header
From: sip:[email protected];tag=fd64a8c0-13c4-523a4bd2-a565861-3c074469
SIP from address: sip:[email protected]
SIP from tag: fd64a8c0-13c4-523a4bd2-a565861-3c074469
To: sip:[email protected];tag=as211f7e56
SIP to address: sip:[email protected]
SIP to address User Part: 83364444
SIP to address Host Part: 192.168.100.253
SIP to tag: as211f7e56
Call-ID: [email protected]
CSeq: 1 ACK
Via: SIP/2.0/UDP 192.168.100.253:5060;branch=z9hG4bK-523a4bd3-a565951-2e704f8f
Transport: UDP
Sent-by Address: 192.168.100.253
Sent-by port: 5060
Branch: z9hG4bK-523a4bd3-a565951-2e704f8f
Max-Forwards: 70
Contact: sip:[email protected]:5060;transport=UDP
Contact URI: sip:[email protected]:5060;transport=UDP
Content-Length: 0

When i disabled the spa400 trunk.
I still can get inbound calls from spa400.
but I can’t dial outbound.
I think there’s nothing to do with spa400 trunk.

but how could I modify my 9000 extension number to route inbound calls?