[Asterisk-Users] How to use the Cut() command to chop off an ending character

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Sun Oct 26 23:54:33 MST 2003


On Friday 24 October 2003 13:23, Adams, Gavin wrote:
> So, I would like to be able to selectivity chop off any # characters
> at the end of string, only if they exist. Basically as follows
> (chopping off the leading '9' with ${EXTEN:1} syntax:

exten => _X.,1,Cut(newexten=EXTEN,#,1)
exten => _X.,2,Goto(${newexten}|3)
exten => _X.,3,WhateverElse

-Tilghman




More information about the asterisk-users mailing list