Monday, December 12, 2011

SIPp commands for INVITE, REGISTER

Sipp commands

For Register:
sipp 192.168.1.106 -sf REGISTER_client.xml -inf REGISTER_client.csv -m 1 -l 1 -trace_msg -trace_err

For INVITE:
sipp 10.20.20.51 -sf REGISTER_INVITE_client.xml -inf REGISTER_IN.csv -m 1 -l 1

Monday, December 5, 2011

SIPp Register - Output screen

SIPp Register - Output screen

In Windows

Start the SIPp window by double clicking the "startterm.bat" file.
then

Command to REGISTER SIPp with proxy/Asterisk server

sipp 10.20.20.29 -sf REGISTER_Client.xml -inf REGISTER_cds.csv -m 1

Note:- REGISTER_Client.xml & REGISTER_cds.csv should be available in the installed SIPp folder

Output Screen:

How to run SIPp on windows?

How to run SIPp on windows?

Install the SIPp by installing the exe file

1. Go to installed SIPp folder in windows pc
2. Double click the "startterm.bat" file

Thats it !!!!!

No  you can run the scenarios in the opened command window.

Sunday, December 4, 2011

INVITE xml file - Explained

Simple call/ Outgoing call using INVITE XML File - Explained

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

<scenario name="UAC REGISTER + INVITE + call">

<!--  Use with CSV file struct like: 32;192.168.1.211;[authentication username=32 password=32];21;
      (user part of uri, server address, auth tag, call target)
-->

     <send retrans="500">
   

 

  <send>
    <![CDATA[

      ACK sip:[field3]@[remote_ip]:[remote_port] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[field0]@[field1]>;tag=[call_number]
      [last_To:]
      Call-ID: [call_id]
      CSeq: [cseq] ACK
      Contact: sip:[field0]@[local_ip]:[local_port]
      Max-Forwards: 10
      Content-Length: 0

    ]]>
  </send>

  <pause milliseconds="30000" />           - Pause for 30 secs (Here session is established and pause for 30 seconds)

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

      BYE sip:[field3]@[remote_ip]:[remote_port] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[field0]@[field1]>;tag=[call_number]     
      [last_To:]
      Call-ID: [call_id]
      CSeq: [cseq] BYE
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 10
      Content-Length: 0

    ]]>
  </send>

  <!-- The 'crlf' option inserts a blank line in the statistics report. -->
  <recv response="200" crlf="true">
  </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>

INVITE Scenario XML and CSV file

INVITE Scenario XML and CSV File - Download location

XML File:
http://www.4shared.com/document/7uJqFzUH/INVITE_client.html
CSV File:
http://www.4shared.com/file/-9ItAjFG/INVITE_client.html






Register XML File explained

Example of REGISTER XML File: Explained in RED color.
Its working fine with my asterisk server ;-)

Note:- Each scenario is started with
<scenario name=xxxx>
and ended with
</scenario>

<?xml version="1.0" encoding="ISO-8859-2" ?>

<!--  Use with CSV file struct like: 3000;192.168.1.106;[authentication username=3000 password=3000];
      (user part of uri, server address, auth tag in each line)
-->

<scenario name="register_client">
  <send retrans="500">
retrans=500 means the TI timer set to 500 ms
    <![CDATA[

      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[field0]@[field1]>;tag=[call_number]
      To: <sip:[field0]@[field1]>
      Call-ID: [call_id]
      CSeq: [cseq] REGISTER
      Contact: sip:[field0]@[local_ip]:[local_port]
      Max-Forwards: 10
      Expires: 120
      User-Agent: SIPp/Win32
      Content-Length: 0

    ]]>
  </send>

  <!-- asterisk -->
  <recv response="200" >
  </recv>

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

      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[field0]@[field1]>;tag=[call_number]
      To: <sip:[field0]@[field1]>
      Call-ID: [call_id]
      CSeq: [cseq] REGISTER
      Contact: sip:[field0]@[local_ip]:[local_port]
      [field2]
      Max-Forwards: 10
      Expires: 120
      User-Agent: SIPp/Win32
      Content-Length: 0

    ]]>
  </send>

"<recv" should contains the expecting receive response message. If it doesn't match with the actual received message, then the REGISTRATION will not be successful.

  <!-- asterisk -->
  <recv response="100" optional="true">
  </recv>

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

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

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

</scenario>

--------------------------------------END OF XML----------------------------------------------

 CSV FILE Details for Registration:

SEQUENTIAL
18222;10.20.20.29;[authentication username=18222 password=abcdef];

a) 18222 - SIPp client number (UAC Number)
b) 10.20.20.29 - Asterisk server or SIP Proxy server
c) Username & Password should be included properly


 

REGISTER the sipp client with the sip proxy server


Command to REGISTER the sipp client with the proxy server (Eg: Asterisk)





sipp 10.20.20.14 -sf REGISTER_INVITE_client.xml -inf REGISTER_IN.csv -m 1 -l 1

Here,

a) 10.20.20.14 -> Proxy server ip
b) REGISTER_INVITE_client.xml -> XML file which contains Register  request message with expecting response message
c) REGISTER_IN.csv -> csv file which contains field values declared in the above xml files.


Example of XML file:



http://www.4shared.com/document/qOeJ2btN/REGISTER_client.html


Example of CSV File:
http://www.4shared.com/file/ejGrbPoA/Register_client.html


Note: - Replace with your own values