The number you have dialed is not in service

Hi there,

I’m in the process of setting up a new freepbx system. I have the outbound side of it working. The inbound side is not. When I set up my inbound trunk and inbound route, it changed from a busy signal when I dial the number, to a message of “The number you have dialed is not in service.”

My log file looks like this from when I last tried to call in to this new number:

[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:1] NoOp(“SIP/66.241.96.164-00000058”, “Received incoming SIP connection from unknown peer to 8884897169”) in new stack
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:2] Set(“SIP/66.241.96.164-00000058”, “DID=8884897169”) in new stack
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:3] Goto(“SIP/66.241.96.164-00000058”, “s,1”) in new stack
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx_builtins.c: Goto (from-sip-external,s,1)
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/66.241.96.164-00000058”, “1?setlanguage:checkanon”) in new stack
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx_builtins.c: Goto (from-sip-external,s,2)
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:2] Set(“SIP/66.241.96.164-00000058”, “CHANNEL(language)=en”) in new stack
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:3] GotoIf(“SIP/66.241.96.164-00000058”, “1?noanonymous”) in new stack
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx_builtins.c: Goto (from-sip-external,s,5)
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:5] Set(“SIP/66.241.96.164-00000058”, “TIMEOUT(absolute)=15”) in new stack
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] func_timeout.c: Channel will hangup at 2018-02-08 16:50:04.414 UTC.
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:6] Log(“SIP/66.241.96.164-00000058”, "WARNING,“Rejecting unknown SIP connection from 66.241.96.164"”) in new stack
[2018-02-08 16:49:49] WARNING[20659][C-0000006e] Ext. s: “Rejecting unknown SIP connection from 66.241.96.164”
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:7] Answer(“SIP/66.241.96.164-00000058”, “”) in new stack
[2018-02-08 16:49:49] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:8] Wait(“SIP/66.241.96.164-00000058”, “2”) in new stack
[2018-02-08 16:49:51] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:9] Playback(“SIP/66.241.96.164-00000058”, “ss-noservice”) in new stack
[2018-02-08 16:49:51] VERBOSE[20659][C-0000006e] file.c: <SIP/66.241.96.164-00000058> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[2018-02-08 16:49:56] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:10] PlayTones(“SIP/66.241.96.164-00000058”, “congestion”) in new stack
[2018-02-08 16:49:56] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:11] Congestion(“SIP/66.241.96.164-00000058”, “5”) in new stack
[2018-02-08 16:49:58] VERBOSE[20659][C-0000006e] pbx.c: Spawn extension (from-sip-external, s, 11) exited non-zero on ‘SIP/66.241.96.164-00000058’
[2018-02-08 16:49:58] VERBOSE[20659][C-0000006e] pbx.c: Executing [[email protected]:1] Hangup(“SIP/66.241.96.164-00000058”, “”) in new stack
[2018-02-08 16:49:58] VERBOSE[20659][C-0000006e] pbx.c: Spawn extension (from-sip-external, h, 1) exited non-zero on ‘SIP/66.241.96.164-00000058’
[2018-02-08 16:56:02] VERBOSE[30552] asterisk.c: Remote UNIX connection
[2018-02-08 16:56:02] VERBOSE[6083] asterisk.c: Remote UNIX connection disconnected
[2018-02-08 16:56:02] VERBOSE[30552] asterisk.c: Remote UNIX connection
[2018-02-08 16:56:02] VERBOSE[6085] asterisk.c: Remote UNIX connection disconnected
[2018-02-08 16:56:02] VERBOSE[30552] asterisk.c: Remote UNIX connection
[2018-02-08 16:56:02] VERBOSE[6087] asterisk.c: Remote UNIX connection disconnected

For the inbound trunk under sip settings I have:
type=friend
dtmfmode=auto
username=username
secret=xxxxx
context=from-trunk
insecure=port,invite
canreinvite=no
fromdomain=inbound24.myprovider.net
prematuremedia=no
progressinband=yes

I have this set up as chan_ sip, but my extensions are pjsip. Does that make a difference? Thanks in advance for the help.

host=66.241.96.164

is missing from your trunk definition.

I added that. Still not getting through, but I’m now seeing this in the log file: [2018-02-08 18:21:09] VERBOSE[16837][C-00000075] file.c: <SIP/jaso_qsip3-0000005e> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] pbx.c: Executing [[email protected]:1] Macro(“SIP/jXXXXXX-0000005e”, “hangupcall,”) in new stack
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/jXXXXXXX-0000005e”, “1?theend”) in new stack
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/XXXXXX-0000005e”, “0?Set(CDR(recordingfile)=)”) in new stack
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] pbx.c: Executing [[email protected]:4] NoOp(“SIP/jXXXXXXX-0000005e”, " monior file= ") in new stack
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] pbx.c: Executing [[email protected]:5] AGI(“SIP/jXXXXXXX-0000005e”, “attendedtransfer-rec-restart.php,”) in new stack
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] res_agi.c: <SIP/jXXXXXXX-0000005e>AGI Script attendedtransfer-rec-restart.php completed, returning 0
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] pbx.c: Executing [[email protected]:6] Hangup(“SIP/jXXXXXXX-0000005e”, “”) in new stack
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘SIP/jXXXXXXX-0000005e’ in macro ‘hangupcall’
[2018-02-08 18:21:13] VERBOSE[16837][C-00000075] pbx.c: Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/jXXXXXXX-0000005e’
[2018-02-08 18:22:10] VERBOSE[30603][C-00000076] netsock2.c: Using SIP RTP TOS bits 184
[2018-02-08 18:22:10] VERBOSE[30603][C-00000076] netsock2.c: Using SIP RTP CoS mark 5
[2018-02-08 18:22:10] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:1] Set(“SIP/jXXXXXXX-0000005f”, “__FROM_DID=8884897169”) in new stack
[2018-02-08 18:22:10] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:2] NoOp(“SIP/jaso_qsip3-0000005f”, “Received an unknown call with DID set to 8884897169”) in new stack
[2018-02-08 18:22:10] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:3] Goto(“SIP/XXXXXXXX-0000005f”, “s,a2”) in new stack
[2018-02-08 18:22:10] VERBOSE[16945][C-00000076] pbx_builtins.c: Goto (from-trunk,s,2)
[2018-02-08 18:22:10] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:2] Answer(“SIP/jaso_qsip3-0000005f”, “”) in new stack
[2018-02-08 18:22:11] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:3] Log(“SIP/jXXXXXXX-0000005f”, “WARNING,Friendly Scanner from 66.241.96.164”) in new stack
[2018-02-08 18:22:11] WARNING[16945][C-00000076] Ext. s: Friendly Scanner from 66.241.96.164
[2018-02-08 18:22:11] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:4] Wait(“SIP/jXXXXXXX-0000005f”, “2”) in new stack
[2018-02-08 18:22:13] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:5] Playback(“SIP/jXXXXXXX-0000005f”, “ss-noservice”) in new stack
[2018-02-08 18:22:13] VERBOSE[16945][C-00000076] file.c: <SIP/jXXXXXXX-0000005f> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:1] Macro(“SIP/jXXXXXXX-0000005f”, “hangupcall,”) in new stack
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/jXXXXXXX-0000005f”, “1?theend”) in new stack
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/jXXXXXXX-0000005f”, “0?Set(CDR(recordingfile)=)”) in new stack
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:4] NoOp(“SIP/jXXXXXXX-0000005f”, " monior file= ") in new stack
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:5] AGI(“SIP/jXXXXXXX-0000005f”, “attendedtransfer-rec-restart.php,”) in new stack
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] res_agi.c: <SIP/XXXXXXX-0000005f>AGI Script attendedtransfer-rec-restart.php completed, returning 0
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] pbx.c: Executing [[email protected]:6] Hangup(“SIP/jXXXXXXX-0000005f”, “”) in new stack
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘SIP/jXXXXXXX-0000005f’ in macro ‘hangupcall’
[2018-02-08 18:22:16] VERBOSE[16945][C-00000076] pbx.c: Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/jXXXXXXX-0000005f’

is this problem fixed? Your log excerpt started way too late to be useful.

No, its not fixed. Still getting "the number you have dialed is not in service. Is this far enough back?

[2018-02-08 18:20:10] VERBOSE[16291][C-00000074] pbx.c: Executing [[email protected]:1] Set(“SIP/vitel-inbound-0000005d”, “__FROM_DID=8884897169”) in new stack
[2018-02-08 18:20:10] VERBOSE[16291][C-00000074] pbx.c: Executing [[email protected]:2] NoOp(“SIP/vitel-inbound-0000005d”, “Received an unknown call with DID set to 8884897169”) in new stack
[2018-02-08 18:20:10] VERBOSE[16291][C-00000074] pbx.c: Executing [[email protected]:3] Goto(“SIP/vitel-inbound-0000005d”, “s,a2”) in new stack
[2018-02-08 18:20:10] VERBOSE[16291][C-00000074] pbx_builtins.c: Goto (from-trunk,s,2)
[2018-02-08 18:20:10] VERBOSE[16291][C-00000074] pbx.c: Executing [[email protected]:2] Answer(“SIP/vitel-inbound-0000005d”, “”) in new stack
[2018-02-08 18:20:11] VERBOSE[16291][C-00000074] pbx.c: Executing [[email protected]:3] Log(“SIP/vitel-inbound-0000005d”, “WARNING,Friendly Scanner from 66.241.96.164”) in new stack
[2018-02-08 18:20:11] WARNING[16291][C-00000074] Ext. s: Friendly Scanner from 66.241.96.164
[2018-02-08 18:20:11] VERBOSE[16291][C-00000074] pbx.c: Executing [[email protected]:4] Wait(“SIP/vitel-inbound-0000005d”, “2”) in new stack
[2018-02-08 18:20:13] VERBOSE[16291][C-00000074] pbx.c: Executing [[email protected]:5] Playback(“SIP/vitel-inbound-0000005d”, “ss-noservice”) in new stack
[2018-02-08 18:20:13] VERBOSE[16291][C-00000074] file.c: <SIP/vitel-inbound-0000005d> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[2018-02-08 18:20:18] VERBOSE[16291][C-00000074] pbx.c: Executing [[email protected]:6] SayAlpha(“SIP/vitel-inbound-0000005d”, “8884897169”) in new stack
[2018-02-08 18:20:18] VERBOSE[16291][C-00000074] file.c: <SIP/vitel-inbound-0000005d> Playing ‘digits/8.ulaw’ (language ‘en’)

Set up an “any/any” trunk (no Caller ID, no DID) and see if you can get closer with that.

That worked. But I have multiple DIDs to add to this system. How will I differentiate them when I go to set up an inbound route for each one? Or is that not how I should do it?

If you are using vitelity’s ip routing, you will need to allow anonymous ip calls or setup an inbound trunk from any ip that vitelity will use to send it to you , a trunk from 66.241.96.164 should allow this call I would start with allowing anonymous inbound until you are comfortable with the ip routed inbound routes.

Thanks for the help guys!

You need to add an inbound route for each number, but the number has to match what your ITSP is sending. In other words, you need to set up an inbound for 8884897169, and then add the rest of your DIDs the same way.

What Dicko says about anonymous inbound is good in the short term, but I would really get off of that ASAP by setting up trunks for each of the addresses your ITSP expects to use. This isn’t uncommon, setting up a trunk per IP address is “the right” solution in the long run.

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