Charles,
Thanks for responding. That scenario does look like it will work, but I was
certainly unaware of the existence of the "strcmp" and "nop" actions, as well
as the "condexec" action modifier. I don't see these items in the
documentation anywhere. I guess I could grep through the codebase and try to
figure out all the sundry options available to me and how they work, but that
was a bit more than I was originally hoping for.
In any case, when I try this:
<recv response="200" optional="true" next="1">
<action>
<ereg regexp=".*" search_in="hdr" header="Contact:"
assign_to="contact"/>
<strcmp assign_to="compareval" variable="contact" value="" />
<test assign_to="empty" variable="compareval" value="0" test="equal"
/>
</action>
</recv>
<nop condexec="empty">
<action>
<error message="Server header is present.">
</action>
</nop>
I get this result:
"strcmp 'assign_to' parameter, "compareval" is not a valid integer!"
BTW, my sipp version is: SIPp v2.0-TLS, version 20071128, built Jan 7 2008,
16:31:36
Any ideas?
Jeffrey Wright
System Test Engineering Manager
Aztek Networks, Inc.
-----Original Message-----
From: Charles P Wright [mailto:[EMAIL PROTECTED]
Sent: Sat 8/16/2008 7:14 PM
To: Jeff Wright
Cc: Anonymous Incognito; [email protected]; [EMAIL PROTECTED]
Subject: Re: [Sipp-users] check_it
My best suggestion would be to assign the captured value to a variable,
something like (not 100% sure on syntax, but this should sketch the plan
for you); then strcmp it to an empty string (returns 0 if equal), and test
on the strcmp return.
<recv>
<ereg assign_to="server" search_in="header" header="Server:" regexp=".*"
/>
<strcmp assign_to="compareval" variable="server" value="" />
<test assign_to="empty" variable="compareval" value="0" test="equal" />
</recv>
<nop condexec="empty">
<action>
<error message="Server header is present.">
</action>
</nop>
Charles
"Jeff Wright" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
08/16/2008 12:35 PM
To
"Anonymous Incognito" <[EMAIL PROTECTED]>,
<[email protected]>
cc
Subject
Re: [Sipp-users] check_it
This is the exact same thing I need to do (see my post from a couple of
days ago). Please let me know if you find out a way to do it.
Jeffrey Wright
System Test Engineering Manager
Aztek Networks, Inc.
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Anonymous
Incognito
Sent: Sat 8/16/2008 6:50 AM
To: [email protected]
Subject: [Sipp-users] check_it
Hi ,
I would like to write a scenario as below.
Search the SIP message for the presence of a header, Server (for
example). If it is present then I would like to fail the call. I am
not able to achieve it using check_it.
Cheers
David
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users