[asterisk-users] Cut off last character of EXTEN
Pat Collins
drdialtone at optonline.net
Tue Aug 20 06:25:38 CDT 2013
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at 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})
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130820/e0f6831d/attachment.htm>
More information about the asterisk-users
mailing list