When i put the regex within <nop> sipp dumps core.

This is what i did

=============
  <label id="1"/>
  <nop>
  <action>
  <ereg regexp="SIP\/2\.0.*" search_in="msg" check_it="true" assign_to="2"/>
  <log message="Response: [$2], [last_From], [last_To], [last_Call-ID],
[last_CSeq], [last_Warning]"/>
  </action>
  </nop>
=============

I want the regular expression or the logging at one place, i dont want to
put the regular expression for every <recv> statement.

Any ideas?

On Feb 12, 2008 11:54 AM, Peter Higginson <
[EMAIL PROTECTED]> wrote:

>  The public code has changed a lot recently so this may not be accurate;
> however I think you can use response ranges (so you only need one line) and
> then play with an action matching a regex to get the response code into a
> variable. You should then be able to log the variable as [$n].
>
>
>
> Peter Higginson
>
> Newport Networks Ltd,
>
> http://www.newport-networks.com/
>   ------------------------------
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Santosh Reddy
> *Sent:* 12 February 2008 19:44
> *To:* SIPp Users
> *Subject:* Re: [Sipp-users] How to capture the response code in the <log>
>
>
>
> Does SIPp support this. something like [last_response]
>
> On Jan 30, 2008 11:03 PM, Santosh Reddy <[EMAIL PROTECTED]> wrote:
>
> Is there a way to do this
>
>
>
> On Jan 23, 2008 11:49 AM, Santosh Reddy <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I want to capture the response code also in the below script in the <nop>
> I could capture the call-id to, and from,
> is there any way we can capture the response received in the <nop> or in
> something else.
> I dont want to put the same command for every response received in the
> script. I just want it at one place so i had put a label. please go through
> the script and let me know how can we get the response code captured in the
> log file.
>
> Thanks a lot in advance.
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE scenario SYSTEM "sipp.dtd">
>
> <scenario name="Basic Registration">
>
>   <send>
> <![CDATA[
>
>       REGISTER sip:[field1] SIP/2.0
>       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
>       From: ua1
> <sip:[EMAIL PROTECTED]:[local_port]>;tag=[pid]SIPpTag00[call_number]
>       Max-Forwards: 70
>       To: ua1 <sip:[EMAIL PROTECTED]:[local_port]>
>       Call-ID: [call_id]
>       CSeq: 1 REGISTER
>       Contact: sip:[EMAIL PROTECTED]:[local_port]
>       Content-Length: 0
>       Expires: 3600
>
>   ]]>
>   </send>
>
>   <recv response="400" optional="true" next="1"/>
>   <recv response="403" optional="true" next="1"/>
>   <recv response="404" optional="true" next="1"/>
>   <recv response="408" optional="true" next="1"/>
>   <recv response="412" optional="true" next="1"/>
>   <recv response="481" optional="true" next="1"/>
>   <recv response="483" optional="true" next="1"/>
>   <recv response="500" optional="true" next="1"/>
>   <recv response="503" optional="true" next="1"/>
>   <recv response="504" optional="true" next="1"/>
>   <recv response="600" optional="true" next="1"/>
>   <recv response="200" optional="true" next="1"/>
>   <recv response="401" auth="true"/>
>   <send>
>
> <![CDATA[
>
>       REGISTER sip:[field1] SIP/2.0
>       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
>       From: ua1
> <sip:[EMAIL PROTECTED]:[local_port]>;tag=[pid]SIPpTag00[call_number]
>       Max-Forwards: 70
>       To: ua1 <sip:[EMAIL PROTECTED]:[local_port]>
>       Call-ID: [call_id]
>       CSeq: 2 REGISTER
>       Contact: sip:[EMAIL PROTECTED]:[local_port]
>       Content-Length: 0
>       [field2]
>       Expires: 3600
>
>   ]]>
>   </send>
>   <!--  simple case - just jump over a line  -->
>
>   <recv response="400" optional="true" next="1"/>
>   <recv response="403" optional="true" next="1"/>
>   <recv response="404" optional="true" next="1"/>
>   <recv response="408" optional="true" next="1"/>
>   <recv response="412" optional="true" next="1"/>
>   <recv response="481" optional="true" next="1"/>
>   <recv response="483" optional="true" next="1"/>
>   <recv response="500" optional="true" next="1"/>
>   <recv response="503" optional="true" next="1"/>
>   <recv response="504" optional="true" next="1"/>
>   <recv response="600" optional="true" next="1"/>
>   <recv response="200" next="9"/>
>
>   <label id="1"/>
>   <nop>
>   <action>
>   <log message="[last_From], [last_To], [last_Call-ID], [last_Warning]"/>
>   </action>
>   </nop>
>
>   <label id="9"/>
> </scenario>
>
>
> --
> Thanks & Regards,
> Santosh Reddy.
>
>
>
>   --
> Thanks & Regards,
> Santosh Reddy.
>
>
>
>
> --
> Thanks & Regards,
> Santosh Reddy.
>
>
> ------------------------------
>
> ---------------------------------------------------------------------------------------------
> This e-mail may contain confidential and/or privileged information.
>
> If you are not the intended recipient (or have received this e-mail in error) 
> please
>
> notify the sender immediately and delete this e-mail. Any unauthorized 
> copying,
>
> disclosure or distribution of the contents in this e-mail is strictly 
> forbidden.
>
> ---------------------------------------------------------------------------------------------
>
> Newport Networks Limited is registered in England. Registration number 
> 4067591.
> Registered office: 6 St. Andrew Street, London EC4A 3LX
>
> ---------------------------------------------------------------------------------------------
>



-- 
Thanks & Regards,
Santosh Reddy.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to