Formatting incoming caller ID

Hi there,

I’m trying to reformat the Caller ID associated to incoming calls for a specific trunk. Someone has suggested adding the below in extensions_custom.conf and pointing the context of the trunk to this context.

The caller ID doesn’t appear to be changed and I’m starting to tear my hair out!

What’s going wrong?

[from-trunk-custom]
exten => _X!,1,Set(CALLERID(num)=0${CALLERID(num):2:12})
exten => _X!,n,Goto(from-trunk,${EXTEN},1)

The typical incoming caller ID format would be 447123456789 (a UK mobile number as an example but prefixed with 44 and dropping the leading 0)

Thanks,

Paul

I’ve also just tried this, but it still doesn’t work:

[from-trunk-custom]
exten => X.,1,GotoIf($["${CALLERID(number):0:2}"!=“44”]?nochange)
exten => X.,n,Set(CALLERID(number)=0${CALLERID(number):2})
exten => _X.,n(nochange),Goto(from-trunk,${EXTEN},1)