Inbound route fails even if REGEX is valid and Inbound Route it's set

Status
Not open for further replies.

SwaggerRO19

New Member
Dec 4, 2022
18
2
3
România
Hi all,

I have the following sittuation:

1 RO DID, starting with 40373, setup on a Gateway

This is how the Inbound Routes are setup:

2022-12-07 16_33_42-Window.png

2022-12-07 16_32_56-Window.png

Checking with regex101, the expression passes without any issue:

2022-12-07 16_36_57-Window.png

And this is the log for the call:

Code:
2022-12-07 09:28:55.177267 93.27% [INFO] sofia.c:10468 sofia/external/ORIGINATIONDID@CARRIERIP receiving invite from CARRIERIP:5060 version: 1.10.8 -release 64bit call-id: 73282851-8d26-4407-a7f1-71e490f3a1b3
2022-12-07 09:28:55.177267 93.27% [DEBUG] sofia.c:10562 verifying acl "providers" for ip/port CARRIERIP:0.
2022-12-07 09:28:55.177267 93.27% [DEBUG] sofia.c:10591 IP CARRIERIP Approved by acl "providers[]". Access Granted.
2022-12-07 09:28:55.177267 93.27% [DEBUG] sofia.c:7502 Channel sofia/external/ORIGINATIONDID@CARRIERIP entering state [received][100]
2022-12-07 09:28:55.177267 93.27% [DEBUG] sofia.c:7512 Remote SDP:
v=0
o=- 2022867533 2022867533 IN IP4 CARRIERIP
s=Asterisk
c=IN IP4 CARRIERIP
t=0 0
m=audio 10016 RTP/AVP 0 8 18 107 97 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:107 opus/48000/2
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20

2022-12-07 09:28:55.177267 93.27% [DEBUG] sofia.c:7915 (sofia/external/ORIGINATIONDID@CARRIERIP) State Change CS_NEW -> CS_INIT
2022-12-07 09:28:55.177267 93.27% [DEBUG] switch_core_state_machine.c:600 (sofia/external/ORIGINATIONDID@CARRIERIP) State NEW
2022-12-07 09:28:55.177267 93.27% [DEBUG] switch_core_state_machine.c:581 (sofia/external/ORIGINATIONDID@CARRIERIP) Running State Change CS_INIT (Cur 1 Tot 14)
2022-12-07 09:28:55.177267 93.27% [DEBUG] switch_core_state_machine.c:624 (sofia/external/ORIGINATIONDID@CARRIERIP) State INIT
2022-12-07 09:28:55.177267 93.27% [DEBUG] mod_sofia.c:97 sofia/external/ORIGINATIONDID@CARRIERIP SOFIA INIT
2022-12-07 09:28:55.177267 93.27% [DEBUG] switch_core_state_machine.c:40 sofia/external/ORIGINATIONDID@CARRIERIP Standard INIT
2022-12-07 09:28:55.177267 93.27% [DEBUG] switch_core_state_machine.c:48 (sofia/external/ORIGINATIONDID@CARRIERIP) State Change CS_INIT -> CS_ROUTING
2022-12-07 09:28:55.177267 93.27% [DEBUG] switch_core_state_machine.c:624 (sofia/external/ORIGINATIONDID@CARRIERIP) State INIT going to sleep
2022-12-07 09:28:55.177267 93.27% [DEBUG] switch_core_state_machine.c:581 (sofia/external/ORIGINATIONDID@CARRIERIP) Running State Change CS_ROUTING (Cur 1 Tot 14)
2022-12-07 09:28:55.177267 93.27% [DEBUG] switch_channel.c:2380 (sofia/external/ORIGINATIONDID@CARRIERIP) Callstate Change DOWN -> RINGING
2022-12-07 09:28:55.177267 93.27% [DEBUG] switch_core_state_machine.c:640 (sofia/external/ORIGINATIONDID@CARRIERIP) State ROUTING
2022-12-07 09:28:55.177267 93.27% [DEBUG] mod_sofia.c:158 sofia/external/ORIGINATIONDID@CARRIERIP SOFIA ROUTING
2022-12-07 09:28:55.177267 93.27% [DEBUG] switch_core_state_machine.c:230 sofia/external/ORIGINATIONDID@CARRIERIP Standard ROUTING
2022-12-07 09:28:55.177267 93.27% [INFO] mod_dialplan_xml.c:639 Processing ORIGINATIONDID <ORIGINATIONDID>->40373743075 in context public
2022-12-07 09:28:55.197271 93.27% [NOTICE] switch_cpp.cpp:1465 [xml_handler] multiple key:dialplan:public
Dialplan: sofia/external/ORIGINATIONDID@CARRIERIP parsing [public->TESTDID] continue=false
Dialplan: sofia/external/ORIGINATIONDID@CARRIERIP Regex (FAIL) [TESTDID] ${sip_to_user}(gw+1532a4b6-abba-44d2-8551-a21e218835fc) =~ /^(TESTDID)$/ break=on-falseDialplan: sofia/external/ORIGINATIONDID@CARRIERIP parsing [public->TESTDID] continue=false
Dialplan: sofia/external/ORIGINATIONDID@CARRIERIP Regex (FAIL) [TESTDID] ${sip_to_user}(gw+1532a4b6-abba-44d2-8551-a21e218835fc) =~ /^\+(TESTDID)$/ break=on-false
Dialplan: sofia/external/ORIGINATIONDID@CARRIERIP parsing [public->+TESTDID] continue=false
Dialplan: sofia/external/ORIGINATIONDID@CARRIERIP Regex (FAIL) [+TESTDID] ${sip_to_user}(gw+1532a4b6-abba-44d2-8551-a21e218835fc) =~ /^\+(TESTDID)$/ break=on-false
Dialplan: sofia/external/ORIGINATIONDID@CARRIERIP parsing [public->40373743075] continue=false
Dialplan: sofia/external/ORIGINATIONDID@CARRIERIP Regex (FAIL) [40373743075] ${sip_to_user}(gw+1532a4b6-abba-44d2-8551-a21e218835fc) =~ /^(40373743075)$/ break=on-falseDialplan: sofia/external/ORIGINATIONDID@CARRIERIP parsing [public->TESTDID] continue=false
Dialplan: sofia/external/ORIGINATIONDID@CARRIERIP Regex (FAIL) [TESTDID] ${sip_to_user}(gw+1532a4b6-abba-44d2-8551-a21e218835fc) =~ /^(TESTDID)$/ break=on-false
2022-12-07 09:28:55.197271 93.27% [INFO] switch_core_state_machine.c:306 No Route, Aborting
2022-12-07 09:28:55.197271 93.27% [NOTICE] switch_core_state_machine.c:307 Hangup sofia/external/ORIGINATIONDID@CARRIERIP [CS_ROUTING] [NO_ROUTE_DESTINATION]
2022-12-07 09:28:55.197271 93.27% [DEBUG] switch_core_state_machine.c:640 (sofia/external/ORIGINATIONDID@CARRIERIP) State ROUTING going to sleep
2022-12-07 09:28:55.197271 93.27% [DEBUG] switch_core_state_machine.c:581 (sofia/external/ORIGINATIONDID@CARRIERIP) Running State Change CS_HANGUP (Cur 1 Tot 14)
2022-12-07 09:28:55.197271 93.27% [DEBUG] switch_core_state_machine.c:844 (sofia/external/ORIGINATIONDID@CARRIERIP) Callstate Change RINGING -> HANGUP
2022-12-07 09:28:55.197271 93.27% [DEBUG] switch_core_state_machine.c:846 (sofia/external/ORIGINATIONDID@CARRIERIP) State HANGUP
2022-12-07 09:28:55.197271 93.27% [DEBUG] mod_sofia.c:468 Channel sofia/external/ORIGINATIONDID@CARRIERIP hanging up, cause: NO_ROUTE_DESTINATION
2022-12-07 09:28:55.197271 93.27% [DEBUG] mod_sofia.c:613 Responding to INVITE with: 404
2022-12-07 09:28:55.197271 93.27% [DEBUG] switch_core_state_machine.c:59 sofia/external/ORIGINATIONDID@CARRIERIP Standard HANGUP, cause: NO_ROUTE_DESTINATION
2022-12-07 09:28:55.197271 93.27% [DEBUG] switch_core_state_machine.c:846 (sofia/external/ORIGINATIONDID@CARRIERIP) State HANGUP going to sleep
2022-12-07 09:28:55.197271 93.27% [DEBUG] switch_core_state_machine.c:616 (sofia/external/ORIGINATIONDID@CARRIERIP) State Change CS_HANGUP -> CS_REPORTING
2022-12-07 09:28:55.197271 93.27% [DEBUG] switch_core_state_machine.c:581 (sofia/external/ORIGINATIONDID@CARRIERIP) Running State Change CS_REPORTING (Cur 1 Tot 14)
2022-12-07 09:28:55.197271 93.27% [DEBUG] switch_core_state_machine.c:932 (sofia/external/ORIGINATIONDID@CARRIERIP) State REPORTING
2022-12-07 09:28:55.337275 92.83% [DEBUG] switch_core_state_machine.c:168 sofia/external/ORIGINATIONDID@CARRIERIP Standard REPORTING, cause: NO_ROUTE_DESTINATION
2022-12-07 09:28:55.337275 92.83% [DEBUG] switch_core_state_machine.c:932 (sofia/external/ORIGINATIONDID@CARRIERIP) State REPORTING going to sleep
2022-12-07 09:28:55.337275 92.83% [DEBUG] switch_core_state_machine.c:607 (sofia/external/ORIGINATIONDID@CARRIERIP) State Change CS_REPORTING -> CS_DESTROY
2022-12-07 09:28:55.337275 92.83% [DEBUG] switch_core_session.c:1747 Session 14 (sofia/external/ORIGINATIONDID@CARRIERIP) Locked, Waiting on external entities
2022-12-07 09:28:55.337275 92.83% [NOTICE] switch_core_session.c:1765 Session 14 (sofia/external/ORIGINATIONDID@CARRIERIP) Ended
2022-12-07 09:28:55.337275 92.83% [NOTICE] switch_core_session.c:1769 Close Channel sofia/external/ORIGINATIONDID@CARRIERIP [CS_DESTROY]
2022-12-07 09:28:55.337275 92.83% [DEBUG] switch_core_state_machine.c:735 (sofia/external/ORIGINATIONDID@CARRIERIP) Running State Change CS_DESTROY (Cur 0 Tot 14)
2022-12-07 09:28:55.337275 92.83% [DEBUG] switch_core_state_machine.c:745 (sofia/external/ORIGINATIONDID@CARRIERIP) State DESTROY
2022-12-07 09:28:55.337275 92.83% [DEBUG] mod_sofia.c:379 sofia/external/ORIGINATIONDID@CARRIERIP SOFIA DESTROY
2022-12-07 09:28:55.337275 92.83% [DEBUG] switch_core_state_machine.c:175 sofia/external/ORIGINATIONDID@CARRIERIP Standard DESTROY
2022-12-07 09:28:55.337275 92.83% [DEBUG] switch_core_state_machine.c:745 (sofia/external/ORIGINATIONDID@CARRIERIP) State DESTROY going to sleep
2022-12-07 09:30:30.277300 93.00% [DEBUG] sofia_reg.c:2650 Changing expire time to 784 by request of proxy sip:GW
2022-12-07 09:31:33.037272 91.40% [DEBUG] sofia_reg.c:2650 Changing expire time to 799 by request of proxy sip:CARRIERIP
2022-12-07 09:31:57.177267 89.60% [NOTICE] switch_channel.c:1123 New Channel sofia/external/ORIGINATIONDID@CARRIERIP [4304b704-27d4-4753-8c8d-aed5cb539d39]
2022-12-07 09:31:57.177267 89.60% [DEBUG] switch_core_state_machine.c:581 (sofia/external/ORIGINATIONDID@CARRIERIP) Running State Change CS_NEW (Cur 1 Tot 15)

Unfortunately, the call still fails and I do not have any ideea why, even if the REGEX passes, and the call it's terminated with No Route Available.

This is a test DID not in production, was assigned by our Carrier until our DID ports in and we do need to receive inbound calls through it.

Any help it's really appreciated!
 

mingus

Member
Mar 23, 2018
43
7
8
53
Hi, your logs are showing TESTDID as also being evaluated. I'm afraid it's tough to figure out what's going on because the log has been redacted, but I'm not confident that the log is still an accurate representation of what happened. Additionally, can you send a screen shoot of the destination detail form?
 
  • Like
Reactions: SwaggerRO19

SwaggerRO19

New Member
Dec 4, 2022
18
2
3
România
The DID's which are replaced by TESTID are US DID's and are not the subject of this topic :).

I can send you in private the Destinations detail form, no problem :).
 

SwaggerRO19

New Member
Dec 4, 2022
18
2
3
România
This issue has been resolved by appending the Dialplan - Inbound Route.

I've adjusted the REGEX from the original one, posted in the screenshot to:

^(gw\+1532a4b6-abba-44d2-8551-a21e218835fc)$

This works because the DID it's the only one tied to the SIP Trunk and the inbound will always present this specific REGEX.

Calls are now completing.

Thanks a lot for all the help to @mingus really appreciate it.
 
Status
Not open for further replies.