Hello,
{$EXTEN:1} is used for dropping the first digit. But hot to get rid of
the last digit? Is it possible?
--
Best regards,
Bartosz Piec
Bartosz Piec wrote:> Hello, > > {$EXTEN:1} is used for dropping the first digit. But hot to get rid of > the last digit? Is it possible? >-1 :) -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://freevoip.gedameurope.com (Free Asterisk Voip Community) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)
Matt Riddell napisa?(a):> What does that result in?I have this in extensions.conf: exten => _XX*,1,NoOp(${EXTEN:-LEN(${EXTEN:1})}) And when I dial 61*, the result in Asterisk console is: -- Executing NoOp("SIP/65-aad1", "61*") in new stack just like with ${EXTEN}. -- Best regards, Bartosz Piec
Matt Riddell napisa?(a):> What do you want 61* to become?Checking the voicemail of 61 number. -- Best regards, Bartosz Piec
exten => _XX*,1,NoOp(${EXTEN:0:-1})
?
Bartosz Piec wrote:> Matt Riddell napisa?(a):
>
>> What does that result in?
>
>
> I have this in extensions.conf:
> exten => _XX*,1,NoOp(${EXTEN:-LEN(${EXTEN:1})})
>
> And when I dial 61*, the result in Asterisk console is:
> -- Executing NoOp("SIP/65-aad1", "61*") in new
stack
> just like with ${EXTEN}.
>
Erik napisa?(a):> exten => _XX*,1,NoOp(${EXTEN:0:-1})exten => _XX*,1,NoOp(${EXTEN:0:2}) :) It works, thanks. -- Best regards, Bartosz Piec
Here is what I do:
${EXTEN:0:$[${LEN(${EXTEN})} - 1]}
that should give you for the following
exten => 123456789,1,Noop(${EXTEN:0:$[${LEN(${EXTEN})} - 1]})
12345678
Hope this helps.
On 11/7/05, Bartosz Piec <sip@piec.info> wrote:> Erik napisa?(a):
> > exten => _XX*,1,NoOp(${EXTEN:0:-1})
>
> exten => _XX*,1,NoOp(${EXTEN:0:2})
> :)
>
> It works, thanks.
>
> --
> Best regards,
> Bartosz Piec
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
>
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>