Hello all. I am new to SIP and SIPp and I needed a little hand on a new
scenario I am trying to set.

        I need 2 scenarios. The first on will generate calls just like the
simple uac but with different callerids other than just sipp. This can
be easily accomplished by a small modification on the scenario and a csv
file with all the caller ids I want to generate.

        The second scenario is really complicated a few things need to be
accomplished.

                1. REGISTER with MD5 Digest
                        -> REGISTER
                        <- 401
                        -> REGISTER with AUTH
                        <- 100 (TRYING)
                        <- 200

                2. INVITE with MD5 Digest
                        -> INVITE
                        <- 407
                        -> ACK
                        -> INVITE
                        <- 100
                        <- 180
                        <- 183
                        <- 200
                        -> ACK
                        <- BYE
                        -> 200

                3. Be ready to receive INVITEs for a certain necessarily 
REGISTERED
user on part 1

                        Same as uas.xml with modifications I would guess

Here's what I could do so far: Part 1 and Part 2 separately but not
together (same file) because I can't use the same Call-ID on both and
when prepending something with /// just won't work for the next message.

Other than that, I have no idea on how to make a UAS that keeps
registration while receiving calls or register and "turn the UAS on" for
several users on a csv file.


I am attaching the file so you could take a look.

Please, some help would be really appreciated.

Thanks,

John Mesquita
<?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 'uas' scenario.                       -->
<!--                                                                    -->

<scenario name="Asterisk/OpenPBX Agent login - responder">
  
  <!-- Since I am only able to enable authentication on a recv command, -->
  <!-- let's trhow a nonsense command for getting a 401 back -->
  <send retrans="500">
    <![CDATA[

      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port]
      To: <sip:[EMAIL PROTECTED]:[remote_port]>
      From: <sip:[EMAIL PROTECTED]:[remote_port]>
      Contact: "[field0]" <sip:[EMAIL PROTECTED]:[local_port]>;transport=[transport]
      Expires: 300
      Call-ID: ABCDE///[call_id]
      CSeq: 2 REGISTER
      Content-Length: 0

    ]]>
  </send>

  <!-- Received TRYING -->
  <recv response="100" optional="true">
  </recv>
  <!-- Received the 401 as expected from the trash REGISTER message -->
  <recv response="401" auth="true">
  </recv>

  <!-- Now, lets register for real with the proper authentication taken from the csv -->
  <send retrans="500">
    <![CDATA[

      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port]
      To: <sip:[EMAIL PROTECTED]:[remote_port]>
      From: <sip:[EMAIL PROTECTED]:[remote_port]>
      Contact: "[field0]" <sip:[EMAIL PROTECTED]:[local_port]>;transport=[transport]
      [field1]
      Expires: 300
      Call-ID: ABCDE///[call_id]
      CSeq: 2 REGISTER
      Content-Length: 0

    ]]>
  </send>
  <!-- Receive TRYING back -->
  <recv response="100" optional="true">
  </recv>
  <!-- Receive the OK, we are registered! -->
  <recv response="200"
        crlf="true">
  </recv>

  <!-- Now we need to log the agent on! -->
  <!-- For that we need to dial the agent route -->
  <!-- So let's start with an invite -->
  <send retrans="500">
    <![CDATA[

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

      v=0
      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
      s=-
      c=IN IP[media_ip_type] [media_ip]
      t=0 0
      m=audio [media_port] RTP/AVP 0
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>

  <recv response="407"
  	auth="true">
  </recv>

  <!-- We have been challenged, lets show them the money! And invite again -->
  <!-- Send the acnoledgement for the 407 message -->
  <send>
    <![CDATA[

      ACK sip:[EMAIL PROTECTED]:[remote_port] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port]
      From: [field0] <sip:[EMAIL PROTECTED]:[local_port]>;tag=[call_number]
      To: asterisk <sip:[EMAIL PROTECTED]:[remote_port]>[peer_tag_param]
      [last_Call-ID]
      [last_CSeq]
      Contact: sip:[EMAIL PROTECTED]:[local_port]
      Content-Length: 0

    ]]>
  </send>
  <send retrans="500">
    <![CDATA[

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

      v=0
      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
      s=-
      c=IN IP[media_ip_type] [media_ip]
      t=0 0
      m=audio [media_port] RTP/AVP 0
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>

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

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

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

  <recv response="200" rtd="true">
  </recv>
  
  <!-- Here we go with the regular UAC to receive the calls! -->
  
  <!-- By adding rrs="true" (Record Route Sets), the route sets         -->
  <!-- are saved and used for following messages sent. Useful to test   -->
  <!-- against stateful SIP proxies/B2BUAs.                             -->
  <recv request="INVITE" crlf="true">
  </recv>

  <!-- The '[last_*]' keyword is replaced automatically by the          -->
  <!-- specified header if it was present in the last message received  -->
  <!-- (except if it was a retransmission). If the header was not       -->
  <!-- present or if no message has been received, the '[last_*]'       -->
  <!-- keyword is discarded, and all bytes until the end of the line    -->
  <!-- are also discarded.                                              -->
  <!--                                                                  -->
  <!-- If the specified header was present several times in the         -->
  <!-- message, all occurences are concatenated (CRLF seperated)        -->
  <!-- to be used in place of the '[last_*]' keyword.                   -->

  <send>
    <![CDATA[

      SIP/2.0 180 Ringing
      [last_Via:]
      [last_From:]
      [last_To:];tag=[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Length: 0

    ]]>
  </send>

  <send retrans="500">
    <![CDATA[

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

      v=0
      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
      s=-
      c=IN IP[media_ip_type] [media_ip]
      t=0 0
      m=audio [media_port] RTP/AVP 0
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>

  <recv request="ACK"
        optional="true"
        rtd="true"
        crlf="true">
  </recv>

  <recv request="BYE">
  </recv>

  <send>
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Length: 0

    ]]>
  </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.               -->
  <pause milliseconds="4000"/>


  <!-- 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>

-------------------------------------------------------------------------
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