wups, that XML should look like this: <action> <ereg regexp="a=bad_field" search_in="body" assign_to="badstring"/> <assignstr assign_to="new_str" value="XXX[$badstring]YYY" /> <ereg regexp="XXXYYY" search_in="var" assign_to="match" check_it="true" variable="new_str"/> <action>
not this: value="XXX[$sdp_str]YYY" -----Original Message----- From: David White [mailto:[email protected]] Sent: Thu 5/6/2010 10:09 AM To: [email protected] Subject: Re: [Sipp-users] regexp negate match ok, I think I have a method that will work, though it's hardly elegant: <action> <ereg regexp="a=bad_field" search_in="body" assign_to="badstring"/> <assignstr assign_to="new_str" value="XXX[$sdp_str]YYY" /> <ereg regexp="XXXYYY" search_in="var" assign_to="match" check_it="true" variable="new_str"/> <action> if "XXXYYY" matches, I know that "a=bad_field" didn't appear in SDP body, and regexp will pass ($badstring is assigned ''). if it doesn't match, "a=bad_field" did appear and now I can make the call fail. does anyone know if there's a better way to do this, or is this it? -----Original Message----- From: David White [mailto:[email protected]] Sent: Thu 5/6/2010 7:10 AM To: [email protected] Subject: Re: [Sipp-users] regexp negate match alternatively, from the sipp documentation I can match a string and set a variable to true/false based on the match <nop> <action> <!-- Compare the value of $strvar to "Hello" and assign it to $result.. --> <strcmp assign_to="result" variable="strvar" value="Hello" /> </action> </nop> but can I use this value to pass/fail a call, in the same way that regexp "check_it" works? -----Original Message----- From: David White [mailto:[email protected]] Sent: Wed 5/5/2010 7:38 PM To: [email protected] Subject: [Sipp-users] regexp negate match does anyone know if sipp regexp supports match negating? I want to make sure a string *doesn't" appear in a SIP body (eg I want the value to be empty). <action> <ereg regexp="a=bad_field" search_in="body" check_it="true"/> <action> this results in a "pass" if the bad field exists, but I want a "fail" alternatively, <action> <ereg regexp="!a=bad_field" search_in="body" check_it="true"/> <!-- or --> <ereg regexp="!/a=bad_field/" search_in="body" check_it="true"/> <action> don't seem to cut it either. any ideas?
------------------------------------------------------------------------------
_______________________________________________ Sipp-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sipp-users
