FreePBX | Register | Issues | Wiki | Portal | Support

Insert prefix before Caller ID


(Bill Mitchell) #1

PBXact version 12.7.5-1805-3.sng7. Customer dials 8 to make an external call. can I prepend the Caller ID with the prefix 8 so missed calls can be retuned from Sangoma phones?


(Lorne Gaetz) #2

You can configure Sangoma phones to add the prefix:
https://wiki.freepbx.org/display/PHON/Dial+Patterns

But the best solution IMO, is to allow dialing without a prefix.


(Bill Mitchell) #3

We may have solved it.
We created a custom context file:
[from-pstn-custom]
exten => _X.,1,Set(CALLERID(number)=8${CALLERID(number)});
exten => _X.,n,Goto(ext-did,${EXTEN},1);
exten => _X.,1,Set(CALLERID(number)=8${CALLERID(number)});
exten => _X.,n,Goto(ext-did,${EXTEN},1);

Then changed the context setting in the trunk/SIP settings/incoming to from-pstn-custom


(Tony Lewis) #4

Why would you just not add the 8 prepend from the GUI in outbound routes. No need for custom dialplan.


(Lorne Gaetz) #5

Very strongly recommend against using the context [from-pstn-custom]. I’m sure you have tested and confirm it’s working, but your are inadvertently overwriting FreePBX generated lines that are important for security. If you must alter inbound CID, then see this post for an example of a safer way of doing this: