On Mon, Feb 7, 2011 at 2:06 AM, Thomas Elsgaard
<thomas.elsga...@gmail.com>wrote:

> Hello everybody
>
> I am trying to get started with SIPP, but i am a little bit stucked in
> building an scenario file for registering a user with authentication..
>
> Do anybody have an example scenario file i can try with ? maybe including
> reading the username and password from a csv file
>
>

Use the attached file.
You might find other scenarios searching the mailing list archives.

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

<scenario name="ATA Registration">
  <!-- You must supply a file containing data for injection -->
  <!-- field0 : username -->
  <!-- field2 : domain -->
  <!-- field2 : authentication -->  
  <!-- Sample
SEQUENTIAL
gandalf;middle-earth.com;[authentication username=gandalf password=qerafecdsdr]
  -->
  <!-- arguments to sipp must include: -->
  <!-- -i : local_ip -->
  <!-- -p : local_port -->
  <!-- -sf : scenario file -->
  <!-- -inf : injection data file -->
  <!-- -d : delay between successful registrations -->
  <!-- Ex.: sipp -i 192.168.2.122 -p 6060 -sf register.xml -inf data.txt -d 20000 192.168.2.123 -->

  <nop>
    <action>
      <assign assign_to="1" value="0" />
    </action>
  </nop>

  <label id="1" />

  <nop>
    <action>
      <add assign_to="1" value="1" />
      <assignstr assign_to="2" value="[$1]" />
      <ereg regexp="[0-9]+" search_in="var" variable="2" assign_to="2" check_it="true" />
    </action>
  </nop>

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

REGISTER sip:[field1] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
From: "[field0]" <sip:[field0]@[field1]>;tag=[pid]SIPpTag00[call_number]
To: "[field0]" <sip:[field0]@[field1]>
Call-ID: [call_id]
Contact: <sip:[field0]@[local_ip]:[local_port]>
CSeq: [$2] REGISTER
Max-Forwards: 70
Expires: 3600
Allow: INVITE,CANCEL,ACK,BYE,NOTIFY,REFER,OPTIONS,INFO,MESSAGE
User-Agent: ATA
Content-Length: 0

    ]]>
  </send>

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

  <label id="auth_required" />

  <nop>
    <action>
      <add assign_to="1" value="1" />
      <assignstr assign_to="2" value="[$1]" />
      <ereg regexp="[0-9]+" search_in="var" variable="2" assign_to="2" check_it="true" />
    </action>
  </nop>


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

REGISTER sip:[field1] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
From: "[field0]" <sip:[field0]@[field1]>;tag=[pid]SIPpTag00[call_number]
To: "[field0]" <sip:[field0]@[field1]>
Call-ID: [call_id]
Contact: <sip:[field0]@[local_ip]:[local_port]>
CSeq: [$2] REGISTER
[field2]
Expires: 3600
User-Agent: ATA
Content-Length: 0

    ]]>
   </send>

  <recv response="200">
  </recv>

  <!-- This delay can be customized by the -d command-line option       -->
  <!-- or by adding a 'milliseconds = "value"' option here.             -->
  <pause/>

  <nop next="1" />

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

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users
  • [Sipp-users]... Thomas Elsgaard
    • Re: [Si... mayamatakeshi
      • Re:... Gopalakrishnan A.N
        • ... mayamatakeshi
          • ... Gopalakrishnan A.N
            • ... Gopalakrishnan A.N
              • ... Mahalank, Shashikiran B (Communication & Media Solutions)
              • ... mayamatakeshi
                • ... Gopalakrishnan A.N
                • ... mayamatakeshi
                • ... Gopalakrishnan A.N
                • ... mayamatakeshi

Reply via email to