Hi Rob,

Still result is same.

After running below scenario i got following in contact.log
Received_Responce=
Received_Contact=sip:[email protected]:5061
Received_Expires=expires=300


My scenario as follows,

<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Basic Sipstone UAC">
  <send retrans="500">
    <![CDATA[

    REGISTER sip:[field1] SIP/2.0
    Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
    Max-Forwards: 70
    To: [field0] <sip:[field0]@[field1]>
    From: [field0] <sip:[field0]@[field1]>;tag=[call_number]
    Call-ID: [call_id]
    CSeq: [cseq] REGISTER
    Contact: <sip:[field0]@[local_ip]:[local_port]>;expires=300
    Allow: 
INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE
    User-Agent: SIPp [sipp_version]
    Content-Length: 0

    ]]>
  </send>

  <recv response="401" auth="true" optional="true" next="REG_401_407">
  </recv>

  <recv response="200" crlf="true" next="REG_OK">
    <action>
    <ereg regexp=".*" search_in="hdr" header="start_line: ..." assign_to="5" />
    <ereg regexp= "sip:[^;&gt;]+" search_in="hdr" 
header="Contact:"check_it="true" assign_to="6" />
    <ereg regexp="expires=.*" search_in="hdr" header="Contact" check_it="true" 
assign_to="7"/>
    </action>
  </recv>

  <label id="REG_401_407"/>

  <send retrans="500">
    <![CDATA[
 
    REGISTER sip:[field1] SIP/2.0
    Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
    Max-Forwards: 70
    To: [field0] <sip:[field0]@[field1]>
    From: [field0] <sip:[field0]@[field1]>;tag=[call_number]
    Call-ID: [call_id]
    CSeq: [cseq] REGISTER
    Contact: <sip:[field0]@[local_ip]:[local_port]>;expires=300
    [field2]
    Allow: 
INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE
    User-Agent: SIPp [sipp_version]
    Content-Length: 0

    ]]>
  </send>

  <recv response="401" auth="true" optional="true" next="REG_OK">
  </recv>

  <recv response="200" crlf="true" next="REG_OK">
    <action>
    <ereg regexp=" .*" search_in="hdr" header="start_line: ..." assign_to="5" />
    <ereg regexp= "sip:[^;&gt;]+" search_in="hdr" 
header="Contact:"check_it="true" assign_to="6" />
    <ereg regexp="expires=.*" search_in="hdr" header="Contact" check_it="true" 
assign_to="7"/>
    </action>
  </recv>
  
  <label id="REG_OK"/>
     <nop>
    <action>
            <exec command="echo Received_Responce=[$5] >> contact.log "/>
            <exec command="echo Received_Contact=[$6] >> contact.log "/>    
            <exec command="echo Received_Expires=[$7] >> contact.log "/>

    </action>

</scenario>


Best Regards,Sakharam Thorat.

> Date: Fri, 21 Feb 2014 20:51:04 +0000
> Subject: Re: regular expression within start line
> From: [email protected]
> To: [email protected]
> 
> Hi Sakharam,
> 
> I'm not sure what you're basing that XML on - I think
> header="start_line" will literally look for a SIP header of the form
> "start_line: ..." rather than the first line of the message.
> 
> Best,
> Rob
> 
> On 21 February 2014 20:33, Sakharam Thorat <[email protected]> 
> wrote:
> > Hi,
> > On receiving response to register request say 200 OK or 401 or any other , I
> > have  search that whole start line  and assign to variable to store result.
> > I am trying following way
> >
> >   <recv response="200" crlf="true" next="REG_OK">
> >       <action>
> >       <ereg regexp=".*" search_in="hdr" header="start_line" assign_to="6" />
> >       </action>
> >  </recv>
> >
> > but getting empty 6.
> >
> > Is this possible ? is my syntax are correct ? please suggest.
> >
> >
> > Best Regards,
> > Sakharam Thorat.
> >
> >
> >> Date: Fri, 21 Feb 2014 08:08:23 +0000
> >> From: [email protected]
> >> To: [email protected]
> >> CC: [email protected]
> >> Subject: Re: [Sipp-users] Print the media port number on stdout
> >>
> >> I've never tried it, but it should be possible by combining a regexp
> >> action to extract the port and the exec action to log it to stdout:
> >>
> >> <ereg regexp="m=audio (\d+)"
> >> search_in="body"
> >> check_it="true"
> >> assign_to="dummy, remote_audio_port"/>
> >>
> >> <exec command="echo [$remote_audio_port]"/>
> >>
> >> On 21 February 2014 07:27, Alan Martinovic <[email protected]>
> >> wrote:
> >> > Hi,
> >> >
> >> > I'm doing a simple call simulation with sip
> >> >
> >> > sipp <destination_ip> -d 30000 -m 1 -i <caller_ip> -sf uac.xml
> >> >
> >> > Before the RTP streaming starts, the destination sends the 200 OK sip
> >> > message. This message contains the port number for the streaming. I
> >> > would
> >> > like to make that port number accessible in a bash script.
> >> >
> >> > Is there a way to have sipp print out the port number on standard
> >> > output?
> >> >
> >> >
> >> > DISCLAIMER:
> >> > This e-mail may contain confidential and privileged material for the
> >> > sole
> >> > use of the intended recipient. Any review, use, distribution or
> >> > disclosure
> >> > by others is strictly prohibited. If you are not the intended recipient
> >> > (or
> >> > authorized to receive for the recipient), please contact the sender by
> >> > reply
> >> > e-mail and delete all copies of this message.
> >> >
> >> >
> >> > ------------------------------------------------------------------------------
> >> > Managing the Performance of Cloud-Based Applications
> >> > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> >> > Read the Whitepaper.
> >> >
> >> > http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> >> > _______________________________________________
> >> > Sipp-users mailing list
> >> > [email protected]
> >> > https://lists.sourceforge.net/lists/listinfo/sipp-users
> >> >
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Managing the Performance of Cloud-Based Applications
> >> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> >> Read the Whitepaper.
> >>
> >> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> >> _______________________________________________
> >> Sipp-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/sipp-users
                                          
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to