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. Kind regards, Jonas. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110104/2d2d4bf1/attachment.htm>
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
Possibly Parallel Threads
- Deciles and R
- Efficiently creating/defining new variables transformations
- Losing factor levels when moving variables from one context to another
- If statement - copying a factor variable to a new variable
- AGI solution to Grandstream BT102 call waiting problem