[asterisk-users] Cut off last character of EXTEN

Gareth Blades mailinglist+asterisk at dns99.co.uk
Tue Aug 20 03:40:07 CDT 2013


On 20/08/13 09:29, Jonas Kellens wrote:
> 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.

Set(variable=${EXTEN:0:$[LEN(${EXTEN})-1]})

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130820/2474c16c/attachment.htm>


More information about the asterisk-users mailing list