Outgoing calls use only one of three trunks, changes prevent outgoing calls

Hello,

I have installed a FreePBX 16.0.40.8 with Asterisk 20.5.0. I have configured three phone numbers as trunks.

 <Registration/ServerURI..............................>  <Auth....................>  <Status.......>
==========================================================================================

 Deutsche_Telekom_ALL-IP-6923169/sip:tel.t-online.de     Deutsche_Telekom_ALL-IP-6923169  Registered        (exp. 454s)
 Deutsche_Telekom_ALL-IP_6929517/sip:tel.t-online.de     Deutsche_Telekom_ALL-IP_6929517  Registered        (exp. 450s)
 Deutsche_Telekom_ALL-IP_6923112/sip:tel.t-online.de     Deutsche_Telekom_ALL-IP_6923112  Registered        (exp. 452s)

Then I created three inbound routes that branch off either to time conditions or announcements plus IVR, in order to then reach one of five extensions each. I have a Snom D385 for the three physical phone numbers, here the first three extensions are configured for receiving and making calls. Two extensions are set up on softphones and are controlled via the IVR. The IVR is on “6923169”.
I also created outbound routes for all three phone numbers, so that everything that comes from extension “3169” should go via the outbound route “Deutsche-Telekom_Outbound-6923169”. Similarly, “3112” goes via the outbound route “Deutsche-Telekom_Outbound-6923112” and “9517” goes via the outbound route “Deutsche-Telekom_Outbound-6929517”.
But all outgoing calls are always made via the outbound route “Deutsche-Telekom_Outbound-6923112”, so the people being called always see the number 6923112, even if the call is made from the number 6929517.
As soon as I change something in the outbound routes to “Trunk Sequence for Matched Routes”, it is no longer possible to make outbound calls:

-- Executing [recordcheck@sub-record-check:3] Return("PJSIP/89517-0000000d", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/89517-0000000d", "") in new stack
    -- Executing [01711252280@from-internal:3] Set("PJSIP/89517-0000000d", "_ROUTEID=7") in new stack
    -- Executing [01711252280@from-internal:4] Set("PJSIP/89517-0000000d", "_ROUTENAME=Deutsche-Telekom_Outbound-6923112") in new stack
    -- Executing [01711252280@from-internal:5] Set("PJSIP/89517-0000000d", "MOHCLASS=default") in new stack
    -- Executing [01711252280@from-internal:6] Set("PJSIP/89517-0000000d", "_CALLERIDNAMEINTERNAL=Office") in new stack
    -- Executing [01711252280@from-internal:7] Set("PJSIP/89517-0000000d", "_CALLERIDNUMINTERNAL=89517") in new stack
    -- Executing [01711252280@from-internal:8] Set("PJSIP/89517-0000000d", "_EMAILNOTIFICATION=FALSE") in new stack
    -- Executing [01711252280@from-internal:9] Set("PJSIP/89517-0000000d", "_NODEST=") in new stack
    -- Executing [01711252280@from-internal:10] Macro("PJSIP/89517-0000000d", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("PJSIP/89517-0000000d", "") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("PJSIP/89517-0000000d", "0?emergency,1") in new stack
    -- Executing [s@macro-outisbusy:3] GotoIf("PJSIP/89517-0000000d", "0?intracompany,1") in new stack
    -- Executing [s@macro-outisbusy:4] Playback("PJSIP/89517-0000000d", "all-circuits-busy-now&please-try-call-later, noanswer") in new stack

I’m looking for a solution, but can’t find one. Every time I get to this point, I have to restore the backup so that calling out works again, but with just one trunk.

I would be grateful if you could tell me how to debug the whole thing on the Asterisk CLI.

Best regards
Niclas

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