On Thu, Mar 26, 2009 at 7:50 PM, Evgeny Miloslavsky
<[email protected]> wrote:
> Hi and thanks for such a quick response J
>
> I’m testing header manipulation feature of mu DUT. I set a rule to modify
> Max-Forwards value toward UAS to 10.
>
> All I want is to validate at SIPp-UAS side that INVITE request is received
> with Max-Forwards: 10.
>
> Meanwhile I’m using
>
>   <recv request="INVITE">
>     <action>
>        <ereg regexp="10" search_in="hdr" header="Max-Forwards:"
> check_it="true" assign_to="1"/>
>     </action>
>   </recv>
>
> Is there any other way to do what I need?

The way is fine but the regexp is wrong. It will search for "10"
inside the header, and not that the header value is "10" (so it will
match "100", "210" etc).
You should use something like this (but i haven't tested):
regexp="^\s*10\s*$"

The above will:
- anchor the check at the beginning of the header value (^)
- accept zero or more whitespaces before the "10" (\s*)
- match 10
- accept zero or more whitespaces after the "10" (\s*)
- ensure nothing else appears in the header value ($)

regards,
takeshi

------------------------------------------------------------------------------
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to