Incoming calls failed - The number you have dialed is not in service

My incoming calls are not working for specific number. When i try to call I can hear “The number you have dialed is not in service”. I have created Inbound Route and pjsip Trunk. In trunk, I set context to ‘from-pstn-toheader’.
My logs from asterisk are:

`[2020-05-22 17:45:26] VERBOSE[16085] pbx_variables.c: Setting global variable 'SIPDOMAIN' to 
'95.217.54.197'
[2020-05-22 17:45:26] VERBOSE[6914][C-00000049] pbx.c: Executing [s@from-pstn-toheader:1] 
NoOp("PJSIP/Nr_kom1-00000045", "Attempting to extract DID from SIP To header") in new stack
[2020-05-22 17:45:26] VERBOSE[6914][C-00000049] pbx.c: Executing [s@from-pstn-toheader:2] 
GotoIf("PJSIP/Nr_kom1-00000045", "0?SIP") in new stack
[2020-05-22 17:45:26] VERBOSE[6914][C-00000049] pbx.c: Executing [s@from-pstn-toheader:3] 
GotoIf("PJSIP/Nr_kom1-00000045", "1?PJSIP") in new stack
[2020-05-22 17:45:26] VERBOSE[6914][C-00000049] pbx_builtins.c: Goto (from-pstn-toheader,s,7)
[2020-05-22 17:45:26] VERBOSE[6914][C-00000049] pbx.c: Executing [s@from-pstn-toheader:7] 
Goto("PJSIP/Nr_kom1-00000045", "from-pstn,s,1") in new stack
[2020-05-22 17:45:26] VERBOSE[6914][C-00000049] pbx_builtins.c: Goto (from-pstn,s,1)
[2020-05-22 17:45:26] VERBOSE[6914][C-00000049] pbx.c: Executing [s@from-pstn:1] 
NoOp("PJSIP/Nr_kom1-00000045", "No DID or CID Match") in new stack
[2020-05-22 17:45:26] VERBOSE[6914][C-00000049] pbx.c: Executing [s@from-pstn:2] 
Answer("PJSIP/Nr_kom1-00000045", "") in new stack
[2020-05-22 17:45:26] WARNING[6914][C-00000049] chan_sip.c: This function can only be used on 
SIP channels.
[2020-05-22 17:45:26] VERBOSE[6914][C-00000049] pbx.c: Executing [s@from-pstn:3] 
Log("PJSIP/Nr_kom1-00000045", "WARNING,Friendly Scanner from ") in new stack
[2020-05-22 17:45:26] WARNING[6914][C-00000049] Ext. s: Friendly Scanner from
[2020-05-22 17:45:26] VERBOSE[6914][C-00000049] pbx.c: Executing [s@from-pstn:4] 
Wait("PJSIP/Nr_kom1-00000045", "2") in new stack
[2020-05-22 17:45:28] VERBOSE[6914][C-00000049] pbx.c: Executing [s@from-pstn:5] 
Playback("PJSIP/Nr_kom1-00000045", "ss-noservice") in new stack
[2020-05-22 17:45:28] VERBOSE[6914][C-00000049] file.c: <PJSIP/Nr_kom1-00000045> Playing 
'ss-noservice.alaw' (language 'en')
[2020-05-22 17:45:29] VERBOSE[6914][C-00000049] pbx.c: Executing [h@from-pstn:1] 
Macro("PJSIP/Nr_kom1-00000045", "hangupcall,") in new stack
[2020-05-22 17:45:29] VERBOSE[6914][C-00000049] pbx.c: Executing [s@macro-hangupcall:1] 
GotoIf("PJSIP/Nr_kom1-00000045", "1?theend") in new stack
[2020-05-22 17:45:29] VERBOSE[6914][C-00000049] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2020-05-22 17:45:29] VERBOSE[6914][C-00000049] pbx.c: Executing [s@macro-hangupcall:3] 
ExecIf("PJSIP/Nr_kom1-00000045", "0?Set(CDR(recordingfile)=)") in new stack
[2020-05-22 17:45:29] VERBOSE[6914][C-00000049] pbx.c: Executing [s@macro-hangupcall:4] 
NoOp("PJSIP/Nr_kom1-00000045", " montior file= ") in new stack
[2020-05-22 17:45:29] VERBOSE[6914][C-00000049] pbx.c: Executing [s@macro-hangupcall:5] 
GotoIf("PJSIP/Nr_kom1-00000045", "1?skipagi") in new stack
[2020-05-22 17:45:29] VERBOSE[6914][C-00000049] pbx_builtins.c: Goto (macro-hangupcall,s,7)
[2020-05-22 17:45:29] VERBOSE[6914][C-00000049] pbx.c: Executing [s@macro-hangupcall:7] 
Hangup("PJSIP/Nr_kom1-00000045", "") in new stack
[2020-05-22 17:45:29] VERBOSE[6914][C-00000049] app_macro.c: Spawn extension (macro- 
hangupcall, s, 7) exited non-zero on 'PJSIP/Nr_kom1-00000045' in macro 'hangupcall'
[2020-05-22 17:45:29] VERBOSE[6914][C-00000049] pbx.c: Spawn extension (from-pstn, h, 1) 
exited non-zero on 'PJSIP/Nr_kom1-00000045`

Can anyone explain me what the problem might be?

If you hear Allison (the asterisk voice), your call is “completing” (making it to the PBX). Where does the number go?

Yes, I hear Allison. The number goes to User (I’m in User & Devices mode).

Call arrives with no DID, neither in the invite nor in the To header. You need an Any/Any route to accept it.

2 Likes

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