[asterisk-users] how to strip +1 out of incoming number

Steve Edwards asterisk.org at sedwards.com
Thu Oct 2 14:25:35 CDT 2014


> On Thu, Oct 2, 2014 at 10:52 AM, motty cruz <motty.cruz at gmail.com> 
> wrote:

> Hello, our VoIP send us caller ID +1(area)(number) for instance 
> +16024224334 is there a way to strip +1 out of caller ID?

I've always done it as 2 steps to handle carrier weirdness:

; trim leading +1 from DNIS
         same = n,                       execif($["${DNIS:0:1}" = "+"]?set(DNIS=${DNIS:1}))
         same = n,                       execif($["${DNIS:0:1}" = "1"]?set(DNIS=${DNIS:1}))

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list