I open a new thread, since I believe, it’s a different issue. I’m the guy who had issues with Swisscom sip - It appears to work now since incoming calls are visible in the log, but not routed to the extension.
I get the voice prompt “the number you have dialed is not in service, please check the number”
I created an inbound route with the DID of the number with the destination for the extension.
I also cannot reach an external number.
What could be the problem?
Thanks,
Edy
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2024.10.16 11:02:27 =~=~=~=~=~=~=~=~=~=~=~=
e[0Ke[1;30m -- e[0mExecuting [s@from-pstn:1] e[1;36mNoOpe[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35mNo DID or CID Matche[0m") in new stack
e[KFreePBX17*CLI>
e[0Ke[1;30m -- e[0mExecuting [s@from-pstn:2] e[1;36mAnswere[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35me[0m") in new stack
e[KFreePBX17*CLI>
e[0K[2024-10-16 11:02:31] e[1;31mERRORe[0m[7634][C-0000000a]: e[1;37mpbx_functions.ce[0m:e[1;37m651e[0m e[1;37mast_func_read2e[0m: Function SIP_HEADER not registered
e[KFreePBX17*CLI>
e[0Ke[1;30m -- e[0mExecuting [s@from-pstn:3] e[1;36mLoge[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35mWARNING,Friendly Scanner from e[0m") in new stack
[2024-10-16 11:02:31] e[1;31mWARNINGe[0m[7634][C-0000000a]: e[1;37mExt. se[0m:e[1;37m3e[0m e[1;37m@ from-pstne[0m: Friendly Scanner from
e[1;30m -- e[0mExecuting [s@from-pstn:4] e[1;36mWaite[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35m2e[0m") in new stack
e[KFreePBX17*CLI>
e[0Ke[1;30m -- e[0mExecuting [s@from-pstn:5] e[1;36mPlaybacke[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35mss-noservicee[0m") in new stack
e[KFreePBX17*CLI>
e[0Ke[1;30m -- e[0m<PJSIP/Swisscom_sip-0000000e> Playing 'ss-noservice.ulaw' (language 'en')
e[KFreePBX17*CLI>
e[0Ke[1;30m -- e[0mExecuting [s@from-pstn:6] e[1;36mSayAlphae[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35me[0m") in new stack
e[KFreePBX17*CLI>
e[0Ke[1;30m -- e[0mExecuting [s@from-pstn:7] e[1;36mHangupe[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35me[0m") in new stack
e[KFreePBX17*CLI>
e[0Ke[1;30m == e[0mSpawn extension (from-pstn, s, 7) exited non-zero on 'PJSIP/Swisscom_sip-0000000e'
e[1;30m -- e[0mExecuting [h@from-pstn:1] e[1;36mGosube[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35mmacro-hangupcall,s,1()e[0m") in new stack
e[KFreePBX17*CLI>
e[0Ke[1;30m -- e[0mExecuting [s@macro-hangupcall:1] e[1;36mSete[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35m__MCVMSTATUS=e[0m") in new stack
e[1;30m -- e[0mExecuting [s@macro-hangupcall:2] e[1;36mGosube[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35mapp-missedcall-hangup,s,1()e[0m") in new stack
e[KFreePBX17*CLI>
e[0Ke[1;30m -- e[0mExecuting [s@app-missedcall-hangup:1] e[1;36mNoOpe[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35mDialed: se[0m") in new stack
e[1;30m -- e[0mExecuting [s@app-missedcall-hangup:2] e[1;36mNoOpe[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35mCaller: e[0m") in new stack
e[1;30m -- e[0mExecuting [s@app-missedcall-hangup:3] e[1;36mGotoIfe[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35m0?exite[0m") in new stack
e[KFreePBX17*CLI>
e[0Ke[1;30m -- e[0mExecuting [s@app-missedcall-hangup:4] e[1;36mSete[0m("e[1;35mPJSIP/Swisscom_sip-0000000ee[0m", "e[1;35mEXTENNUM=se[0m") in new stack
e[KFreePBX17*CLI>
The provider isn’t sending a phone number in the user part of the request URI. If you are registering, this will normally come from the user in the contact in the registration, and can be set with Contact User. Otherwise, you need to look at the INVITE and see if the DID is contained elsewhere, in it. There is a provided context which can be used if the DID is in the To header, otherwise you will need to write your own custom context, to extract the DID from wherever it appears.
If you only have one DID, you could also simply name your inbound route as “s”.
Thank you! This helped with setting the DID in the Contact User field, so incoming calls are working.
Do you know how I can get outgoing calls to work? I tried to set the Route CID for the outgoing route.
Here is the log when I try to call
Thank you!!
e[KFreePBX17*CLI>
e[0Ke[1;30m -- e[0mExecuting [0763878214@trunk-dial-with-exten:2] e[1;36mReturne[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35me[0m") in new stack
e[1;30m -- e[0mExecuting [s@macro-dialout-trunk:39] e[1;36mNoOpe[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35mDial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21e[0m") in new stack
e[1;30m -- e[0mExecuting [s@macro-dialout-trunk:40] e[1;36mGotoIfe[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35m0?continue,1:s-CHANUNAVAIL,1e[0m") in new stack
e[1;30m -- e[0mGoto (macro-dialout-trunk,s-CHANUNAVAIL,1)
e[1;30m -- e[0mExecuting [s-CHANUNAVAIL@macro-dialout-trunk:1] e[1;36mSete[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35mRC=21e[0m") in new stack
e[1;30m -- e[0mExecuting [s-CHANUNAVAIL@macro-dialout-trunk:2] e[1;36mGotoe[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35m21,1e[0m") in new stack
e[1;30m -- e[0mGoto (macro-dialout-trunk,21,1)
e[1;30m -- e[0mExecuting [21@macro-dialout-trunk:1] e[1;36mGotoe[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35mcontinue,1e[0m") in new stack
e[1;30m -- e[0mGoto (macro-dialout-trunk,continue,1)
e[1;30m -- e[0mExecuting [continue@macro-dialout-trunk:1] e[1;36mNoOpe[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35mTRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 21 - failing through to other trunkse[0m") in new stack
e[1;30m -- e[0mExecuting [continue@macro-dialout-trunk:2] e[1;36mExecIfe[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35m1?Set(CALLERID(number)=14)e[0m") in new stack
e[1;30m -- e[0mExecuting [continue@macro-dialout-trunk:3] e[1;36mReturne[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35me[0m") in new stack
e[1;30m -- e[0mExecuting [0763878214@from-internal:12] e[1;36mGosube[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35mmacro-outisbusy,s,1()e[0m") in new stack
e[1;30m -- e[0mExecuting [s@macro-outisbusy:1] e[1;36mProgresse[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35me[0m") in new stack
e[1;30m -- e[0mExecuting [s@macro-outisbusy:2] e[1;36mGotoIfe[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35m0?emergency,1e[0m") in new stack
e[1;30m -- e[0mExecuting [s@macro-outisbusy:3] e[1;36mGotoIfe[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35m0?intracompany,1e[0m") in new stack
e[1;30m -- e[0mExecuting [s@macro-outisbusy:4] e[1;36mPlaybacke[0m("e[1;35mPJSIP/14-00000025e[0m", "e[1;35mall-circuits-busy-now&please-try-call-later, noanswere[0m") in new stack
e[1;30m -- e[0m<PJSIP/14-00000025> Playing 'all-circuits-busy-now.ulaw' (language 'en')
You are getting channel unavailable after Dial has started. That generally means that the other side sent a response to that effect, and is likely to mean that you are doing something in a way that the provider doesn’t like. The actual SIP response might contain more detailed reasons.
Cause code 21 is “Call rejected” which is also consistent with the provider objecting to something that you are doing.
Again, your subject and first message talk about inbound calls, but this call is an outbound one.