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

James Collier james.collier at xtratelecom.es
Tue Aug 14 00:49:44 CDT 2007


What if it is an international call?  Then your callerID won't work.



-----Mensaje original-----
De: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com]En nombre de C F
Enviado el: lunes, 13 de agosto de 2007 3:21
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Asunto: Re: [asterisk-users] How strip +1 from caller id on inbound call


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
> >
>

_______________________________________________
--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