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

C F shmaltz at gmail.com
Sun Aug 12 20:21:15 CDT 2007


After rereading this post, I belive that this could also be
acomplished doing this:
exten => _X.,1,GoSubIf($[${LEN(${CALLERID(num)})}>10]?strip1);if it's
longer than 10 digits grab the last 10 digits of the CIDNUM

exten => _X.,50(strip1),Set(CALLERID(num)=${CALLERID(num):-10})
;this grabs the last 10 digits of CALLERID(num) and sets it to CALLERID(num)
exten => _X.,n,Return()



On 8/12/07, C F <shmaltz at gmail.com> wrote:
> you can do like this:
> exten => _X.,1,GoSubIf($[${LEN(${CALLERID(num)})}>10]?strip1);if it's
> longer than grab the last 10 digits of the CIDNUM
> exten => _X.,50(strip1),Set(CALLERID(num)=${CALLERID(num):$[${LEN(${CALLERID(num)})}-10]});this
> grabs the last 10 digits of CALLERID(num) and sets it to CALLERID(num)
> exten => _X.,n,Return()
>
> Hope this helps.
>
> On 8/12/07, voiplist <gotvoip at gmail.com> 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?
> >
> > I have tried:
> > ;exten => +18664918575,1,Set(CALLERID(all)=${CALLERIDNAME} <${CALLERIDNUM:2}>)
> >
> > but it just yacks..
> >
> > Thanks in advance for any help.
> >
> > Regards,
> >  Todd R.
> >
> > --
> > Prestige Messaging
> > Live Answering Services
> > SIP or Toll-Free Connectivity
> > Light Accounts From $14.95/mo
> > http://www.PrestigeMessaging.com
> >
> > _______________________________________________
> > --Bandwidth and Colocation Provided by http://www.api-digital.com--
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
> >
>



More information about the asterisk-users mailing list