ject: [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.
&
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steven Howes
Sent: Tuesday, August 20, 2013 7:38 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Cut off last character of EXTEN
On 20 Aug
On 20 Aug 2013, at 12:25, Pat Collins wrote:
> Here ya go:
>
> 112233# use ${EXTEN:0:6})
> 123# use ${EXTEN:0:3})
> 123456789# use ${EXTEN:0:9})
I think 'variable length' implied 'unknown length'...
S--
_
-- Bandwidth and Col
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
Damn it!
Try: "${EXTEN:0:-1}"
jg
--
_
-- 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
aste
On 08/20/2013 10:40 AM, Gareth Blades wrote:
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
Hi,
try
[testEx]
exten => _X.,1,noop(${EXTEN})
same => n,noop(len: ${LEN(${EXTEN})})
same => n,noop(${EXTEN:0:${MATH(${LEN(${EXTEN})}-1)}})
exten => _X.,n,hangup
On 20 August 2013 12:15, Jonas Kellens wrote:
> On 08/20/2013 10:47 AM, jg wrote:
>
> How about "${EXTEN:-1:1}"?
>
> "The Definiti
On 08/20/2013 10:47 AM, jg wrote:
How about "${EXTEN:-1:1}"?
"The Definitive Guide" has a special paragraph with the title "*More
Advanced Digit Manipulation".*
jg
Same result : #
Jonas.
--
_
-- Bandwidth and Colocation
How about "${EXTEN:-1:1}"?
"The Definitive Guide" has a special paragraph with the title "*More Advanced Digit
Manipulation".*
jg
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join
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=${
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.
--
___
11 matches
Mail list logo