Yes it is. 

UAS and UAC roles are logical only. 

Entity sending the request is an UAC and entity responding the request
is an UAS.

Examples are attached. I'm not sure are debuged&fixed but it will help.

 

Regards,

Evgeny Miloslavsky

Systest Engineer

Juniper Networks Solutions Israel LTD.

Office: 972-9-9717320/2355

________________________________

From: Harsh Trivedi [mailto:[email protected]] 
Sent: Tuesday, May 26, 2009 9:07 AM
To: [email protected]
Subject: [Sipp-users] Can a script file act as a UAS and UAC????

 

I am a newbie here, help me out guys.
                                                      According to my
understanding, the script can either work as a UAS or UAC (client or
server). is there a way that script can work as a UAS and UAC.???

Thanks,
Harsh
. 
-- 
When you come to the end of all the light you know, and it's time to
step into the darkness of the unknown, faith is knowing that one of two
things shall happen: Either you will be given something solid to stand
on or you will be taught to fly.  

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">


<!-- This program is free software; you can redistribute it and/or      -->
<!-- modify it under the terms of the GNU General Public License as     -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version.                    -->
<!--                                                                    -->
<!-- This program is distributed in the hope that it will be useful,    -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
<!-- GNU General Public License for more details.                       -->
<!--                                                                    -->
<!-- You should have received a copy of the GNU General Public License  -->
<!-- along with this program; if not, write to the                      -->
<!-- Free Software Foundation, Inc.,                                    -->
<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
<!--                                                                    -->
<!--                 Sipp default 'uac' scenario.                       -->
<!--                                                                    -->

<scenario name="Basic Sipstone UAC">
  <!-- In client mode (sipp placing calls), the Call-ID MUST be         -->
  <!-- generated by sipp. To do so, use [call_id] keyword.              -->
 
 <send>
    <![CDATA[

      INVITE sip:2...@[field0]:[field1] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:1...@[local_ip]:[local_port]>;tag=[call_number]
      To: <sip:2...@[field0]:[field1]>
      Call-ID: [call_id]
      CSeq: 1 INVITE
      Contact: sip:[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      Content-Type: application/sdp
      Content-Length: [len]

      v=0
      o=user1 2890844526 2890844526 IN IP[local_ip_type] [field0]
      s=-
      c=IN IP[media_ip_type] [media_ip]
      t=0 0
      m=audio 49170 RTP/AVP 0 8 97
      a=rtpmap:0 PCMU/8000
      a=rtpmap:8 PCMA/8000
      a=rtpmap:97 iLBC/8000
      m=video 51372 RTP/AVP 31 32
      a=rtpmap:31 H261/90000
      a=rtpmap:32 MPV/90000

    ]]>
  </send>

  <recv response="100">
  </recv>

  <recv response="200">
     <action>
       <ereg regexp="sip:[^;&gt;]+" search_in="hdr" header="Contact:" check_it="true" assign_to="1" />
     </action>
  </recv>	  
  
 <send>
  <![CDATA[
   
    ACK [$1] SIP/2.0
    Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
    [last_From:]
    [last_To:]
    Max-Forwards: 70
    Call-ID: [call_id]
    CSeq: 1 ACK
    
    ]]>
 </send>
  
  <recv request="INVITE">
     <action>
	<ereg regexp="sip:[^;&gt;]+" search_in="hdr" header="Contact:" check_it="true" assign_to="1" />
      </action>
  </recv>
  
  <send>
  <![CDATA[
 
    SIP/2.0 200 OK
    [last_Via:]
    [last_From:]
    [last_To:]
    [last_Call-ID:]
    [last_CSeq:]
    Contact: sip:1...@[local_ip]:[local_port]
 
     ]]>
  </send>
  
  <recv request="ACK">
  </recv>
  
  <send>
  <![CDATA[
   
    BYE [$1] SIP/2.0
    Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
    From:[$2]
    To:[$3]
    Max-Forwards: 70
    Call-ID: [call_id]
    CSeq: 5 BYE
    
    ]]>
 </send>

 <recv response="100" optional="true">
 </recv>
 
 <recv response="200">
 </recv>
 
 <!-- definition of the response time repartition table (unit is ms)   -->
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>

  <!-- definition of the call length repartition table (unit is ms)     -->
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>

</scenario>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<scenario name="Basic UAS responder">
  
  <recv request="INVITE">
     <action>
         <ereg regexp="sip:[^;&gt;]+" search_in="hdr" header="Contact:" assign_to="1"/>
     </action>
  </recv>


  <send>
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:];tag=[pid]-[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port]>
      Content-Type: application/sdp
      Content-Length: [len]

      v=0
      o=user1 2890844527 2890844527 IN IP[local_ip_type] [local_ip]
      s=-
      c=IN IP[media_ip_type] [media_ip]
      t=0 0
      m=audio 49174 RTP/AVP 0
      a=rtpmap:0 PCMU/8000
      m=video 49170 RTP/AVP 32
      a=rtpmap:32 MPV/90000

    ]]>
  </send>

  <recv request="ACK">
    <action>
        <ereg regexp=".*" search_in="hdr" header="To:" assign_to="2"/>
        <ereg regexp=".*" search_in="hdr" header="From:" assign_to="3"/>
    </action>
  </recv>

  <pause milliseconds="500"/>
        
    <send>
      <![CDATA[
    
        INVITE [$1] SIP/2.0
        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
        From: [$2]
        To: [$3]
        Call-ID: [call_id]
        CSeq: 1 INVITE
        Contact: sip:2...@[local_ip]:[local_port]
        Max-Forwards: 70
        Require: 100rel
        Content-Type: application/sdp
        Content-Length: [len]
    
     ]]>
    </send>

  <recv response="100" optional="true"/>

  <recv response="200">
        <action>
	     <ereg regexp="sip:[^;&gt;]+" search_in="hdr" header="Contact:" check_it="true" assign_to="1" />
      </action>
  </recv>
  
   <send>
     <![CDATA[
      
       ACK [$1] SIP/2.0
       Via:Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
       [last_From:]
       [last_To:]
       Call-ID: [call_id]
       CSeq: 1 ACK
       Max-Forwards: 70
       
     ]]>
   </send>
       
   <recv request="BYE">
  </recv>
  

  <send>
      <![CDATA[
  
        SIP/2.0 200 OK
        [last_Via:]
        [last_From:]
        [last_To:]
        [last_Call-ID:]
        [last_CSeq:]

      ]]>
    </send>

   
  
  <!-- Keep the call open for a while in case the 200 is lost to be     -->
  <!-- able to retransmit it if we receive the BYE again.               -->

  <!-- definition of the response time repartition table (unit is ms)   -->
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>

  <!-- definition of the call length repartition table (unit is ms)     -->
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>

</scenario>


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to