Calls not routing on inbound trunk

Hello All,

My environment:
FreePBX 13.0.195.4

. We can make outbound calls without any problems.
. We have an Inbound route configured with Any Any which points to an IVR and that works as expected.

As we have a ten number DID range I wanted to provide direct dial for a number of extensions. However, when I configure an inbound route for an extension in the dial plan the call is always answered by the IVR.

So I modified the DID for the IVR from Any to the exact number and saved the configuration. After I did that calling either the DDI of the extension or the number configured for the IVR plays an announcement “The number you have dialed is not in service” the PBX then announces back the DID number I called.

Here is some output from the PBX console which shows the incoming call and the response form the PBX:

[2018-08-22 08:07:20] VERBOSE[705][C-0000004e] netsock2.c: Using SIP RTP TOS bits 184

[2018-08-22 08:07:20] VERBOSE[705][C-0000004e] netsock2.c: Using SIP RTP CoS mark 5

[2018-08-22 08:07:20] VERBOSE[7623][C-0000004e] pbx.c: Executing [35311234567@from-trunk:1] Set("SIP/NX_User2-0000007d", "__FROM_DID=35311234567") in new stack

[2018-08-22 08:07:20] VERBOSE[7623][C-0000004e] pbx.c: Executing [35311234567@from-trunk:2] NoOp("SIP/NX_User2-0000007d", "Received an unknown call with DID set to 35311234567") in new stack

[2018-08-22 08:07:20] VERBOSE[7623][C-0000004e] pbx.c: Executing [35311234567@from-trunk:3] Goto("SIP/NX_User2-0000007d", "s,a2") in new stack

[2018-08-22 08:07:20] VERBOSE[7623][C-0000004e] pbx_builtins.c: Goto (from-trunk,s,2)

[2018-08-22 08:07:20] VERBOSE[7623][C-0000004e] pbx.c: Executing [s@from-trunk:2] Answer("SIP/NX_User2-0000007d", "") in new stack

[2018-08-22 08:07:20] VERBOSE[7623][C-0000004e] pbx.c: Executing [s@from-trunk:3] Log("SIP/NX_User2-0000007d", "WARNING,Friendly Scanner from 111.111.111.111") in new stack

[2018-08-22 08:07:20] WARNING[7623][C-0000004e] Ext. s: Friendly Scanner from 111.111.111.111

[2018-08-22 08:07:20] VERBOSE[7623][C-0000004e] pbx.c: Executing [s@from-trunk:4] Wait("SIP/NX_User2-0000007d", "2") in new stack

[2018-08-22 08:07:22] VERBOSE[7623][C-0000004e] pbx.c: Executing [s@from-trunk:5] Playback("SIP/NX_User2-0000007d", "ss-noservice") in new stack

[2018-08-22 08:07:22] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘ss-noservice.alaw’ (language ‘en’)

[2018-08-22 08:07:27] VERBOSE[7623][C-0000004e] pbx.c: Executing [s@from-trunk:6] SayAlpha("SIP/NX_User2-0000007d", "35311234567") in new stack

[2018-08-22 08:07:27] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/3.alaw’ (language ‘en’)

[2018-08-22 08:07:28] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/5.alaw’ (language ‘en’)

[2018-08-22 08:07:29] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/3.alaw’ (language ‘en’)

[2018-08-22 08:07:30] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/9.alaw’ (language ‘en’)

[2018-08-22 08:07:31] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/9.alaw’ (language ‘en’)

[2018-08-22 08:07:31] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/9.alaw’ (language ‘en’)

[2018-08-22 08:07:32] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/9.alaw’ (language ‘en’)

[2018-08-22 08:07:33] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/9.alaw’ (language ‘en’)

[2018-08-22 08:07:34] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/9.alaw’ (language ‘en’)

[2018-08-22 08:07:35] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/9.alaw’ (language ‘en’)

[2018-08-22 08:07:36] VERBOSE[7623][C-0000004e] file.c: <SIP/NX_User2-0000007d> Playing ‘digits/9.alaw’ (language ‘en’)

[2018-08-22 08:07:36] VERBOSE[7623][C-0000004e] pbx.c: Executing [s@from-trunk:7] Hangup("SIP/NX_User2-0000007d", "") in new stack

[2018-08-22 08:07:36] VERBOSE[7623][C-0000004e] pbx.c: Spawn extension (from-trunk, s, 7) exited non-zero on ‘SIP/NX_User2-0000007d’

[2018-08-22 08:07:36] VERBOSE[7623][C-0000004e] pbx.c: Executing [h@from-trunk:1] Macro("SIP/NX_User2-0000007d", "hangupcall,") in new stack

[2018-08-22 08:07:36] VERBOSE[7623][C-0000004e] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("SIP/NX_User2-0000007d", "1?theend") in new stack

[2018-08-22 08:07:36] VERBOSE[7623][C-0000004e] pbx_builtins.c: Goto (macro-hangupcall,s,3)

[2018-08-22 08:07:36] VERBOSE[7623][C-0000004e] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("SIP/NX_User2-0000007d", "0?Set(CDR(recordingfile)=)") in new stack

[2018-08-22 08:07:36] VERBOSE[7623][C-0000004e] pbx.c: Executing [s@macro-hangupcall:4] Hangup("SIP/NX_User2-0000007d", "") in new stack

[2018-08-22 08:07:36] VERBOSE[7623][C-0000004e] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/NX_User2-0000007d’ in macro ‘hangupcall’

[2018-08-22 08:07:36] VERBOSE[7623][C-0000004e] pbx.c: Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/NX_User2-0000007d’

Thank you for any advice.

Are you setting the DID exactly as the one presented by your provider?
Try calling the different DIDs and verify exactly which DID is your provider presenting.

Your provider is not delivering the DID as 10 digits, you are getting 35311234567. When creating inbound routes, you must match exactly what shows in the CDR for the DID column.

Ah excellent advice, Lorne and arielgrin,

Tried that using the full digits as sent by the provider and it works!

Thank you so much for your help, I really appreciate it.

Stephen

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.