[asterisk-users] Using SIPPEER status with CUT function? SOLVED

JR Richardson jmr.richardson at gmail.com
Wed Jan 20 14:57:38 CST 2010


On Wed, Jan 20, 2010 at 2:42 PM, JR Richardson <jmr.richardson at gmail.com> wrote:
> Hi All,
>
> I'm using Asterisk 1.4 branch and checking the status of some SIP
> Peers with the functions ${SIPPEER(101:status)} and the result is "OK
> (48 ms)".  Seems to work fine.
>
> Now I would like to use the function CUT to set a variable with the
> 'OK' portion of the status "OK (48 ms)" and then do some follow on
> stuff if the status is OK.
>
> I'm running into syntax errors in the Set command, I think due to the
> spaces in the SIPPEER status.
>
> Any suggestions on how to deal with the 'spaces' in the status?
>
Disregard, I figured it out:

Set(stat102cut=${CUT(stat102, ,1)})

Just put a space in the deliminator field.  I guess I could have tried
that first.

JR
-- 
JR Richardson
Engineering for the Masses



More information about the asterisk-users mailing list