Re: [asterisk-users] How strip +1 from caller id on inbound call
Am Dienstag, den 14.08.2007, 09:06 -0500 schrieb Brandon Kruse: I just use exten = +12564286115,1,Goto(${EXTEN:1}) exten = 12564286115,1,noop(It worked.) I believe that should work That rewrites the callee number, not the CALLERID, so no, it would not work for Todd's original problem. BR Anselm ___ --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
Re: [asterisk-users] How strip +1 from caller id on inbound call
On 8/14/07, James Collier [EMAIL PROTECTED] wrote: What if it is an international call? Then your callerID won't work. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote: From some of our telecom providers we get the caller-id as: NXXNXX From others we get: +1NXXNXX 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 ___ --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 Yeah, that's a problem.. I guess I may be stuck with the +1 because it more right than wrong. Maybe I can just add a +1 to the others which will be much easier and make it all standard.. Thanks for that, I am sure I would have run into it eventually but it's always nice to not just run into things :-) 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
Re: [asterisk-users] How strip +1 from caller id on inbound call
Am Sonntag, den 12.08.2007, 21:16 -0400 schrieb C F: 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() Argh! You do not ever get international calls, do you? (Well, Canada does not count here for obvious reasons) The clean solution to the question I get some calls with a leading +1. If that is the case, how do I strip that off? is of course If the CALLERID(num) starts +1, re-set it to the same value, offset 2: ... exten = _X.,n,GoSubIf($[${CALLERID(num):0:2} = +1]?strip1) ... exten = _X.,n(strip1),Set(CALLERID(num)=${CALLERID(num):2}) exten = _X.,n,Return() Which leaves international calls for themselves. Of course you still could replace the leading + for all other numbers by 011, if you like. Your code would probably handle +12125551212 correctly, would work OK with +495924236 (which might or might not be one of the old, short numbers still present in some places in Germany), leaving it intact, but not with +4916177554224 which would be remapped to a Boston MA number (actually a Cingular cell phone number) instead of mapping it to a german mobile phone. Variable handling (offset et al) is documented on http://www.voip-info.org/wiki/view/Asterisk+variables BR Anselm ___ --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
Re: [asterisk-users] How strip +1 from caller id on inbound call
If you want remove in CALLERID. you can remove it this way: exten= _X./_+1X.,1, Set() ok? good luck! Thiago Maluf. 2007/8/14, Anselm Martin Hoffmeister [EMAIL PROTECTED]: Am Sonntag, den 12.08.2007, 21:16 -0400 schrieb C F: 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() Argh! You do not ever get international calls, do you? (Well, Canada does not count here for obvious reasons) The clean solution to the question I get some calls with a leading +1. If that is the case, how do I strip that off? is of course If the CALLERID(num) starts +1, re-set it to the same value, offset 2: ... exten = _X.,n,GoSubIf($[${CALLERID(num):0:2} = +1]?strip1) ... exten = _X.,n(strip1),Set(CALLERID(num)=${CALLERID(num):2}) exten = _X.,n,Return() Which leaves international calls for themselves. Of course you still could replace the leading + for all other numbers by 011, if you like. Your code would probably handle +12125551212 correctly, would work OK with +495924236 (which might or might not be one of the old, short numbers still present in some places in Germany), leaving it intact, but not with +4916177554224 which would be remapped to a Boston MA number (actually a Cingular cell phone number) instead of mapping it to a german mobile phone. Variable handling (offset et al) is documented on http://www.voip-info.org/wiki/view/Asterisk+variables BR Anselm ___ --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 -- THIAGO MALUF RESENDE Consultor Voip e Programador WEB (Voip Developer and Web Developer) Tel: +55 21 86042100 e-mail: [EMAIL PROTECTED] ___ --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
Re: [asterisk-users] How strip +1 from caller id on inbound call
I just use exten = +12564286115,1,Goto(${EXTEN:1}) exten = 12564286115,1,noop(It worked.) I believe that should work -bk - Original Message - From: Thiago Maluf [EMAIL PROTECTED] To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Sent: Tuesday, August 14, 2007 4:25:57 AM (GMT-0800) America/Tijuana Subject: Re: [asterisk-users] How strip +1 from caller id on inbound call ___ --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
Re: [asterisk-users] How strip +1 from caller id on inbound call
On 8/12/07, C F [EMAIL PROTECTED] wrote: 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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote: From some of our telecom providers we get the caller-id as: NXXNXX From others we get: +1NXXNXX 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 Thanks for all the feedback fellas, I will give all of these a try and see what happens. I will report back my results. 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
Re: [asterisk-users] How strip +1 from caller id on inbound call
What if it is an international call? Then your callerID won't work. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote: From some of our telecom providers we get the caller-id as: NXXNXX From others we get: +1NXXNXX 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 ___ --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
[asterisk-users] How strip +1 from caller id on inbound call
From some of our telecom providers we get the caller-id as: NXXNXX From others we get: +1NXXNXX 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
Re: [asterisk-users] How strip +1 from caller id on inbound call
voiplist wrote: From some of our telecom providers we get the caller-id as: NXXNXX From others we get: +1NXXNXX 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! ___ --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
Re: [asterisk-users] How strip +1 from caller id on inbound call
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 [EMAIL PROTECTED] wrote: From some of our telecom providers we get the caller-id as: NXXNXX From others we get: +1NXXNXX 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
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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote: From some of our telecom providers we get the caller-id as: NXXNXX From others we get: +1NXXNXX 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