From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jonas Kellens
Sent: Tuesday, August 20, 2013 4:29 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Cut off last character of EXTEN

 

Hello,

how can I cut off the last character of the EXTEN-variable with variating
length ?

So I have :

112233#
123#
123456789#

I want to cut off the last character.

${EXTEN:-1} gives me #, but that is the character I want to cut off.



Kind regards,
Jonas.

 

Here ya go:

 

112233# use ${EXTEN:0:6})

123# use ${EXTEN:0:3})

123456789# use ${EXTEN:0:9})

 

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to