Custom context in extension custom

hello, I use extensions_custom.conf to make my own context:

[from-pstn-custom]
exten => 1234, 1, NoOp("Incomming from O2 SIP Trunk from ${CALLERID(num)} to ${EXTEN}")
exten => 1234, 2, Set(CALLERID(num)=anonymous)
exten => 1234, 3, NoOp(Cislo je: ${CALLERID(all)})
exten => 1234, 4, GotoIf($["${CALLERID(num)}"= "anonymous"]?MUJSKOK)
exten => 1234, n(MUJSKOK), Goto(from-trunk,${EXTEN},1)

In PJSIP Trunk settings I´m pointing to this custom context at line “Context:”

but when i make a call this happen:

 Executing [1234@from-pstn-custom:1] NoOp("PJSIP/VoiceBlue-00000004", ""Incomming from O2 SIP Trunk from  to 1234"") in new stack
    -- Executing [1234@from-pstn-custom:2] Set("PJSIP/VoiceBlue-00000004", "CALLERID(num)=anonymous") in new stack
    -- Executing [1234@from-pstn-custom:3] NoOp("PJSIP/VoiceBlue-00000004", "Cislo je: "" <anonymous>") in new stack
    -- Executing [1234@from-pstn-custom:4] GotoIf("PJSIP/VoiceBlue-00000004", "1?MUJSKOK") in new stack
    -- Goto (from-pstn-custom,1234,5)
    -- Executing [1234@from-pstn-custom:5] Goto("PJSIP/VoiceBlue-00000004", "from-trunk,1234,1") in new stack
    -- Goto (from-trunk,1234,1)
    -- Executing [1234@from-trunk:1] NoOp("PJSIP/VoiceBlue-00000004", ""Incomming from O2 SIP Trunk from anonymous to 1234"") in new stack
    -- Executing [1234@from-trunk:2] Set("PJSIP/VoiceBlue-00000004", "CALLERID(num)=anonymous") in new stack
    -- Executing [1234@from-trunk:3] NoOp("PJSIP/VoiceBlue-00000004", "Cislo je: "" <anonymous>") in new stack
    -- Executing [1234@from-trunk:4] GotoIf("PJSIP/VoiceBlue-00000004", "1?MUJSKOK") in new stack
    -- Goto (from-trunk,1234,5)
    -- Executing [1234@from-trunk:5] Goto("PJSIP/VoiceBlue-00000004", "from-trunk,1234,1") in new stack
    -- Goto (from-trunk,1234,1)
    -- Executing [1234@from-trunk:1] NoOp("PJSIP/VoiceBlue-00000004", ""Incomming from O2 SIP Trunk from anonymous to 1234"") in new stack
    -- Executing [1234@from-trunk:2] Set("PJSIP/VoiceBlue-00000004", "CALLERID(num)=anonymous") in new stack
    -- Executing [1234@from-trunk:3] NoOp("PJSIP/VoiceBlue-00000004", "Cislo je: "" <anonymous>") in new stack
    -- Executing [1234@from-trunk:4] GotoIf("PJSIP/VoiceBlue-00000004", "1?MUJSKOK") in new stack
    -- Goto (from-trunk,1234,5)
    -- Executing [1234@from-trunk:5] Goto("PJSIP/VoiceBlue-00000004", "from-trunk,1234,1") in new stack
    -- Goto (from-trunk,1234,1)

And it is going same loop again and again…
Why It look like it processing trom-trunk general context but it is actualy my frompstn-custom context?

The following isn’t from the official repository, but I assume it is essentially the same and didn’t want to spend time finding the official version. Given that, it is because from-trunk includes from-pstn and from-pstn includes from-trunk-custom.

1 Like

Hello,

Thank you for the explanation. Unfortunately, I do not have any solution on my mind right now because I actually create a loop every time by your explanation.

Can you think of a way to resolve this? Should I refer to some specific context? Or should I change my context from “from-trunk-custom” to, for example, “from-provider” in trunk settings?

Thank you for any advice.

Mnemonically name the context you will create “from-voiceblue” but otherwise, yes which ultimately sends he call to “from-trunk”

Thank you for solution, unfortunately my english is not so well, so only for sure:

In PJSIP Trunk configuration I type from-voiceblue to “Context:” line

and in extensions_custom.conf I rename from-pstn-custom to from-voiceblue also.

And that´s do the trick?

Sounds about right

Thank you so much!!

1 Like

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