You could put an adapted version of this text in your extensions_custom.conf
In this example I remove the country code of Austria “+43” and replace it with a “0”, then I remove the area code of Vienna “01”. For all other country codes I remove the “+” and replace it with “00”. That’s Europe specific…
[from-trunk-sip-innosoft-in]
exten => _.,1,ExecIf($[ "${CALLERID(name):0:3}" = "+43" ]?Set(CALLERID(name)=0${CALLERID(name):3}))
exten => _.,n,ExecIf($[ "${CALLERID(num):0:3}" = "+43" ]?Set(CALLERID(num)=0${CALLERID(num):3}))
exten => _.,n,ExecIf($[ "${CALLERID(name):0:2}" = "01" ]?Set(CALLERID(name)=${CALLERID(name):2}))
exten => _.,n,ExecIf($[ "${CALLERID(num):0:2}" = "01" ]?Set(CALLERID(num)=${CALLERID(num):2}))
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-trunk,${EXTEN},1)