Hi All, 
             currenlty our requirement is that we want to compare particular  
header values eg : Expires , in  sent Request & Received Response in SIPp 
itself & then print some log message on the basis of this comparison wheather 
Test is passed or failed
                       using regular expressions i am able to get header values 
in  both 
sent message & reveived response , but it seems there is no support to compare 
values of both variables , please let me know if there is any option , to 
acheive this in SIPp .
                       

XML Script is as follows 

<send >
 <![CDATA[

REGISTER sip:[field1] SIP/2.0
Via: SIP/2.2/[transport] [local_ip]:[local_port];branch=[branch]
Max-Forwards: 70
From:[field0]<sip:[EMAIL PROTECTED]>;tag=[call_number]
To:[field0]<sip:[EMAIL PROTECTED]>
Call-ID: [call_id]
Contact:<sip:[EMAIL PROTECTED]:[local_port]>
CSeq: 1 REGISTER
Expires: 3333
Content-Length: 0
        ]]>
<action>
 <ereg regexp="branch=([[:alnum:]].*)" search_in="hdr" header="Via" assign_to = 
"10"/>
<!--   <ereg regexp="([[:alnum:]].*)" search_in="hdr" header="Via:" assign_to = 
"10"/>-->

  <ereg regexp="tag=.*" search_in="hdr" header="From" assign_to = "11"/>
  <ereg regexp=".*" search_in="hdr" header="Call-ID" assign_to = "12"/>
  <ereg regexp=".*" search_in="hdr" header="CSeq" assign_to = "13"/>
  <ereg regexp=".*" search_in="hdr" header="Expires: " assign_to = "14"/>
<log message=" Sent Branch  = [$10]"/>
</action>

</send>


<recv response="200">
<action>
<!--  <ereg regexp="[ *" search_in="msg" check_it="true" assign_to="1"/> -->
  <ereg regexp="[$10]" search_in="msg"  check_it="true" assign_to="2"/>
  <ereg regexp="tag=.*" search_in="hdr" header="From" check_it="true" 
assign_to="3"/>
  <ereg regexp="tag=*" search_in="hdr" header="To" check_it="true" 
assign_to="4"/>
  <ereg regexp="expires=.*" search_in="hdr" header="Contact" check_it="true" 
assign_to="5"/>
 <log message=" Received Branch = [$2]"/>
</action>

</recv>

<nop>
<action>
        <exec command="echo Sent_Branch = [$10]  > Result1.log "/>
        <exec command="echo Received_Branch = [$2] >> Result1.log "/>
        <exec command="echo Sent_Expires = [$14] >> Result1.log "/>
        <exec command="echo Received_Expires = [$5] >> Result1.log "/>

</action>
</nop>


</scenario>

Thanks & Regards ,
Amit Rane 




 
---------------------------------
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to