Hi List; How can I convert some digits to another digits, and how I can insert in the end or in the begining some digits, for example: If I have a number like 11336784888, then I need to replace each digit of value 1 by 5, how? Also how can I add digits to the numbers like adding 00 in the beginning, so the dialed number becoming: 0011336784888 or adding digits (like 99) in the end of the dialed number, so it will become: 001133678488899, how? Regards Bilal ____________________________________________________________________________________ Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/
Mojo with Horan & Company, LLC
2007-Jul-03 23:32 UTC
[asterisk-users] Digit Convesion and Digit Insertion
bilal ghayyad wrote:> Also how can I add digits to the numbers like adding > 00 in the beginning, so the dialed number becoming:NUMBER=11336784888 exten => 1000,n,Set(NUMBER=00${NUMBER})> 0011336784888 or adding digits (like 99) in the end of > the dialed number, so it will become: 001133678488899,NUMBER=11336784888 exten => 1000,n,Set(NUMBER=${NUMBER}99) For the substitution bit, changes all ones to fives, I don't know a native way to do it. Until someone told me a better way to do it, I might use AGI, although the overhead would probably kill a busy system -- I've only got up to three concurrent calls so I can waste the processing cycles. Moj