From: <obo...@us...> - 2007-12-05 14:31:34
|
Revision: 372 http://sipp.svn.sourceforge.net/sipp/?rev=372&view=rev Author: oboulkroune Date: 2007-12-05 06:31:31 -0800 (Wed, 05 Dec 2007) Log Message: ----------- Doc: add 3_0 doc and mask 2_0 (obsoleted) Modified Paths: -------------- doc/trunk/src/documentation/content/xdocs/site.xml doc/trunk/src/documentation/content/xdocs/tabs.xml Added Paths: ----------- doc/trunk/src/documentation/content/xdocs/doc3.0/ doc/trunk/src/documentation/content/xdocs/doc3.0/faq.xml doc/trunk/src/documentation/content/xdocs/doc3.0/index.xml doc/trunk/src/documentation/content/xdocs/doc3.0/license.xml doc/trunk/src/documentation/content/xdocs/doc3.0/reference.xml Added: doc/trunk/src/documentation/content/xdocs/doc3.0/faq.xml =================================================================== --- doc/trunk/src/documentation/content/xdocs/doc3.0/faq.xml (rev 0) +++ doc/trunk/src/documentation/content/xdocs/doc3.0/faq.xml 2007-12-05 14:31:31 UTC (rev 372) @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V2.0//EN" "http://forrest.apache.org/dtd/faq-v20.dtd"> + +<faqs> + <title>Frequently Asked Questions</title> + <faqsection id="usingsipp"> + <title>Using SIPp</title> + <faq id="rsa"> + <question> + SIPp doesn't send the messages back to the correct SIP proxy port + </question> + <answer> + <p> + By default, SIPp will answer to SIP messages on the same socket where it received + the messages. This behavior is a problem for SIP proxies that expect messages + on a predifined IP port.<br></br> + Using the "-rsa" option on the command line allows you to force the address used + to send messages and override this default behavior.<br></br> + </p> + </answer> + </faq> + <faq id="automation"> + <question> + How to automate scenario execution and collect pass / failed results + </question> + <answer> + <p> +You don't need to modify SIPp sources to do that. All you need to do is run one +call, exit (using -m command line option) and test the return code, +as specified in SIPp help:<br/> +Exit code:<br/> +<br/> + Upon exit (on fatal error or when the number of asked calls (-m + option) is reached, sipp exits with one of the following exit + code:<br/> + 0: All calls were successful<br/> + 1: At least one call failed<br/> + 99: Normal exit without calls processed<br/> + -1: Fatal error<br/> +<br/> +A shell script could look like:<br/> +<br/> +ocadmin@idefix:~/OJA/sipp.2004-09-21$ cat run.sh<br/> +#!/bin/sh<br/> +>results.txt<br/> +for i in $*<br/> +do<br/> + echo Launching test $i >> results.txt<br/> + ./sipp -sf $i -m 1 127.0.0.1<br/> + if test $? -ne 0<br/> + then<br/> + echo Test $i failed >> results.txt<br/> + else<br/> + echo Test $i succeeded >> results.txt<br/> + fi<br/> +done<br/> +exit 0<br/> +ocadmin@idefix:~/OJA/sipp.2004-09-21$<br/> +<br/> +Launch the tests: ./run.sh *.xml<br/> +Then you will get a result file like this:<br/> +<br/> +ocadmin@idefix:~/OJA/sipp.2004-09-21$ cat results.txt<br/> +Launching test regexp.xml<br/> +Test regexp.xml failed<br/> +Launching test uac.xml<br/> +Test uac.xml succeeded<br/> +ocadmin@idefix:~/OJA/sipp.2004-09-21$<br/> +<br/> +</p> + </answer> + </faq> + <!-- More faqs or parts here --> + </faqsection> + <faqsection id="docs"> + <title>Documentation</title> + <faq id="forrest"> + <question> + How can I help write documentation? + </question> + <answer> + <p> + This project uses <link href="ext:forrest">Apache Forrest</link> to + generate documentation from XML. Please download a copy of Forrest, + which can be used to <link + href="ext:forrest/validation">validate</link>, <link + href="ext:forrest/webapp">develop</link> and render a project site. + </p> + <p>Documentation sources (XML files) are available on request (oja...@us...).</p> + </answer> + </faq> + <!-- More faqs or parts here --> + </faqsection> + <!-- More faqs or parts here --> +</faqs> Added: doc/trunk/src/documentation/content/xdocs/doc3.0/index.xml =================================================================== --- doc/trunk/src/documentation/content/xdocs/doc3.0/index.xml (rev 0) +++ doc/trunk/src/documentation/content/xdocs/doc3.0/index.xml 2007-12-05 14:31:31 UTC (rev 372) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://apache.org/forrest/dtd/document-v12.dtd"> +<document> + <header> + <title>SIPp documentation</title> + </header> + <body> + <p>This is the documentation section. You can find the following documents here:</p> + <ul> + <li><link href="reference.html">Reference documentation</link></li> + <li><link href="faq.html">FAQ</link></li> + <li><link href="license.html">License</link></li> + </ul> + </body> +</document> \ No newline at end of file Added: doc/trunk/src/documentation/content/xdocs/doc3.0/license.xml =================================================================== --- doc/trunk/src/documentation/content/xdocs/doc3.0/license.xml (rev 0) +++ doc/trunk/src/documentation/content/xdocs/doc3.0/license.xml 2007-12-05 14:31:31 UTC (rev 372) @@ -0,0 +1,334 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"> +<document> + <header> + <title>License</title> + <subtitle>License for SIPp</subtitle> + </header> + <body> + <section> + <title>License</title> + <p>SIPp is under <a href="#gpl">GNU General Public License</a>.</p> + <p>send_packets.c and send_packets.h share source from tcpreplay +tools by Aaron Turner +<a href="http://tcpreplay.sourceforge.net/">http://tcpreplay.sourceforge.net/</a> and are under <a href="#bsd">BSD license</a></p> + </section> + <anchor id="gpl" /><section> + <title>GNU GENERAL PUBLIC LICENSE</title> + <source> + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS </source> + </section> + <anchor id="bsd" /><section> + <title>Copyright notice for send_packets.c and send_packets.h</title> + <source> + Copyright (c) 2001-2004 Aaron Turner. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the names of the copyright owners nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +</source> + </section> + </body> +</document> + Added: doc/trunk/src/documentation/content/xdocs/doc3.0/reference.xml =================================================================== --- doc/trunk/src/documentation/content/xdocs/doc3.0/reference.xml (rev 0) +++ doc/trunk/src/documentation/content/xdocs/doc3.0/reference.xml 2007-12-05 14:31:31 UTC (rev 372) @@ -0,0 +1,2573 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"> +<document> + <header> + <title>SIPp</title> + <subtitle>SIPp reference documentation</subtitle> + <authors> + <person name="Richard GAYRAUD [initial code]" email="ric...@us..."/> + <person name="Olivier JACQUES [code/documentation]" email="oja...@us..."/> + <person name="Many contributors [code]" email="no...@em..."/> + </authors> + </header> + <body> + <section> + <title>Foreword</title> + <p>SIPp is a performance testing tool for the SIP protocol. It includes a + few basic SipStone user agent scenarios (UAC and UAS) and establishes and + releases multiple calls with the INVITE and BYE methods. It can also reads + XML scenario files describing any performance testing configuration. It + features the dynamic display of statistics about running tests (call rate, + round trip delay, and message statistics), periodic CSV statistics dumps, + TCP and UDP over multiple sockets or multiplexed with retransmission + management, regular expressions and variables in scenario files, and + dynamically adjustable call rates.</p> + <p>SIPp can be used to test many real SIP equipements like SIP proxies, + B2BUAs, SIP media servers, SIP/x gateways, SIP PBX, ... It is also very + useful to emulate thousands of user agents calling your SIP system. </p> + <p><strong>Want to see it?</strong></p> + <p>Here is a screenshot</p> + <p><img src="images/sipp-01.jpg" alt="SIPp screenshot" /></p> + <p>And here is a video (Windows Media Player 9 codec or above required) of + SIPp in action:</p> + <p><icon src="images/wmv.gif" alt="wmv" /><a href="images/sipp-01.wmv">sipp-01.wmv</a></p> + </section> + <section><title>Installation</title> + <section> + <title>Getting SIPp</title> + <p>SIPp is released under the + <a href="http://www.gnu.org/copyleft/gpl.html">GNU GPL license</a>. + All the terms of the license apply. It is provided to the SIP + community by <a href="http://www.hp.com">Hewlett-Packard</a> + engineers in hope it can be useful.</p> <p>We receive some support + from our company to work on this tool freely, but <strong>HP does not + provide any support nor warranty concerning SIPp.</strong></p> + </section> + <section><title>Stable release</title> + <p>Like many other "open source" projects, there are two versions of + SIPp: a stable and unstable release. Stable release: before being + labelled as "stable", a SIPp release is thoroughly tested. So you + can be confident that all mentioned features will work :) </p> + <note>Use the stable release for your everyday use and if you are + not blocked by a specific feature present in the "unstable release" + (see below).</note> <p><a + href="http://sourceforge.net/project/showfiles.php?group_id=104305">SIPp + stable download page</a></p> + </section> + <section><title>Unstable release</title> + <p>Unstable release: all new features and bug fixes are checked in + <a href="http://sipp.svn.sourceforge.net/viewvc/sipp/sipp/trunk/">SIPp's + SVN</a> repository as soon as they are available. Every night, an + automatic extraction is done and the source code of this release is + made available. </p> + <note> Use the unstable release if you absolutely need a bug fix or + a feature that is not in the stable release. </note> + <p><a href="http://sipp.sourceforge.net/snapshots/">SIPp "unstable" download page</a></p> + </section> + <section><title>Available platforms</title> + <p>SIPp is available on almost all UNIX platforms: HPUX, Tru64, + Linux (RedHat, Debian, FreeBSD), Solaris/SunOS.</p> + <p>A Windows port has been contributed. You can now compile SIPp under + Cygwin. A binary package with a Windows installer is also available. + Check <a href="http://sourceforge.net/project/showfiles.php?group_id=104305">the + download page</a> to download it and run SIPp under Windows.</p> + <note>SIPp works only over Windows XP and will not + work on Win2000. This is because of IPv6 support. The Windows installer + should prevent someone to install SIPp on Win2000.</note> + </section> + <anchor id="installing" /><section><title>Installing SIPp</title> + <ul> + <li>On Linux, SIPp is provided in the form of source code. You will need to + compile SIPp to actually use it.</li> + <li>Pre-requisites to compile SIPp are (see <a href="http://sipp.sourceforge.net/wiki/index.php/Compilation" >Compilation tips</a>): + <ul> + <li>C++ Compiler</li> + <li>curses or ncurses library</li> + <li>For authentication and TLS support: OpenSSL >= 0.9.8</li> + <li>For pcap play support: libpcap and libnet</li> + <li>For distributed pauses: <a href="http://www.gnu.org/software/gsl/">Gnu Scientific Libraries</a></li> + </ul> + </li> + <li>You have four options to compile SIPp: + <ul> + <li><strong>Without TLS (Transport Layer Security) and authentication support</strong>: + This is the recommended setup if you don't need to handle SIP authentication + and/or TLS. In this case, there are <strong>no depencies to install</strong> before + building SIPp. It is straight forward: +<source># gunzip sipp-xxx.tar.gz +# tar -xvf sipp-xxx.tar +# cd sipp +# make +</source></li> + <li><strong>With TLS and <a href="#authentication">authentication</a> support</strong>, you must have + installed <a href="http://www.openssl.org/">OpenSSL library</a> (>=0.9.8) + (which may come with your system). Building SIPp consist only in adding + the "ossl" option to the make command: +<source># gunzip sipp-xxx.tar.gz +# tar -xvf sipp-xxx.tar +# cd sipp +# make ossl +</source></li> + <li><strong>With <a href="#pcapplay">PCAP play</a> and without <a href="#authentication">authentication</a> support</strong>: +<source># gunzip sipp-xxx.tar.gz +# tar -xvf sipp-xxx.tar +# cd sipp +# make pcapplay +</source></li> + <li><strong>With <a href="#pcapplay">PCAP play</a> and <a href="#authentication">authentication</a> support</strong>: +<source># gunzip sipp-xxx.tar.gz +# tar -xvf sipp-xxx.tar +# cd sipp +# make pcapplay_ossl +</source></li> + + </ul> + <anchor id="gsl"/><note>To enable <a href="http://www.gnu.org/software/gsl/">GSL</a> at compile time, + you must install GSL and its include files, as well as un-comment + the lines in the local.mk file of SIPp distribution. Then, re-compile SIPp.</note> + </li> + <li>On Windows, SIPp is provided both with the source and the pre-compiled + executable. Just execute the installer to have SIPp installed. + <warning>SIPp compiles under CYGWIN, provided that you installed IPv6 + extension for CYGWIN (<a href="http://win6.jp/Cygwin/">http://win6.jp/Cygwin/</a>), + as well as OpenSSL and libncurses.</warning></li> + <li>To compile SIPp on Windows with pcap (media support), you must: + <ul> + <li>Copy the <a href="http://www.winpcap.org/devel.htm">WinPcap developer package</a> to "C:\cygwin\lib\WpdPack"</li> + <li>Remove or rename "pthread.h" in "C:\cygwin\lib\WpdPack\Include", as it interfers with pthread.h from cygwin</li> + <li>Compile using either "make pcapplay_cygwin" or "pcapplay_ossl_cygwin"</li> + </ul> + </li> + </ul> + </section> + <anchor id="filedesc" /><section><title>Increasing File Descriptors Limit</title> + <p>If your system does not supports enough file descriptors, + you may experience problems when using the TCP/TLS mode with many simultaneous calls.</p> + <p>You have two ways to overcome this limit: either use the <a href="#maxsocket"><code>-max_socket</code></a> + command line option or change the limits of your system.</p> + <p>Depending on the operating system you use, different procedures + allow you to increase the maximum number of file descriptors:</p> + <ul> + <li><p>On Linux 2.4 kernels the default number of file descriptors can + be increased by modifying the <code>/etc/security/limits.conf</code> + and the <code>/etc/pam.d/login</code> file. </p> + <p>Open the <code>/etc/security/limits.conf</code> file and add the following lines:</p> +<source>soft nofile 1024 +hard nofile 65535</source> + <p>Open the <code>/etc/pam.d/login</code> and add the following line</p> +<source>session required /lib/security/pam_limits.so</source> + <p>The system file descriptor limit is set in the <code>/proc/sys/fs/file-max</code> file. + The following command will increase the file descriptor limit:</p> +<source>echo 65535> /proc/sys/fs/file-max</source> + <p>To increase the number of file descriptors to its maximum limit + (65535) set in the <code>/etc/security/limits.conf</code> file, type:</p> +<source>ulimit -n unlimited</source> + <p>Logout then login again to make the changes effective.</p> + </li> + <li><p>On HP-UX systems the default number of file descriptors + can be increased by modifying the system configuration with the sam utility. + In the Kernel Configuration menu, select Configurable parameters, + and change the following attributes:</p> +<source>maxfiles : 4096 +maxfiles_lim : 4096 +nfiles : 4096 +ninode : 4096 +max_thread_proc : 4096 +nkthread : 4096</source> + </li> + </ul> + </section> + </section> + <section><title>Using SIPp</title> + <section> + <title>Main features</title> + <p>SIPp allows to generate one or many SIP calls to one remote + system. The tool is started from the command line. In this example, + two SIPp are started in front of each other to demonstrate SIPp + capabilities.</p> + <p>Run sipp with embedded server (uas) scenario:</p> + <source># ./sipp -sn uas</source> + <p>On the same host, run sipp with embedded client (uac) scenario</p> + <source># ./sipp -sn uac 127.0.0.1</source> + </section> + <section> + <title>Integrated scenarios</title> + <p>Integrated scenarios? Yes, there are scenarios that are embedded + in SIPp executable. While you can create your own custom SIP + scenarios (see <a href="#xmlsyntax">how to create your own XML + scenarios</a>), a few basic (yet useful) scenarios are available + in SIPp executable.</p> + <section> + <title>UAC</title> + <p>Scenario file: <a href="uac.xml.html">uac.xml</a> (<a href="uac.xml">original XML file</a>)</p> + <source>SIPp UAC Remote + |(1) INVITE | + |------------------>| + |(2) 100 (optional) | + |<------------------| + |(3) 180 (optional) | + |<------------------| + |(4) 200 | + |<------------------| + |(5) ACK | + |------------------>| + | | + |(6) PAUSE | + | | + |(7) BYE | + |------------------>| + |(8) 200 | + |<------------------| +</source> + </section> + <anchor id="uac_with_media"/><section> + <title>UAC with media</title> + <p>Scenario file: <a href="uac_pcap.xml.html">uac_pcap.xml</a> (<a href="uac_pcap.xml">original XML file</a>)</p> + <source>SIPp UAC Remote + |(1) INVITE | + |------------------>| + |(2) 100 (optional) | + |<------------------| + |(3) 180 (optional) | + |<------------------| + |(4) 200 | + |<------------------| + |(5) ACK | + |------------------>| + | | + |(6) RTP send (8s) | + |==================>| + | | + |(7) RFC2833 DIGIT 1| + |==================>| + | | + |(8) BYE | + |------------------>| + |(9) 200 | + |<------------------| +</source> + </section> + <section> + <title>UAS</title> + <p>Scenario file: <a href="uas.xml.html">uas.xml</a> (<a href="uas.xml">original XML file</a>)</p> + <source>Remote SIPp UAS + |(1) INVITE | + |------------------>| + |(2) 180 | + |<------------------| + |(3) 200 | + |<------------------| + |(4) ACK | + |------------------>| + | | + |(5) PAUSE | + | | + |(6) BYE | + |------------------>| + |(7) 200 | + |<------------------| +</source> + </section> + <section> + <title>regexp</title> + <p>Scenario file: <a href="regexp.xml.html">regexp.xml</a> (<a href="regexp.xml">original XML file</a>)</p> + <p>This scenario, which behaves as an UAC is explained in greater details in <a href="#action_regexp">this section</a>.</p> + <source>SIPp regexp Remote + |(1) INVITE | + |------------------>| + |(2) 100 (optional) | + |<------------------| + |(3) 180 (optional) | + |<------------------| + |(4) 200 | + |<------------------| + |(5) ACK | + |------------------>| + | | + |(6) PAUSE | + | | + |(7) BYE | + |------------------>| + |(8) 200 | + |<------------------| +</source> + </section> + <anchor id="scenario_branch" /><section> + <title>branch</title> + <p>Scenario files: <a href="branchc.xml.html">branchc.xml</a> (<a href="branchc.xml">original XML file</a>) and + <a href="branchs.xml.html">branchs.xml</a> (<a href="branchs.xml">original XML file</a>)</p> + <p>Those scenarios, which work against each other (branchc for client side and + branchs for server side) are explained in greater details in <a href="#branching">this section</a>.</p> + <source><![CDATA[ REGISTER ----------> + 200 <---------- + 200 <---------- + INVITE ----------> + 100 <---------- + 180 <---------- + 403 <---------- + 200 <---------- + ACK ----------> + [ 5000 ms] + BYE ----------> + 200 <----------]]></source> + </section> + <anchor id="ThreePCC" /><section> + <title>3PCC</title> + <p>3PCC stands for 3rd Party Call Control. 3PCC is described in + <a href="http://www.ietf.org/rfc/rfc3725.txt">RFC 3725</a>. + While this feature was first developped to allow 3PCC like scenarios, + it can also be used for every case where you would need one SIPp to talk + to several remotes.</p> + <p>In order to keep SIPp simple (remember, it's a test tool!), + one SIPp instance can only talk to one remote. Which is an issue + in 3PCC call flows, like call flow I (SIPp beeing a controller):</p> + <source> A Controller B + |(1) INVITE no SDP | | + |<------------------| | + |(2) 200 offer1 | | + |------------------>| | + | |(3) INVITE offer1 | + | |------------------>| + | |(4) 200 OK answer1 | + | |<------------------| + | |(5) ACK | + | |------------------>| + |(6) ACK answer1 | | + |<------------------| | + |(7) RTP | | + |.......................................| +</source> + <p>Scenario file: <a href="3pcc-A.xml.html">3pcc-A.xml</a> (<a href="3pcc-A.xml">original XML file</a>)</p> + <p>Scenario file: <a href="3pcc-B.xml.html">3pcc-B.xml</a> (<a href="3pcc-B.xml">original XML file</a>)</p> + <p>Scenario file: <a href="3pcc-C-A.xml.html">3pcc-C-A.xml</a> (<a href="3pcc-C-A.xml">original XML file</a>)</p> + <p>Scenario file: <a href="3pcc-C-B.xml.html">3pcc-C-B.xml</a> (<a href="3pcc-C-B.xml">original XML file</a>)</p> + <p>The 3PCC feature in SIPp allows to have two SIPp instances + launched and synchronised together. If we take the example of + call flow I, one SIPp instance will take care of the dialog with + remote A (this instance is called 3PCC-C-A for 3PCC-Controller-A-Side) + and another SIPp instance will take care of the dialog with remote B + (this instance is called 3PCC-C-B for 3PCC-Controller-B-Side).</p> + <p>The 3PCC call flow I will, in reality, look like this + (Controller has been divided in two SIPp instances):</p> + <source> + A Controller A Controller B B + |(1) INVITE no SDP | | | + |<------------------| | | + |(2) 200 offer1 | | | + |------------------>| | | + | sendCmd (offer1) | | + | |----------------->| | + | | recvCmd | + | | |(3) INVITE offer1 | + | | |------------------>| + | | |(4) 200 OK answer1 | + | | |<------------------| + | | sendCmd | + | | (answer1) | | + | |<-----------------| | + | recvCmd |(5) ACK | + | | |------------------>| + |(6) ACK answer1 | | | + |<------------------| | | + |(7) RTP | | | + |..........................................................| +</source> + <p>As you can see, we need to pass informations + between both sides of the controller. SDP "offer1" is provided + by A in message (2) and needs to be sent to B side in message (3). + This mechanism is implemented + in the scenarios through the <<a href="#sendCmd">sendCmd</a>> command. This:</p> +<source><sendCmd> + <![CDATA[ + Call-ID: [call_id] + [$1] + + ]]> +</sendCmd> +</source> + <p>Will send a "command" to the twin SIPp instance. Note that including + the Call-ID is mandatory in order to correlate the commands to + actual calls. In the same manner, this:</p> +<source><recvCmd> + <action + <ereg regexp="Content-Type:.*" + search_in="msg" + assign_to="2"/> + </action> +</recvCmd> +</source> + <p>Will receive a "command" from the twin SIPp instance. + Using the <a href="#action_regexp">regular expression</a> mechanism, + the content is retrieved + and stored in a call variable ($2 in this case), ready to be + reinjected</p> +<source> <send> + <![CDATA[ + + ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port] + From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number] + To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param] + Call-ID: [call_id] + CSeq: 1 ACK + Contact: sip:sipp@[local_ip]:[local_port] + Max-Forwards: 70 + Subject: Performance Test + [$2] + + ]]> + </send> +</source> + <p>In other words, <a href="#sendCmd">sendCmd</a> and <a href="#recvCmd">recvCmd</a> can be seen as synchronization points + between two SIPp instances, with the ability to pass parameters + between each other.</p> + <p>Another scenario that has been reported to be do-able with the + 3PCC feature is the following:</p> + <ul> + <li>A calls B. B answers. B and A converse</li> + <li>B calls C. C answers. C and B converse</li> + <li>B "REFER"s A to C and asks to replace A-B call with B-C call.</li> + <li>A accepts. A and C talk. B drops out of the calls.</li> + </ul> + </section> + </section> + <anchor id="ThreePCCExtended" /><section> + <title>3PCC Extended</title> + <p>An extension of the 3pcc mode is implemented in sipp. + This feature allows n twin sipp instances to communicate each other, + each one of them being connected to a remote host.</p> + <p>The sipp instance which initiates the call is launched in "master" mode. + The others are launched in "slave" mode. Twin sipp instances have names, + given in the command line (for example, s1, s2...sn for the slaves and m for the master) + Correspondances between instances names and their addresses must be stored in a file (provided by -slave_cfg command line + argument), in the following format:</p> +<source> + s1;127.0.0.1:8080 + s2;127.0.0.1:7080 + m;127.0.0.1:6080 +</source> + <p>Each twin sipp instance must access a different copy of this file.</p> + <p><a href="#sendCmd">sendCmd</a> and <a href="#recvCmd">recvCmd</a> have additional attributes:</p> +<source><sendCmd dest="s1"> + <![CDATA[ + Call-ID: [call_id] + From: m + [$1] + + ]]> +</sendCmd> +</source> + <p>Will send a command to the "s1" peer instance, which can be either master or slave, + depending on the command line argument, which must be consistent with the scenario: + a slave instance cannot have a sendCmd action before having any recvCmd. + Note that the message must contain a "From" field, filled with the name of the sender. </p> +<source><recvCmd src="m"> + <action + <ereg regexp="Content-Type:.*" + search_in="msg" + assign_to="2"/> + </action> +</recvCmd> +</source> + <p>Indicates that the twin command is expected to be received from the "m" peer instance.</p> + <p>Note that the master must be the launched at last.</p> + <p>There is no integrated scenarios for the 3pcc extended mode, but you can easily adapt those from 3pcc.</p> + <p><b>Example:</b> the following drawing illustrate the entire procedure. The arrows that are + shown between SIPp master and slaves depict only the synchronization commands exchanged between + the different SIPp instances. The SIP message exchange takes place as usual.<br/><br/> + <img alt="Master / slave feature" src="images/master_slave.png"></img> + </p> + </section> + <anchor id="traffic_control" /><section><title>Traffic control</title> + <p>SIPp generates SIP traffic according to the scenario specified. You + can control the number of calls (scenario) that are started per second. + This can be done either: </p> + <ul> + <li>Interactively, by pressing keys on the keyboard + <ul> + <li>'+' key to increase call rate by 1</li> + <li>'-' key to decrease call rate by 1</li> + <li>'*' key to increase call rate by 10</li> + <li>'/' key to decrease call rate by 10</li> + </ul> + </li> + <li>At starting time, by specifying parameters on the command line: + <ul> + <li>"-r" to specify the call rate in number of calls per seconds</li> + <li>"-rp" to specify the "<strong>r</strong>ate <strong>p</strong>eriod" + in milliseconds for the call rate (default is 1000ms/1sec). + This allows you to have n calls every m milliseconds (by using <code>-r n -rp m</code>). + <note>Example: run SIPp at 7 calls every 2 seconds (3.5 calls per second)</note> + <source>./sipp -sn uac -r 7 -rp 2000 127.0.0.1</source> + </li> + </ul> + </li> + </ul> + <p>You can also <strong>pause</strong> the traffic by pressing the 'p' key. + SIPp will stop placing new calls and wait until all current calls go to their end. + You can <strong>resume</strong> the traffic by pressing 'p' again.</p> + <p>To <strong>quit</strong> SIPp, press the 'q' key. + SIPp will stop placing new calls and wait until all current calls go to their end. + SIPp will then exit.</p> + <p>You can also force SIPp to <strong>quit</strong> immediatly by pressing the 'Q' key. + Current calls will be terminated by sending a BYE or CANCEL message (depending if the calls have been established or not). + The same behaviour is obtained by pressing 'q' twice.</p> + <note><strong>TIP:</strong> you can place a defined number of calls and + have SIPp exit when this is done. Use the <code>-m</code> option on the + command line.</note> + </section> + <anchor id="remote_control" /><section><title>Remote control</title> + <p>SIPp can be "remote-controlled" through a UDP socket. This allows for example</p> + <ul> + <li>To automate a series of actions, like increasing the call rate smoothly, + wait for 10 seconds, increase more, wait for 1 minute and loop</li> + <li>Have a feedback loop so that an application under test can + remote control SIPp to lower the load, pause the traffic, ...</li> + </ul> + <p>Each SIPp instance is listening to a UDP socket. It + starts to listen to port 8888 and each following SIPp instance (up to 60) + will listen to base_port + 1 (8889, 8890, ...).</p> + <p>It is then possible to control SIPp like this:</p> + <source>echo p >/dev/udp/x.y.z.t/8888 -> put SIPp in pause state (p key) +echo q >/dev/udp/x.y.z.t/8888 -> quit SIPp (q key)</source> + <note>All keys available through keyboard are also available in + the remote control interface</note> + <p>You could also have a small shell script to automate a serie of action. + For example, this script will + increase the call rate by 10 more new calls/s every 5 seconds, wait at this call rate + for one minute and exit SIPp:</p> + <source>#!/bin/sh +echo "*" >/dev/udp/127.0.0.1/8889 +sleep 5 +echo "*" >/dev/udp/127.0.0.1/8889 +sleep 5 +echo "*" >/dev/udp/127.0.0.1/8889 +sleep 5 +echo "*" >/dev/udp/127.0.0.1/8889 +sleep 60 +echo "q" >/dev/udp/127.0.0.1/8889 +</source> + </section> + <section><title>Running SIPp in background</title> + <p>SIPp can be launched in background mode (<code>-bg</code> command + line option).</p> + <p>By doing so, SIPp will be detached from the current terminal and run + in the background. The PID of the SIPp process is provided. If you didn't specify a number of calls to execute + with the <code>-m</code> option, SIPp will run forever.</p> + <p>There is a mechanism implemented to stop SIPp smoothly. The command + <code>kill -SIGUSR1 [SIPp_PID]</code> will instruct SIPp to stop placing + any new calls and finish all ongoing calls before exiting.</p> + <p>When using the background mode, the main sipp instance stops and a child process will continue the job. Therefore, + the log files names will contain another PID than the actual sipp instance PID. </p> + </section> + <anchor id="xmlsyntax" /><section><title>Create your own XML scenarios</title> + <p>Of course embedded scenarios will not be enough. So it's time to + create your own scenarios. A SIPp scenario is written in XML + (a DTD that may help you write SIPp + scenarios does exist and has been tested with jEdit - this is described in a later section). + A scenario will always start with:</p> + <source><?xml version="1.0" encoding="ISO-8859-1" ?> +<scenario name="Basic Sipstone UAC"> +</source> + <p>And end with:</p> +<source></scenario></source> + <p>Easy, huh? Ok, now let's see what can be put inside. You are not + obliged to read the whole table now! Just go in the next section for + an example.</p> + <table> + <caption>List of commands with their attributes</caption> + <tr> + <th>Command</th> + <th>Attribute(s)</th> + <th>Description</th> + <th>Example</th> + </tr> + <tr> + <td><anchor id="send"/><strong><send></strong></td> + <td>retrans</td> + <td>Used for UDP transport only: it specifies the T1 timer value, + as described in SIP RFC 3261, section 17.1.1.2.</td> + <td><code><send retrans="500"></code>: will initiate T1 timer to 500 milliseconds (RFC3261 default).</td> + </tr> + <tr> + <td><anchor id="start_rtd"/></td> + <td>start_rtd</td> + <td>Starts one of the 5 "<strong>R</strong>esponse <strong>T</strong>ime <strong>D</strong>uration" timer. + (see <a href="#Response+times">statistics section</a>).</td> + <td><code><send start_rtd="2"></code>: the timer number 2 will start when the message is sent.</td> + </tr> + <tr> + <td><anchor id="rtd"/></td> + <td>rtd</td> + <td>Stops one of the 5 "<strong>R</strong>esponse <strong>T</strong>ime <strong>D</strong>uration" timer.</td> + <td><code><send rtd="2"></code>: the timer number 2 will stop when the message is sent.</td> + </tr> + <tr> + <td></td> + <td>repeat_rtd</td> + <td>Used with a rtd attribute, it allows the corresponding "<strong>R</strong>esponse <strong>T</strong>ime <strong>D</strong>uration" timer + to be counted more than once per call (useful for loop call flows). </td> + <td><code><send rtd="1" repeat_rtd="true"></code>: the timer number 1 value will be printed but the timer won't stop.</td> + </tr> + <tr> + <td></td> + <td>crlf</td> + <td>Displays an empty line <strong>after</strong> the arrow for the message in main SIPp screen.</td> + <td><code><send crlf="true"></code></td> + </tr> + <tr> + <td></td> + <td>lost</td> + <td>Emulate packet lost. The value is specified as a percentage.</td> + <td><code><send lost="10"></code>: 10% of the message sent are actually not sent :).</td> + </tr> + <tr> + <td></td> + <td>next</td> + <td>You can put a "next" in a send to go to another part of the script when you are done with sending the message. + See <a href="#branching">conditional branching</a> section for more info.</td> + <td>Example to jump to label "12" after sending an ACK:<source><![CDATA[ <send next="12"> + <![CDATA[ + + ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0 + Via: ... + From: ... + To: ... + Call-ID: ... + Cseq: ... + Contact: ... + Max-Forwards: ... + Subject: ... + Content-Length: 0 + + ]]>]]> + </send> +</source></td> + </tr> + <tr> + <td></td> + <td>test</td> + <td>You can put a "test" next to a "next" attribute to indicate + that you only want to branch to the label specified with "next" + if the variable specified in "test" is set (through <a href="#action_regexp">regexp</a> + for example). + See <a href="#branching">conditional branching</a> section for more info.</td> + <td>Example to jump to label "6" after sending an ACK only if + variable 4 is set:<source><![CDATA[ <send next="6" test="4"> + <![CDATA[ + + ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0 + Via: ... + From: ... + To: ... + Call-ID: ... + Cseq: ... + Contact: ... + Max-Forwards: ... + Subject: ... + Content-Length: 0 + + ]]>]]> + </send> +</source></td> + </tr> + <tr> + <td></td> + <td>counter</td> + <td>Increments the counter given as parameter when the message is sent. A total of 5 counter can be used. + The counter are saved in the <a href="#Available+counters">statistic file</a>.</td> + <td><code><send counter="1"></code>: Increments counter #1 when the message is sent.</td> + </tr> + <tr> + <td><anchor id="recv"/><strong><recv></strong></td> + <td>response</td> + <td>Indicates what SIP message code is expected.</td> + <td><code><recv response="200"></code>: SIPp will expect a SIP message with code "200".</td> + </tr> + <tr> + <td></td> + <td>request</td> + <td>Indicates what SIP message request is expected.</td> + <td><code><recv request="ACK"></code>: SIPp will expect an "ACK" SIP message.</td> + ... [truncated message content] |