[asterisk-users] How strip +1 from caller id on inbound call

Trevor Peirce tpeirce at digitalcon.ca
Sun Aug 12 20:07:08 CDT 2007


voiplist wrote:
> From some of our telecom providers we get the caller-id as:
> NXXNXXXXXX
>
> From others we get:
> +1NXXNXXXXXX
>
> We are trying to standardize the way our caller-id comes in so we
> would like to strip off the +1 from the inbound caller id.
>
> Can anyone offer any suggestions?
>   
This is untested, but I think something like this ought to do it-

exten => s,n,ExecIf($["${CALLERID(num):0:1}" = "1"], Set, 
CALLERID(num)=${CALLERID(num):1})

Trevor

-- 
Does your Canadian VoIP service need CRTC-compliant 9-1-1 services?  Please
visit http://www.digitalcon.ca/voip9-1-1/ to find out more!




More information about the asterisk-users mailing list