[Asterisk-Users] Howto cut the first digit

Pete Barnwell peter at whole-uk.com
Fri Mar 31 05:13:45 MST 2006


On Fri, 2006-03-31 at 14:03 +0200, Christian Reelfs wrote:
> Hi, sorry for this noop question,
> but does anybody know how to cut the first digit of a variable?
> 
> 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)
> 

Try just:

exten => _[0-9].,1,Dial(Zap/g1/${EXTEN:1})

Pete




More information about the asterisk-users mailing list