SOLVED Inbound call hits incorrect dialplan

Status
Not open for further replies.
Jul 15, 2021
102
9
18
34
Please see attached log, I have set an inbound route using Dialplan->Destinations

However when an incoming call is received from the gateway, it hits the Dialplans in the Dialplan Manager obviously my expected dialplan is not in that list as it is under Inbound routes. How do I make the inbound calls hit the inbound routes.

Code:
global siptrace on
+OK Global siptrace on
recv 1121 bytes from udp/[xx.yy.7.12]:5060 at 15:31:25.861270:
------------------------------------------------------------------------
INVITE sip:gw+3dc63182-c355-4002-b1cb-640a3c2ee0dc@sipprovider_ip:5080;transport=udp;gw=3dc63182-c355-4002-b1cb-640a3c2ee0dc SIP/2.0
Via: SIP/2.0/UDP xx.yy.7.12:5060;rport;branch=z9hG4bK+6e48e2046ca4a56eda7497f6078525c21+SBC+1
From: "mobilenumber" <sip:mobilenumber@xx.yy.7.12:5060>;tag=xx.yy.7.12+1+e372fce3+34cecedb
To: <sip:gw+3dc63182-c355-4002-b1cb-640a3c2ee0dc@sipprovider_ip:5080;transport=udp;gw=3dc63182-c355-4002-b1cb-640a3c2ee0dc>
CSeq: 527042067 INVITE
Expires: 180
Organization: SIP Provider
Min-SE: 180
Session-Expires: 3600
Supported: timer
Content-Length: 357
Contact: <sip:xx.yy.7.12:5060>
Content-Type: application/sdp
Max-Forwards: 69
Call-ID: d97f8ab977dac8e5568c83f1e6cbec2f@xx.yy.7.12
Accept: application/sdp, application/dtmf-relay

v=0
o=- 1245670126 17276 IN IP4 RTP_IP
s=SBC call
c=IN IP4 RTP_IP
t=0 0
m=audio 59466 RTP/AVP 8 108 102 116 101
a=rtpmap:8 PCMA/8000
a=rtpmap:108 AMR/8000
a=fmtp:108 mode-change-neighbor=1;mode-change-period=2
a=rtpmap:102 AMR/8000
a=rtpmap:116 telephone-event/8000
a=rtpmap:101 AMR-WB/8000
a=fmtp:101 mode-set=0,1,2,4,8
a=ptime:5
2021-08-02 15:31:22.125881 [NOTICE] switch_channel.c:1118 New Channel sofia/external/mobilenumber@xx.yy.7.12:5060 [994e9074-f378-11eb-a6d0-bf5f82191e2a]
2021-08-02 15:31:22.125881 [DEBUG] switch_core_state_machine.c:585 (sofia/external/mobilenumber@xx.yy.7.12:5060) Running State Change CS_NEW (Cur 1 Tot 43)
2021-08-02 15:31:22.125881 [DEBUG] sofia.c:10279 sofia/external/mobilenumber@xx.yy.7.12:5060 receiving invite from xx.yy.7.12:5060 version: 1.10.3 -release 32bit
2021-08-02 15:31:22.125881 [DEBUG] sofia.c:10373 verifying acl "domains" for ip/port xx.yy.7.12:0.
2021-08-02 15:31:22.125881 [DEBUG] sofia.c:10402 IP xx.yy.7.12 Approved by acl "domains[]". Access Granted.
2021-08-02 15:31:22.125881 [DEBUG] sofia.c:7325 Channel sofia/external/mobilenumber@xx.yy.7.12:5060 entering state [received][100]
2021-08-02 15:31:22.125881 [DEBUG] sofia.c:7335 Remote SDP:
v=0
o=- 1245670126 17276 IN IP4 RTP_IP
s=SBC call
c=IN IP4 RTP_IP
t=0 0
m=audio 59466 RTP/AVP 8 108 102 116 101
a=rtpmap:8 PCMA/8000
a=rtpmap:108 AMR/8000
a=fmtp:108 mode-change-neighbor=1;mode-change-period=2
a=rtpmap:102 AMR/8000
a=rtpmap:116 telephone-event/8000
a=rtpmap:101 AMR-WB/8000
a=fmtp:101 mode-set=0,1,2,4,8
a=ptime:5

2021-08-02 15:31:22.125881 [DEBUG] switch_core_media.c:5592 Audio Codec Compare [PCMA:8:8000:5:64000:1]/[PCMA:8:8000:20:64000:1]
2021-08-02 15:31:22.125881 [DEBUG] switch_core_media.c:5628 Audio Codec Compare [PCMA:8:8000:20:64000:1] is saved as a near-match
2021-08-02 15:31:22.125881 [DEBUG] switch_core_media.c:5592 Audio Codec Compare [AMR:108:8000:5:0:1]/[PCMA:8:8000:20:64000:1]
2021-08-02 15:31:22.125881 [DEBUG] switch_core_media.c:5592 Audio Codec Compare [AMR:102:8000:5:0:1]/[PCMA:8:8000:20:64000:1]
2021-08-02 15:31:22.125881 [DEBUG] switch_core_media.c:5508 Set telephone-event payload to 116@8000
2021-08-02 15:31:22.125881 [DEBUG] switch_core_media.c:5592 Audio Codec Compare [AMR-WB:101:8000:5:0:1]/[PCMA:8:8000:20:64000:1]
2021-08-02 15:31:22.125881 [DEBUG] switch_core_media.c:5699 Substituting codec PCMA@20i@8000h@1c
2021-08-02 15:31:22.125881 [DEBUG] switch_core_media.c:3837 Set Codec sofia/external/mobilenumber@xx.yy.7.12:5060 PCMA/8000 20 ms 160 samples 64000 bits 1 channels
2021-08-02 15:31:22.125881 [DEBUG] switch_core_codec.c:111 sofia/external/mobilenumber@xx.yy.7.12:5060 Original read codec set to PCMA:8
2021-08-02 15:31:22.125881 [DEBUG] switch_core_media.c:5851 Set telephone-event payload to 116@8000
2021-08-02 15:31:22.125881 [DEBUG] switch_core_media.c:5909 sofia/external/mobilenumber@xx.yy.7.12:5060 Set 2833 dtmf send payload to 116 recv payload to 116
2021-08-02 15:31:22.125881 [DEBUG] sofia.c:7759 (sofia/external/mobilenumber@xx.yy.7.12:5060) State Change CS_NEW -> CS_INIT
2021-08-02 15:31:22.125881 [DEBUG] switch_core_state_machine.c:604 (sofia/external/mobilenumber@xx.yy.7.12:5060) State NEW
2021-08-02 15:31:22.125881 [DEBUG] switch_core_state_machine.c:585 (sofia/external/mobilenumber@xx.yy.7.12:5060) Running State Change CS_INIT (Cur 1 Tot 43)
2021-08-02 15:31:22.125881 [DEBUG] switch_core_state_machine.c:628 (sofia/external/mobilenumber@xx.yy.7.12:5060) State INIT
2021-08-02 15:31:22.125881 [DEBUG] mod_sofia.c:93 sofia/external/mobilenumber@xx.yy.7.12:5060 SOFIA INIT
2021-08-02 15:31:22.125881 [DEBUG] switch_core_state_machine.c:40 sofia/external/mobilenumber@xx.yy.7.12:5060 Standard INIT
2021-08-02 15:31:22.125881 [DEBUG] switch_core_state_machine.c:48 (sofia/external/mobilenumber@xx.yy.7.12:5060) State Change CS_INIT -> CS_ROUTING
2021-08-02 15:31:22.125881 [DEBUG] switch_core_state_machine.c:628 (sofia/external/mobilenumber@xx.yy.7.12:5060) State INIT going to sleep
2021-08-02 15:31:22.125881 [DEBUG] switch_core_state_machine.c:585 (sofia/external/mobilenumber@xx.yy.7.12:5060) Running State Change CS_ROUTING (Cur 1 Tot 43)
2021-08-02 15:31:22.125881 [DEBUG] switch_channel.c:2332 (sofia/external/mobilenumber@xx.yy.7.12:5060) Callstate Change DOWN -> RINGING
2021-08-02 15:31:22.125881 [DEBUG] switch_core_state_machine.c:644 (sofia/external/mobilenumber@xx.yy.7.12:5060) State ROUTING
2021-08-02 15:31:22.125881 [DEBUG] mod_sofia.c:154 sofia/external/mobilenumber@xx.yy.7.12:5060 SOFIA ROUTING
2021-08-02 15:31:22.125881 [DEBUG] switch_core_state_machine.c:236 sofia/external/mobilenumber@xx.yy.7.12:5060 Standard ROUTING
2021-08-02 15:31:22.125881 [INFO] mod_dialplan_xml.c:637 Processing mobilenumber <mobilenumber>->landlinenumber in context 192.168.1.2
send 455 bytes to udp/[xx.yy.7.12]:5060 at 15:31:25.865783:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP xx.yy.7.12:5060;rport=5060;branch=z9hG4bK+6e48e2046ca4a56eda7497f6078525c21+SBC+1
From: "mobilenumber" <sip:mobilenumber@xx.yy.7.12:5060>;tag=xx.yy.7.12+1+e372fce3+34cecedb
To: <sip:gw+3dc63182-c355-4002-b1cb-640a3c2ee0dc@sipprovider_ip:5080;transport=udp;gw=3dc63182-c355-4002-b1cb-640a3c2ee0dc>
Call-ID: d97f8ab977dac8e5568c83f1e6cbec2f@xx.yy.7.12
CSeq: 527042067 INVITE
User-Agent: myuseragent
Content-Length: 0

Dialplan: sofia/external/mobilenumber@xx.yy.7.12:5060 parsing [192.168.1.2->user_exists] continue=true
Dialplan: sofia/external/mobilenumber@xx.yy.7.12:5060 Regex (FAIL) [user_exists] ${loopback_leg}() =~ /^B$/ break=never
Dialplan: sofia/external/mobilenumber@xx.yy.7.12:5060 Regex (PASS) [user_exists] () =~ // break=on-false
Dialplan: sofia/external/mobilenumber@xx.yy.7.12:5060 Action set(user_exists=${user_exists id ${destination_number} ${domain_name}}) INLINE
 
Jul 15, 2021
102
9
18
34
Ok, I have figured out - my gateway's context was set to a domain (192.168.x.x) and not as public, so it was hitting the dialplan belonging to that domain rather than inbound routes Changing the gateway's context to public resolved it.
 
Status
Not open for further replies.