/usr/share/doc/opensips/README.signaling is in opensips 2.2.2-3build4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | signaling Module
Anca-Maria Vamanu
Edited by
Anca-Maria Vamanu
Copyright © 2008 FhG FOKUS
Revision History
Revision $Revision: 5901 $ $Date$
__________________________________________________________
Table of Contents
1. Admin Guide
1.1. Overview
1.2. Dependencies
1.2.1. OpenSIPS Modules
1.2.2. External Libraries or Applications
1.3. Exported Parameters
1.4. Exported Functions
1.4.1. send_reply(code, reason)
List of Examples
1.1. sl_send_reply usage
Chapter 1. Admin Guide
1.1. Overview
The SIGNALING module comes as a wrapper over tm and sl modules
and offers one function to be called by the modules that want
to send a reply.
The logic behind the module is to first search if a transaction
is created and if so, send a state full reply, using tm module,
otherwise send a stateless reply with the function exported by
sl. In this way, the script writer still has the call on how
the transaction should be handled, state full or stateless and
the reply is send accordingly to his choice.
For example, if you do a t_newtran() in the script before doing
save() (for registration), the function will automatically send
the reply in stateful mode as a transaction is available. If no
transaction is done, the reply will be sent in stateless way
(as now).
By doing this, we have the possibility to have same module
sending either stateful either stateless replies, by just
controlling this from the script (if we create or not a
transaction). So, the signalling will be more coherent as the
replies will be sent according to the transaction presence (or
not).
Moreover, this module offers the possibility of loading only
one of the module, sl or tm, and send reply using only the
module that is loaded. This is useful as not in all cases a
user desires to send stateful or stateless replies and he
should not be forced to load the module only because the send
reply interface requires it.
1.2. Dependencies
1.2.1. OpenSIPS Modules
At least one of the following modules must be loaded before
this module:
* sl.
* tm.
1.2.2. External Libraries or Applications
The following libraries or applications must be installed
before running OpenSIPS with this module loaded:
* None.
1.3. Exported Parameters
* None.
1.4. Exported Functions
1.4.1. send_reply(code, reason)
For the current request, a reply is sent back having the given
code and text reason. The reply is sent stateless or statefull
depending on which module is loaded and if a transaction was
created, as explained above.
Meaning of the parameters is as follows:
* code - Return code.
* reason - Reason phrase.
This function can be used from REQUEST_ROUTE, ERROR_ROUTE.
Example 1.1. sl_send_reply usage
...
send_reply("404", "Not found");
...
send_reply("$err.rcode", "$err.rreason");
...
|