Having this issue on Callcentric and have read quite a bit and have learned a lot. I’m having some trouble understanding some behavior that’s keeping things from working. DID number in the logs changed to 19993334444 to protect the innocent. After reading a lot of guides (Callcentric’s, FreePBX “How to get the DID…”, and others) I found the “from-pstn-toheader” context which looked like it did what I wanted.
If I have:
trunk (callcentric) configured with “context=from-pstn-toheader” in the PEER Details
route configured as “any DID / any CID”
I get the following in my logs:
Executing [[email protected]:1] Goto(“SIP/callcentric-00000010”, “from-pstn,19993334444,1”) in new stack
Goto (from-pstn,19993334444,1)
Executing [[email protected]:1] NoOp(“SIP/callcentric-00000010”, “Catch-All DID Match - Found 19993334444 - You probably want a DID for this.”) in new stack
Executing [[email protected]:2] Set(“SIP/callcentric-00000010”, “__FROM_DID=19993334444”) in new stack
Executing [[email protected]:3] Goto(“SIP/callcentric-00000010”, “ext-did,s,1”) in new stack
Goto (ext-did,s,1)
Executing [[email protected]:1] ExecIf(“SIP/callcentric-00000010”, “0?Set(__FROM_DID=s)”) in new stack
I agree! I do want a DID for this! So if I change my “any DID / any CID” route to have my incoming “DID Number” I get the following when I call:
Executing [[email protected]:1] NoOp(“SIP/66.193.176.35-00000012”, “No DID or CID Match”) in new stack
Executing [[email protected]:2] Answer(“SIP/66.193.176.35-00000012”, “”) in new stack
Executing [[email protected]:3] Wait(“SIP/66.193.176.35-00000012”, “2”) in new stack
Executing [[email protected]:4] Playback(“SIP/66.193.176.35-00000012”, “ss-noservice”) in new stack
Annnd that confuses me. No longer is the initial context the “from-pstn-toheader” but it goes right to “from-pstn” which obviously has no proper DID argument at this point.
With the “any DID / any CID” case you can see that “context=from-pstn-toheader” is being honored and the DID is being extracted properly. In fact, I can succesfully go to any custom context. As soon as I remove the catch all “any DID / any CID” the context in my PEER details appears to be ignored and from-pstn is always used.
Can anyone help? It should be “easy”.