Change Caller ID

My SIP provider CallerID comes in the format +44123456789 but my database uses 0123456789 so I need a way of changing it, these are DID numbers so there is no trunk to set it in.

I managed to find a way to do it in early versions of Asterisk but I’m using 1.4 and can’t figure it out, any help would be most appreciated.

You can pick-off and fixup the CID number with something along the line of,

exten => _.,1,Set(myCID="0${CALLERID(num):3}")
exten => _.,n,...${myCID}...

As to where in the dial plan you’d put this depends. You say, “these are DID numbers so there is no trunk.” Well … the DIDs are arriving on some for of technology/exten type. And you’ve said “SIP” provider. You’ll need to share that info here.

# asterisk -r
CLI> core set verbose 3
CLI> ...

Then make the calls. The CLI will show the call flow through the dial plan. Paste it here (sanitize out your real telephone numbers).

/S