Re: [Sipp-users] check_it

2008-08-18 Thread Charles P Wright
Nop is descibed in the documentation:
http://sipp.sourceforge.net/doc3.0/reference.html#Create+your+own+XML+scenarios

The strcmp and condexec attributes are new and are not yet documented (I 
only managed to get motivated to do documentation before a release).

To use these actions/modifiers, you'll need to get the SVN trunk version.

Charles

Jeff Wright [EMAIL PROTECTED] wrote on 08/17/2008 12:28:16 PM:

 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; sipp-users@lists.sourceforge.net; sipp-
 [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],
 sipp-users@lists.sourceforge.net
 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: sipp-users@lists.sourceforge.net
 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=100url=/
 ___
 Sipp-users mailing list
 Sipp-users@lists.sourceforge.net
 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=100url=/
 ___
 Sipp-users mailing list
 Sipp-users@lists.sourceforge.net
 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=100url=/
___
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users


Re: [Sipp-users] Error message: Variable is referenced 1 times!

2008-08-18 Thread Jeff Wright
Just as an FYI to anyone out there struggling with this same issue: I was able 
to work around this by embedding an extra line that sends a dummy log mssage 
to stdout in the action sections as follows:

  recv response=200
action
  ereg regexp=.* search_in=hdr header=Contact: check_it=false 
assign_to=dummy1/
  log message=IGNORE: [$dummy1]/
/action
  /recv

Unfortunately, this breaks any backwards compatibility with my old 2.0.1 
executable.  If these modified scripts are run against old 2.0.1 sipp, I get a 
Segmentation Fault.

Anyway, just an update.  My original question remains: Is it really necessary 
for sipp to check variable usage?

Jeffrey Wright
System Test Engineering Manager
Aztek Networks, Inc.



-Original Message-
From: [EMAIL PROTECTED] on behalf of Jeff Wright
Sent: Mon 8/18/2008 10:29 AM
To: sipp-users@lists.sourceforge.net
Subject: [Sipp-users] Error message: Variable is referenced 1 times!
 
Since migrating to sipp 3.1 (from sipp 2.0.1), the old scenario files that used 
to work for me now don't.  I get the telltale VAriable referenced 1 times! 
error message and the script terminates.

I looked through this mail list's archives and discovered that there were 
checks put into place that cause this error when a assign_to is made w/o using 
the assigned variable later on.  Unfortunately, I think there's a flaw of logic 
here, because if I remove the assign_to statement for the supposedly offending 
variable, sipp then complains that I have to use an assign_to for my regexp!

First, I run *with* the assign_to in place:

  recv request=INFO
action
  ereg regexp=tag=[^;]+ search_in=hdr header=To: check_it=true 
assign_to=dummy1/
  ereg regexp=tag=[^;]+ search_in=hdr header=From: check_it=true 
assign_to=dummy2/
/action
  /recv

which results in:

sipp 172.22.20.55 -sf successful_call.xml -inf clients.csv -l 1 -i 
172.22.20.186 -p 5063 -m 1 2008-08-18  10:21:22:3921219076482.392181: 
Variable $dummy1 is referenced 1 times!

Then I remove the assign_to:

  recv request=INFO
action
  ereg regexp=tag=[^;]+ search_in=hdr header=To: check_it=true/
  ereg regexp=tag=[^;]+ search_in=hdr header=From: check_it=true 
assign_to=dummy2/
/action
  /recv

and this results in:

sipp 172.22.20.55 -sf successful_call.xml -inf clients.csv -l 1 -i 
172.22.20.186 -p 5063 -m 1
2008-08-18  10:22:03:0211219076523.021795: assign_to value is missing.

I *need* to have that assign_to in there to allow me to do the check_it on the 
To: field.  Otherwise my test is compromised (I could conceivably get a INFO 
that doesn't have a To: field in it).

I think this is a bug.  Is it really necessary for sipp to check my variable 
usage??  It breaks my existing scenarios.

Jeffrey Wright
System Test Engineering Manager
Aztek Networks, Inc.


-
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=100url=/___
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users