Incoming call not working : "cannot-complete-as-dialed"

Hello

Can anybody help me in finding the problem in my case.
I got “cannot-complete-as-dialed” but I can’t figure out why.

*numbers are dummy

===SIP Extension 10000
context=from-internal
Assigned DID/CID Section : 13334445555/13334445555
Inbound Route has been automatically created when I added this DID in “Assigned DID” section of the extension detail.

Dialing from any phone to 13334445555, I got cannot-complete-as-dialed error.

-- Executing [13334445555@from-internal:1] ResetCDR("SIP/trunk_be-000000a1", "") in new stack
-- Executing [13334445555@from-internal:2] NoCDR("SIP/trunk_be-000000a1", "") in new stack
-- Executing [13334445555@from-internal:3] Progress("SIP/trunk_be-000000a1", "") in new stack
-- Executing [13334445555@from-internal:4] Wait("SIP/trunk_be-000000a1", "1") in new stack
-- Executing [13334445555@from-internal:5] Progress("SIP/trunk_be-000000a1", "") in new stack
-- Executing [13334445555@from-internal:6] Playback("SIP/trunk_be-000000a1", "silence/1&cannot-complete-as-dialed&check-number-dial-again|noanswer") in new stack
-- <SIP/voxbone_be-000000a1> Playing 'silence/1' (language 'en')
-- <SIP/voxbone_be-000000a1> Playing 'cannot-complete-as-dialed' (language 'en')
-- <SIP/voxbone_be-000000a1> Playing 'check-number-dial-again' (language 'en')

– Executing [13334445555@from-internal:7] Wait(“SIP/trunk_be-000000a4”, “1”) in new stack
– Executing [13334445555@from-internal:8] Congestion(“SIP/trunk_be-000000a4”, “20”) in new stack
== Spawn extension (from-internal, 13334445555, 8) exited non-zero on ‘SIP/trunk_be-000000a4’
– Executing [h@from-internal:1] Macro(“SIP/trunk_be-000000a4”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/trunk_be-000000a4”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)

==SIP Trunk
–> I added this from Trunk page and sip_additional.conf shows this:

[Trunk2]
context=from-trunk-sip-Trunk2

[trunk_be]
host=11.22.33.44
type=friend
insecure=port,invite
context=from-internal
canreinvite=no
qualify=no

==extension_additional.conf shows :
[from-trunk-sip-Trunk2]
include => from-trunk-sip-Trunk2-custom
exten => _.,1,Set(GROUP()=OUT_2)
exten => _.,n,Goto(from-trunk,${EXTEN},1)

DID 13334445555 is assigned from this provider call is properly forwared to my FreePBX but it does not ring
my extension SIP/10000. I don’t know which context is correct when configuration from FreePBX Gui.

If you need more information please let me know.

Thank you

The context should be from-trunk.

Thanks for your comment.
I changed the context to [from-trunk] for SIP extension(10000) and SIP Trunk.
I also changed [Allow Anonymous Inbound SIP Calls] to [yes] but the incoming call not reaching to my sip extension 10000. Now I get different message like “Number is not in service”


-- Executing [13334445555@from-trunk:1] Set("SIP/trunk_be-000000b8", "__FROM_DID=17187018104") in new stack
-- Executing [13334445555@from-trunk:2] NoOp("SIP/trunk_be-000000b8", "Received an unknown call with DID set to 17187018104") in new stack
-- Executing [13334445555@from-trunk:3] Goto("SIP/trunk_be-000000b8", "s|a2") in new stack
-- Goto (from-trunk,s,2)
-- Executing [s@from-trunk:2] Answer("SIP/trunk_be-000000b8", "") in new stack
-- Executing [s@from-trunk:3] Wait("SIP/trunk_be-000000b8", "2") in new stack
-- Executing [s@from-trunk:4] Playback("SIP/trunk_be-000000b8", "ss-noservice") in new stack
-- <SIP/trunk_be-000000b8> Playing 'ss-noservice' (language 'en')

==sip_additional.conf
[trunk_be] ; Set from "Add SIP Trunk"
host=11.22.33.44
type=friend
insecure=port,invite
context=from-trunk
canreinvite=no
qualify=no

[10000] ; Set from "Add Extension"
deny=0.0.0.0/0.0.0.0
disallow=all
secret=xxxxx
dtmfmode=rfc2833
canreinvite=no
context=from-trunk
host=dynamic
type=friend
nat=yes
port=5060
qualify=yes
callgroup=
pickupgroup=
allow=ulaw,alaw
dial=SIP/10000
mailbox=10000@default
permit=0.0.0.0/0.0.0.0
callerid=device <10000>
call-limit=50

Do you have an inbound route for 17187018104 ??

Yes. The DID number is listed in “Inbound Route” and the SIP extension 10000 is set as its “Set Destination”. It was created automatically when I write the number to “Assigned DID/CID” field of the extension.

Thanks

I don’t think it is matching your trunk. I would start with the minimum number of configuration options to match the invite. Use SIP debug to help with this process.

You can confirm this by momentarily allowing anonymous calls in general settings.

wasisyed - You have your context on your DAHDI set to from-internal needs to be from-trunk

akim59 - I told you to change context on trunk not on extension. Extension needs to be in from-internal