On Tue, Jan 4, 2011 at 5:14 AM, Jonas Kellens <[email protected]> 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 [...@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
--
_____________________________________________________________________
-- 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
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users