Hello, is it possible that the +49 in the beginning from an incomming call automaticly changed to 0?
In the file /etc/asterisk/extensions.conf, youβll find a context from-pstn-e164-us.
Using that as a guide, create from-pstn-e164-de and put that in /etc/asterisk/extensions_custom.conf (in addition to anything that may already be there).
I assume that you want e.g. +493022222222 -> 03022222222 and +33122222222 -> 0033122222222.
Note that if you forward calls to external numbers and wish to send the number of the original caller as caller ID, youβll need a hook to change the number back to E.164 format.
e.g. something like this
[from-trunk-sip-YourTrunksName-in]
exten => _.,1,ExecIf($[ β${CALLERID(name):0:3}β = β+49β ]?Set(CALLERID(name)=0${CALLERID(name):3}))
exten => _.,n,ExecIf($[ β${CALLERID(num):0:3}β = β+49β ]?Set(CALLERID(num)=0${CALLERID(num):3}))
exten => _.,n,ExecIf($[ β${CALLERID(name):0:5}β = β01234β ]?Set(CALLERID(name)=${CALLERID(name):5}))
exten => _.,n,ExecIf($[ β${CALLERID(num):0:5}β = β01234β ]?Set(CALLERID(num)=${CALLERID(num):5}))
exten => _.,n,ExecIf($[ β${CALLERID(name):0:1}β = β+β ]?Set(CALLERID(name)=00${CALLERID(name):1}))
exten => _.,n,ExecIf($[ β${CALLERID(num):0:1}β = β+β ]?Set(CALLERID(num)=00${CALLERID(num):1}))
exten => _.,n,goto(from-pstn,${EXTEN},1)
thats the section in my extensions_custom.cfg
First it removes +49 and replaces it with 0
than it removes the areacode of my hometown (5 digits in my case, including the leading 0)
finally it removes the + in case it is a call from a foreign European country and adds 00
you have to adapt it to your needsβ¦
β¦if you use a pjsip trunk, change sip to pjsipβ¦
you can use the freePBX config edit module!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.