Skip to content

Commit

Permalink
docs reformating and xml highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
nshopik committed Mar 22, 2017
1 parent 53129c6 commit 51b554c
Show file tree
Hide file tree
Showing 13 changed files with 328 additions and 182 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,4 @@



highlight_language = 'XML'
4 changes: 2 additions & 2 deletions docs/controlling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ and also a simple command mode. The hot keys are:
===== ======
Key Action
===== ======
\+ Increase the call rate by 1 * rate_scale
\+ Increase the call rate by 1 * rate_scale
\* Increase the call rate by 10 * rate_scale
\- Decrease the call rate by 1 * rate_scale
\- Decrease the call rate by 1 * rate_scale
/ Decrease the call rate by 10 * rate_scale
c Enter command mode
q Quit SIPp (after all calls complete, enter a second time to quit immediately)
Expand Down
16 changes: 12 additions & 4 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ be confident that all mentioned features will work :)
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).

`SIPp stable download page <https://github.com/SIPp/sipp/releases>`_


Expand All @@ -33,7 +34,7 @@ Unstable release
````````````````

Unstable release: all new features and bug fixes are checked in
`SIPp's SVN`_ repository as soon as they are available.
`SIPp's master tree`_ repository as soon as they are available.

.. note::
Use the unstable release if you absolutely need a bug fix or a feature
Expand Down Expand Up @@ -82,9 +83,9 @@ Installing SIPp


+ With TLS support,
you must have installed `OpenSSL library`_(>=0.9.8) (which may come
with your system). Building SIPp consists only in adding the "--with-openssl"
option to the configure command:
you must have installed `OpenSSL library`_ (>=0.9.8) (which may come
with your system). Building SIPp consists only in adding the "--with-openssl"
option to the configure command:

::

Expand Down Expand Up @@ -141,3 +142,10 @@ option to the configure command:
+ Remove or rename "pthread.h" in "C:\cygwin\lib\WpdPack\Include", as
it interfers with pthread.h from cygwin
+ Compile according to the instructions above.

.. _GNU GPL license: http://www.gnu.org/copyleft/gpl.html
.. _Gnu Scientific Libraries: http://www.gnu.org/software/gsl/
.. _WinPcap developer package: http://www.winpcap.org/devel.htm
.. _hewlett-packard: http://www.hp.com/
.. _SIPp's master tree: https://github.com/SIPp/sipp/tree/master
.. _OpenSSL library: http://www.openssl.org/
4 changes: 2 additions & 2 deletions docs/int_scenarios.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ or -oocsn command line options.
3PCC
````

3PCC stands for 3rd Party Call Control. 3PCC is described in `RFC
3725`_. While this feature was first developed to allow 3PCC like
3PCC stands for 3rd Party Call Control. 3PCC is described in
:rfc:`3725`. While this feature was first developed to allow 3PCC like
scenarios, it can also be used for every case where you would need one
SIPp to talk to several remotes.

Expand Down
8 changes: 4 additions & 4 deletions docs/media.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ PCAP Play

The PCAP play feature makes use of the `PCAP library`_ to replay pre-
recorded RTP streams towards a destination. RTP streams can be
recorded by tools like `Wireshark`_ (formerly known as Ethereal) or
`tcpdump`_. This allows you to:
recorded by tools like Wireshark or ``tcpdump``. This allows you to:


+ Play any RTP stream (voice, video, voice+video, out of band
Expand All @@ -42,13 +41,13 @@ recorded by tools like `Wireshark`_ (formerly known as Ethereal) or
will try to replay the RTP stream as it was recorded (limited to the
performances of the system).
+ Reproduce exactly what has been captured using an IP sniffer like
`Wireshark`_.
Wireshark.


A good example is the UAC with media (uac_pcap) embedded scenario.

SIPp comes with a G711 alaw pre-recorded pcap file and out of band
(RFC 2833) DTMFs in the pcap/ directory.
(:rfc:`2833`) DTMFs in the pcap/ directory.

.. warning::
The PCAP play feature uses pthread_setschedparam calls from pthread
Expand All @@ -60,3 +59,4 @@ SIPp comes with a G711 alaw pre-recorded pcap file and out of band
More details on the possible PCAP play actions can be found in the
action reference section.

.. _PCAP library: http://www.tcpdump.org/pcap3_man.html
105 changes: 60 additions & 45 deletions docs/scenarios/actions.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Actions
=======

In a "recv" or "recvCmd" command, you have the possibility to execute
In a `recv`_ or `recvCmd`_ command, you have the possibility to execute
an action. Several actions are available:


+ Regular expressions (ereg)
+ `Regular expressions`_ (ereg)
+ Log something in aa log file (log)
+ Execute an external (system), internal (int_cmd) or
pcap_play_audio/pcap_play_video command (exec)
Expand Down Expand Up @@ -42,33 +42,47 @@ Here is the syntax of the regexp action:

regexp action syntax
````````````````````
Keyword Default Description regexp None Contains the regexp to use for
matching the received message or header. MANDATORY. search_in msg can
have four values: "msg" (try to match against the entire message);
"hdr" (try to match against a specific SIP header); "body" (try to
match against the SIP message body); or "var" (try to match against a
SIPp string variable). header None Header to try to match against.
Only used when the search_in tag is set to hdr. MANDATORY IF search_in
is equal to hdr. variable None Variable to try to match against. Only
used when the search_in tag is set to var. MANDATORY IF search_in is
equal to var. case_indep false To look for a header ignoring case .
Only used when the search_in tag is set to hdr. occurence 1 To find
the nth occurence of a header. Only used when the search_in tag is set
to hdr. start_line false To look only at start of line. Only used when
the search_in tag is set to hdr. check_it false if set to true, the
call is marked as failed if the regexp doesn't match. Can not be
combined with check_it_inverse. check_it_inverse false Inverse of
check_it. iff set to true, the call is marked as failed if the regexp
does match. Can not be combined with check_it. assign_to None contain
the variable id (integer) or a list of variable id which will be used
to store the result(s) of the matching process between the regexp and
the message. Those variables can be re-used at a later time either by
using '[$n]' in the scenario to inject the value of the variable in
the messages or by using the content of the variables for conditional
branching. The first variable in the variable list of assign_to
contains the entire regular expression matching. The following
variables contain the sub-expressions matching. Example:

================ ======= ===========
Keyword Default Description
================ ======= ===========
regexp None Contains the regexp to use for
matching the received message or header. MANDATORY.
search_in msg can have four values: "msg" (try to match against the entire message),
"hdr" (try to match against a specific SIP header), "body" (try to
match against the SIP message body), or "var" (try to match against a
SIPp string variable).
header None Header to try to match against.
Only used when the search_in tag is set to hdr. MANDATORY IF search_in
is equal to hdr.
variable None Variable to try to match against. Only
used when the search_in tag is set to var. MANDATORY IF search_in is
equal to var.
case_indep false To look for a header ignoring case .
Only used when the search_in tag is set to hdr.
occurence 1 To find the nth occurence of a header. Only used when the search_in tag is set
to hdr.
start_line false To look only at start of line. Only used when
the search_in tag is set to hdr.
check_it false if set to true, the
call is marked as failed if the regexp doesn't match. Can not be
combined with check_it_inverse.
check_it_inverse false Inverse of
check_it. iff set to true, the call is marked as failed if the regexp
does match. Can not be combined with check_it.
assign_to None contain
the variable id (integer) or a list of variable id which will be used
to store the result(s) of the matching process between the regexp and
the message. Those variables can be re-used at a later time either by
using '[$n]' in the scenario to inject the value of the variable in
the messages or by using the content of the variables for conditional
branching. The first variable in the variable list of assign_to
contains the entire regular expression matching. The following
variables contain the sub-expressions matching.
================ ======= ===========

Example for assign_to
---------------------
::

<ereg regexp="o=([[:alnum:]]*) ([[:alnum:]]*) ([[:alnum:]]*)"
Expand Down Expand Up @@ -123,9 +137,9 @@ The "log" action allows you to customize your traces. Messages are
printed in the <scenario file name>_<pid>_logs.log file. Any keyword
is expanded to reflect the value actually used.

Warning
Logs are generated only if -trace_logs option is set on the command
line.
.. warning::
Logs are generated only if -trace_logs option is set on the command line.

Example:

::
Expand Down Expand Up @@ -229,14 +243,14 @@ play_pcap_audio="[file_to_play]" with:
+ file_to_play: the pre-recorded pcap file to play


Note
The action is non-blocking. SIPp will start a light-weight thread to
play the file and the scenario with continue immediately. If needed,
you will need to add a pause to wait for the end of the pcap play.
Warning
A known bug means that starting a pcap_play_audio command will end any
pcap_play_video command, and vice versa; you cannot play both audio
and video streams at once.
.. note::
The action is non-blocking. SIPp will start a light-weight thread to
play the file and the scenario with continue immediately. If needed,
you will need to add a pause to wait for the end of the pcap play.
.. warning::
A known bug means that starting a pcap_play_audio command will end any
pcap_play_video command, and vice versa; you cannot play both audio
and video streams at once.

Example that plays a pre-recorded RTP stream:

Expand Down Expand Up @@ -511,12 +525,12 @@ connects to the value specified in the [next_url] keyword.


Warning
If you are using setdest with IPv6, you must not use square brackets
around the address. These have a special meaning to SIPp, and it will
try to interpret your IPv6 address as a variable.
Since the port is specified separately, square brackets are never
necessary.
:: warning..
If you are using setdest with IPv6, you must not use square brackets
around the address. These have a special meaning to SIPp, and it will
try to interpret your IPv6 address as a variable.
Since the port is specified separately, square brackets are never
necessary.


verifyauth
Expand Down Expand Up @@ -566,3 +580,4 @@ on the result:
<nop hide="true" test="authvalid" next="goodauth" />
<nop hide="true" next="badauth" />

.. _PCAP library: http://www.tcpdump.org/pcap3_man.html
2 changes: 2 additions & 0 deletions docs/scenarios/cond_branching.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _cond-branching:

Conditional branching
`````````````````````

Expand Down
Loading

0 comments on commit 51b554c

Please sign in to comment.