[Asterisk-Users] Stripping numbers at the end of a dial pattern => extension

Girish Gopinath gopinath_girish at hotmail.com
Sun May 9 09:39:55 MST 2004


Hello,

>From: "Hermann Wecke" <hermann at wecke.com>
>Subject: [Asterisk-Users] Stripping numbers at the end of a dial pattern => 
>extensions.conf
>Date: 8 May 2004 22:03:57 +0000
>
>Is it possible to strip some numbers from the *end* of a number?
>
>I know that ${EXTEN:1} will remove 1 position from the beggining... but
>how to remove N numbers from the end?

Use ${variable:pos:n}. This will give you 'n'  digits from the position 
'pos'.
exten => 12345, 1, SetVar,MYDIGITS=${EXTEN:2,3} ; MYDIGITS = 2345.
Also, there is Substring application available with Asterisk, but it is 
deprecated i think...

HTH, Girish

_________________________________________________________________
Post Classifieds on MSN classifieds. http://go.msnserver.com/IN/44045.asp 
Buy and Sell on MSN Classifieds.




More information about the asterisk-users mailing list