[asterisk-users] Go from CALLINGout to just CALLING
Bob Beers
bob.beers at gmail.com
Tue Jan 4 07:08:10 CST 2011
On Tue, Jan 4, 2011 at 5:14 AM, Jonas Kellens <jonas.kellens at telenet.be> wrote:
> Hello list,
>
> how can I go from CALLINGout to just CALLING ?
>
> I've tried :
>
> exten => s,n,Set(newVAR=${CUT(CALLINGout,,3)})
> or
> exten => s,n,Set(newVAR=$[CUT(CALLINGout,,3)])
>
> But no result :
>
> [Jan 4 11:10:12] -- Executing [s at from-S:34] NoOp("SIP/s2-0000003b",
> "newVAR=") in new stack
>
>
> Asterisk 1.6.10 here.
>
I don't think CUT does what you think it does.
When using CUT, the second argument should be a delimiter, (hyphen,
pipe, comma, etc.)
I can't really tell what you are trying to achieve, but if CALLINGout
is the value
of a variable, say X, and you want just the first 6 characters, you
could use (maybe):
exten => s,n,Set(newVAR=${X:0:6})
HTH,
-Bob
More information about the asterisk-users
mailing list