[Asterisk-Users] Howto cut the first digit
Trevor Raynsford
Trevor.Raynsford at ACULAB.COM
Fri Mar 31 05:41:38 MST 2006
Christian Reelfs wrote:
> example:
> 044612345
> should be after cut operation:
> 44612345
>
> My try in the extension.conf:
> exten => _0[0-9].,2,Cut(mynum=EXTEN,/ ,1)
> exten => _0[0-9].,3,Dial(Zap/g1/${mynum},90,T)
>
> but it didn't work, my problem is the delemiter, I have no delemiter,
> the default is "-" but how to use the function cut() without an delemiter?
> Just snip the first digit of a phonenumber.
Use the substring notation as in:
${mynum:1}
which snips the first character from the string.
See the docs for more info
http://www.voip-info.org/wiki/view/Asterisk+variables
Trevor Raynsford
Software Engineer
Aculab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060331/640cd196/attachment.htm
More information about the asterisk-users
mailing list