On Mon, Mar 30, 2009 at 4:48 PM, Evgeny Miloslavsky
<[email protected]> wrote:
> Hi All.
>
> I want to validate that my DUT removes NOTIFY value from Allow header.
>
> For doing so I want SIPp-UAS to sign call as failed in case there is
> “NOTIFY” string within Allow header.
>
> I thought of using check_it, but check_it will sign call as failed in case
> regex is not found within given header. In my case it is an opposite: I want
> to fail a call in case given regex is found.
Hello,
I don't know if there is a simpler way, but if I had to do it, i would
try something like this (not tested):
<recv request="INVITE" crlf="true">
<action>
<assignstr assign_to="notify_slot" value="ok" />
<ereg regexp="NOTIFY" search_in="hdr" header="Allow:"
assign_to="notify_slot" check_it="false" />
<ereg regexp="ok" search_in="var" variable="notify_slot"
assign_to="notify_slot" check_it="true" />
</action>
</recv>
Rationale:
We set variable notify_slot to "ok" then we try to match the "NOTIFY"
in the header Allow.
If the match succeeds, notify_slot will be modified to contain
"NOTIFY". If "NOTIFY" is not found, then notify_slot will stay the
same.
So we just have to run a ereg against notify_slot and if it doesn't
contain "ok" the call will be marked as failed.
regards,
takeshi
------------------------------------------------------------------------------
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users