On Tuesday 01 July 2008 10:48:55 Tilghman Lesher wrote:
> On Tuesday 01 July 2008 09:20:52 Administrator TOOTAI wrote:
> > does anybody know how to cut a chain using the pipe delimiter? I tried
> > to escape it or to use $'x7c' as delimiter, no luck.
>
> 1.2 does not support escaping at all.  1.4 accepts only escapes relating to
> space characters (\t, \r, \n).  1.6 supports the space characters, plus
> hexadecimal (\xNN) and octal (\0NNN) escapes.

Oh, there is a way to do what you want in 1.4, although it is non-obvious, due
to the insane amount of escaping that needs to be done:

exten => 8122,1,NoOp(${SET(string=one|two|three|four)})
exten => 8122,n,NoOp(${CUT(string,\\|,2)})

    -- Executing [EMAIL PROTECTED]:1] NoOp("SIP/vidphone-0824ba08", 
"one|two|three|
four") in new stack
    -- Executing [EMAIL PROTECTED]:2] NoOp("SIP/vidphone-0824ba08", "two") in 
new 
stack

Note that this insane escaping has been corrected in 1.6.0.

-- 
Tilghman

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to