Substitute CallerId "+" with "00"

Hi,
is there an easy way to substitute any incoming CallerId beginning with + with 00? It would be helpful for telephones which only cut the + because they are not able to handle.
I’ve got a look at the Set CallerId module, but I don’t understand how to configure it.
Thanks for any help.
Paolo

You can write a simple incoming context based on the “from-pstn-e164-us” in the “/etc/asterisk/extensions.conf” file. Copy the context into the “/etc/asterisk/extensions_custom.conf” file and make your changes similar to the way this one make its changes.

Like Cynjut said:

Example to just remove a + sign:
Edit file extensions_custom.conf (with module 'config edit’
Insert the next content:

[from-trunk-remove-plus]
exten => _X!,1,GotoIf($["${CALLERID(num):0:1}" != “+”]?noplusatstart)
exten => _X!,n,Set(CALLERID(num)=${CALLERID(num):1})
exten => _X!,n(noplusatstart),Goto(from-trunk,${EXTEN},1)

In the inbound route in trunk settings, you add:

context=from-trunk-remove-plus

Test and done.
Success

1 Like

Hallo, thanks for all your answers.
I have solved the issue on the telephone side (Gigaset E630 GO). In facts, I didn’t declare the location in the regional settings. Now I have declared Switzerland (0041 and area code 0) and I I want to redial an incoming call, the +41 is replaced by 0041 and everything works fine.

Thanks
Paolo