There is no strncmp available, but if you need it then it isn't hard to 
add.  You'd need to edit scenario.cpp and call.cpp (search for 
E_AT_VAR_STRCMP).  Each file would require about 5 lines of code.

I'm glad that the trunk is working for you; generally I only hear about it 
not working for someone.

Charles

"Anonymous Incognito" <[EMAIL PROTECTED]> wrote on 08/19/2008 
08:41:18 AM:

> Hi Charles,
> 
> I knew about nop but definitely not about condexec.
> 
> Is it only strcmp, which is available or is strncmp available too?
> 
> I am using the latest SVN trunk version and it works fine. Pure joy.
> 
> Cheers
> David
> 
> On Mon, Aug 18, 2008 at 3:43 PM, Charles P Wright <[EMAIL PROTECTED]> 
wrote:
> > 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; [email protected]; 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]>,
> >> <[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

Reply via email to