Module: kamailio
Branch: master
Commit: 0ec6eef89dd64c2c6e7acf813c35bf9d7c2ed61e
URL: https://github.com/kamailio/kamailio/commit/0ec6eef89dd64c2c6e7acf813c35bf9…
Author: Holger Hans Peter Freyther <holger(a)moiji-mobile.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-11-12T11:49:21+01:00
ss7ops: Introduce the beginning of a ss7ops module
This can be used with sipcapture and begings with M2UA and ISUP
support. More SIGTRAN (M3UA, SUA) support is planned and maybe
TCAP/MAP in the future.
The ISUP message format depends on the specific message so I have
exported a Smalltalk ITU ISUP model to C to avoid manual errors.
---
Added: modules/ss7ops/Makefile
Added: modules/ss7ops/README
Added: modules/ss7ops/doc/Makefile
Added: modules/ss7ops/doc/ss7ops.xml
Added: modules/ss7ops/doc/ss7ops_admin.xml
Added: modules/ss7ops/isup_generated.c
Added: modules/ss7ops/isup_generated.h
Added: modules/ss7ops/isup_parsed.c
Added: modules/ss7ops/isup_parsed.h
Added: modules/ss7ops/ss7.c
---
Diff: https://github.com/kamailio/kamailio/commit/0ec6eef89dd64c2c6e7acf813c35bf9…
Patch: https://github.com/kamailio/kamailio/commit/0ec6eef89dd64c2c6e7acf813c35bf9…
Module: kamailio
Branch: master
Commit: 7360b0d5ce4fe895e44587a797cfef022d399d68
URL: https://github.com/kamailio/kamailio/commit/7360b0d5ce4fe895e44587a797cfef0…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2016-11-11T14:46:13+01:00
modules: readme files regenerated - jsonrpc-s ...
---
Modified: modules/jsonrpc-s/README
---
Diff: https://github.com/kamailio/kamailio/commit/7360b0d5ce4fe895e44587a797cfef0…
Patch: https://github.com/kamailio/kamailio/commit/7360b0d5ce4fe895e44587a797cfef0…
---
diff --git a/modules/jsonrpc-s/README b/modules/jsonrpc-s/README
index 3a22e54..780f932 100644
--- a/modules/jsonrpc-s/README
+++ b/modules/jsonrpc-s/README
@@ -39,10 +39,11 @@ Daniel-Constantin Mierla
5.1. jsonrpc_dispatch()
5.2. jsonrpc_exec(cmd)
- 6. JSONRPC Transports
+ 6. JSONRPC Commands
+ 7. JSONRPC Transports
- 6.1. JSONRPC Over HTTP
- 6.2. JSONRPC Over FIFO
+ 7.1. JSONRPC Over HTTP
+ 7.2. JSONRPC Over FIFO
List of Examples
@@ -55,8 +56,9 @@ Daniel-Constantin Mierla
1.7. Set fifo_reply_dir parameter
1.8. jsonrpc_dispatch usage
1.9. jsonrpc_exec usage
- 1.10. JSONRPC Over Fifo Command
- 1.11. JSONRPC Over Fifo Command From Termina
+ 1.10. JSONRPC Commands - Examples
+ 1.11. JSONRPC Over Fifo Command
+ 1.12. JSONRPC Over Fifo Command From Termina
Chapter 1. Admin Guide
@@ -84,10 +86,11 @@ Chapter 1. Admin Guide
5.1. jsonrpc_dispatch()
5.2. jsonrpc_exec(cmd)
- 6. JSONRPC Transports
+ 6. JSONRPC Commands
+ 7. JSONRPC Transports
- 6.1. JSONRPC Over HTTP
- 6.2. JSONRPC Over FIFO
+ 7.1. JSONRPC Over HTTP
+ 7.2. JSONRPC Over FIFO
1. Overview
@@ -287,17 +290,59 @@ event_route[xhttp:request] {
jsonrpc_exec({"jsonrpc": "2.0", "method": "dispatcher.reload", "id": 1}');
...
-6. JSONRPC Transports
+6. JSONRPC Commands
- 6.1. JSONRPC Over HTTP
- 6.2. JSONRPC Over FIFO
+ Here are some examples of RPC commands with the equivalent of running
+ them with kamcmd and the corresponding JSON document for them. It is
+ important to be aware that the name of the parameters doesn't matter,
+ only the order of the values must be the one expected by Kamailio RPC
+ command.
+
+ Example 1.10. JSONRPC Commands - Examples
+...
+# kamcmd core.psx
+
+{
+ "jsonrpc": "2.0",
+ "method": "core.psx",
+ "id": 1
+}
+...
+## - prototype: kamcmd dispatcher.set_state _state_ _group_ _address_
+# kamcmd dispatcher.set_state ip 2 sip:127.0.0.1:5080
+
+{
+ "jsonrpc": "2.0",
+ "method": "dispatcher.set_state",
+ "params": ["ip", 2, "sip:127.0.0.1:5080"],
+ "id": 1
+}
+
+## - or:
+
+{
+ "jsonrpc": "2.0",
+ "method": "dispatcher.set_state",
+ "params": {
+ "state": "ip",
+ "grpup": 2,
+ "address": "sip:127.0.0.1:5080"
+ },
+ "id": 1
+}
+...
+
+7. JSONRPC Transports
+
+ 7.1. JSONRPC Over HTTP
+ 7.2. JSONRPC Over FIFO
JSONRPC specifications do not enforce a specific transport to carry the
JSON documents. Very common is JSONRPC over HTTP or HTTPS, and they are
supported by Kamailio. In addition, Kamailio supports receiving JSON
documents via a local FIFO file.
-6.1. JSONRPC Over HTTP
+7.1. JSONRPC Over HTTP
It requires that XHTTP module is loaded. HTTPS can be used if you
enable TLS for Kamailio. The JSONRPC requests have to be sent to the
@@ -307,7 +352,7 @@ jsonrpc_exec({"jsonrpc": "2.0", "method": "dispatcher.reload", "id": 1}');
The format of the JSON document must follow the JSONRPC specifications.
-6.2. JSONRPC Over FIFO
+7.2. JSONRPC Over FIFO
This module can retrive JSONRPC requests via a local FIFO file. To
enable this feature, 'fifo_name' parameter must be set and 'transport'
@@ -320,7 +365,7 @@ jsonrpc_exec({"jsonrpc": "2.0", "method": "dispatcher.reload", "id": 1}');
'fifo_reply_dir'. Next is an example showing a JSONRPC command to be
sent via FIFO transport.
- Example 1.10. JSONRPC Over Fifo Command
+ Example 1.11. JSONRPC Over Fifo Command
...
{
"jsonrpc": "2.0",
@@ -333,7 +378,7 @@ jsonrpc_exec({"jsonrpc": "2.0", "method": "dispatcher.reload", "id": 1}');
Next is an example of how to test it from a terminal, assuming that the
parameter 'fifo_name' is set to '/tmp/kamailio_jsonrpc_fifo'.
- Example 1.11. JSONRPC Over Fifo Command From Termina
+ Example 1.12. JSONRPC Over Fifo Command From Termina
...
mkfifo /tmp/kamailio_jsonrpc_reply_fifo
cat /tmp/kamailio_jsonrpc_reply_fifo &
Module: kamailio
Branch: master
Commit: cdd703dcae172ad0692877addaa9fea80c06defc
URL: https://github.com/kamailio/kamailio/commit/cdd703dcae172ad0692877addaa9fea…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-11-11T14:33:09+01:00
jsonrpc-s: added section to show examples with rpc commands over jsonrpc
---
Modified: modules/jsonrpc-s/doc/jsonrpc-s_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/cdd703dcae172ad0692877addaa9fea…
Patch: https://github.com/kamailio/kamailio/commit/cdd703dcae172ad0692877addaa9fea…
---
diff --git a/modules/jsonrpc-s/doc/jsonrpc-s_admin.xml b/modules/jsonrpc-s/doc/jsonrpc-s_admin.xml
index 4684f52..a2ce518 100644
--- a/modules/jsonrpc-s/doc/jsonrpc-s_admin.xml
+++ b/modules/jsonrpc-s/doc/jsonrpc-s_admin.xml
@@ -10,9 +10,9 @@
<!-- Module User's Guide -->
<chapter>
-
+
<title>&adminguide;</title>
-
+
<section>
<title>Overview</title>
<para>
@@ -85,7 +85,7 @@
<section id="jsonrpc-s.p.pretty_format">
<title><varname>pretty_format</varname> (int)</title>
<para>
- Pretty format for JSON-RPC response document.
+ Pretty format for JSON-RPC response document.
</para>
<para>
<emphasis>
@@ -137,7 +137,7 @@ modparam("jsonrpc-s", "transport", 1)
<section id="jsonrpc-s.p.fifo_name">
<title><varname>fifo_name</varname> (str)</title>
<para>
- The name of the FIFO file to be created for listening and
+ The name of the FIFO file to be created for listening and
reading external commands. If the given path is not absolute,
the fifo file is created relative to run_dir (global parameter).
</para>
@@ -159,7 +159,7 @@ modparam("jsonrpc-s", "fifo_name", "/tmp/kamailio_jsonrpc_fifo")
<section id="jsonrpc-s.p.fifo_mode">
<title><varname>fifo_mode</varname> (int)</title>
<para>
- Permission to be used for creating the listening FIFO file. It
+ Permission to be used for creating the listening FIFO file. It
follows the UNIX conventions.
</para>
<para>
@@ -322,12 +322,60 @@ jsonrpc_exec({"jsonrpc": "2.0", "method": "dispatcher.reload", "id": 1}');
</section>
<section>
+ <title>JSONRPC Commands</title>
+ <para>
+ Here are some examples of RPC commands with the equivalent of running them
+ with &kamcmd; and the corresponding JSON document for them. It is important
+ to be aware that the name of the parameters doesn't matter, only the order
+ of the values must be the one expected by &kamailio; RPC command.
+ </para>
+ <example>
+ <title>JSONRPC Commands - Examples</title>
+ <programlisting format="linespecific">
+...
+# kamcmd core.psx
+
+{
+ "jsonrpc": "2.0",
+ "method": "core.psx",
+ "id": 1
+}
+...
+## - prototype: kamcmd dispatcher.set_state _state_ _group_ _address_
+# kamcmd dispatcher.set_state ip 2 sip:127.0.0.1:5080
+
+{
+ "jsonrpc": "2.0",
+ "method": "dispatcher.set_state",
+ "params": ["ip", 2, "sip:127.0.0.1:5080"],
+ "id": 1
+}
+
+## - or:
+
+{
+ "jsonrpc": "2.0",
+ "method": "dispatcher.set_state",
+ "params": {
+ "state": "ip",
+ "grpup": 2,
+ "address": "sip:127.0.0.1:5080"
+ },
+ "id": 1
+}
+...
+</programlisting>
+ </example>
+
+ </section>
+
+ <section>
<title>JSONRPC Transports</title>
<para>
JSONRPC specifications do not enforce a specific transport to carry the
JSON documents. Very common is JSONRPC over HTTP or HTTPS, and they are
supported by &kamailio;. In addition, &kamailio; supports receiving JSON
- documents via a local FIFO file.
+ documents via a local FIFO file.
</para>
<section>
<title>JSONRPC Over HTTP</title>