[sr-dev] [kamailio/kamailio] dmq: add optional parameter to dmq_handle_message() (#1626)

2018-08-30 Thread Emmanuel Schmidbauer

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1626

-- Commit Summary --

  * dmq: add optional parameter to dmq_handle_message()

-- File Changes --

M src/modules/dmq/dmq.c (4)
M src/modules/dmq/doc/dmq_admin.xml (12)
M src/modules/dmq/message.c (19)
M src/modules/dmq/message.h (3)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1626.patch
https://github.com/kamailio/kamailio/pull/1626.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1626
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:7f848ef9: modules: readme files regenerated - uac ... [skip ci]

2018-08-30 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 7f848ef96f8dbe27b71d4436ffaf2291e488aac7
URL: 
https://github.com/kamailio/kamailio/commit/7f848ef96f8dbe27b71d4436ffaf2291e488aac7

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2018-08-30T12:31:37+02:00

modules: readme files regenerated - uac ... [skip ci]

---

Modified: src/modules/uac/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/7f848ef96f8dbe27b71d4436ffaf2291e488aac7.diff
Patch: 
https://github.com/kamailio/kamailio/commit/7f848ef96f8dbe27b71d4436ffaf2291e488aac7.patch

---

diff --git a/src/modules/uac/README b/src/modules/uac/README
index 6a47fbccf2..e7cc136dd2 100644
--- a/src/modules/uac/README
+++ b/src/modules/uac/README
@@ -43,12 +43,12 @@ Ramona-Elena Modroiu
   3.10. auth_username_avp (string)
   3.11. auth_password_avp (string)
   3.12. reg_db_url (string)
-  3.13. reg_timer_interval (string)
+  3.13. reg_timer_interval (int)
   3.14. reg_retry_interval (int)
   3.15. reg_random_delay (int)
   3.16. reg_db_table (string)
   3.17. reg_contact_addr (string)
-  3.18. reg_keep_callid (string)
+  3.18. reg_keep_callid (int)
   3.19. reg_active (int)
 
 4. Functions
@@ -155,12 +155,12 @@ Chapter 1. Admin Guide
 3.10. auth_username_avp (string)
 3.11. auth_password_avp (string)
 3.12. reg_db_url (string)
-3.13. reg_timer_interval (string)
+3.13. reg_timer_interval (int)
 3.14. reg_retry_interval (int)
 3.15. reg_random_delay (int)
 3.16. reg_db_table (string)
 3.17. reg_contact_addr (string)
-3.18. reg_keep_callid (string)
+3.18. reg_keep_callid (int)
 3.19. reg_active (int)
 
4. Functions
@@ -259,12 +259,12 @@ Chapter 1. Admin Guide
3.10. auth_username_avp (string)
3.11. auth_password_avp (string)
3.12. reg_db_url (string)
-   3.13. reg_timer_interval (string)
+   3.13. reg_timer_interval (int)
3.14. reg_retry_interval (int)
3.15. reg_random_delay (int)
3.16. reg_db_table (string)
3.17. reg_contact_addr (string)
-   3.18. reg_keep_callid (string)
+   3.18. reg_keep_callid (int)
3.19. reg_active (int)
 
 3.1. rr_from_store_param (string)
@@ -443,7 +443,7 @@ modparam("uac", "reg_db_url",
 "mysql://kamailio:kamailiorw@localhost/kamailio")
 ...
 
-3.13. reg_timer_interval (string)
+3.13. reg_timer_interval (int)
 
Timer interval (in seconds) at which registrations are managed, e.g.
renewed as needed.
@@ -504,7 +504,7 @@ modparam("uac", "reg_db_table", "uacreg")
 modparam("uac", "reg_contact_addr", "192.168.1.2:5080")
 ...
 
-3.18. reg_keep_callid (string)
+3.18. reg_keep_callid (int)
 
If set to 0 (default), a new Call-Id will be generated for each
registration attempt. If set to non-zero, the same Call-Id will be used


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:84f30a22: uac: docs - fixed types of some params and removed trailing white spaces

2018-08-30 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 84f30a2207084457d7053535e1ae84bd8ea855ec
URL: 
https://github.com/kamailio/kamailio/commit/84f30a2207084457d7053535e1ae84bd8ea855ec

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-08-30T12:20:44+02:00

uac: docs - fixed types of some params and removed trailing white spaces

---

Modified: src/modules/uac/doc/uac_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/84f30a2207084457d7053535e1ae84bd8ea855ec.diff
Patch: 
https://github.com/kamailio/kamailio/commit/84f30a2207084457d7053535e1ae84bd8ea855ec.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:056b98d6: sipjson: serialize reply status code and reason phrase in default attributes

2018-08-30 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 056b98d6717af79eb4f40a5d02cd343bdac8c628
URL: 
https://github.com/kamailio/kamailio/commit/056b98d6717af79eb4f40a5d02cd343bdac8c628

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-08-30T12:18:11+02:00

sipjson: serialize reply status code and reason phrase in default attributes

---

Modified: src/modules/sipjson/sipjson_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/056b98d6717af79eb4f40a5d02cd343bdac8c628.diff
Patch: 
https://github.com/kamailio/kamailio/commit/056b98d6717af79eb4f40a5d02cd343bdac8c628.patch

---

diff --git a/src/modules/sipjson/sipjson_mod.c 
b/src/modules/sipjson/sipjson_mod.c
index 1dc82eb777..ca6ea8e8bd 100644
--- a/src/modules/sipjson/sipjson_mod.c
+++ b/src/modules/sipjson/sipjson_mod.c
@@ -285,6 +285,9 @@ static int sj_serialize_data(sip_msg_t* msg, srjson_doc_t 
*jdoc, str* smode)
srjson_AddStrStrToObject(jdoc, jr, "rU", 2, "", 0);
srjson_AddStrStrToObject(jdoc, jr, "rd", 2, "", 0);
srjson_AddNumberToObject(jdoc, jr, "rp", 0);
+   srjson_AddNumberToObject(jdoc, jr, "rs", 
msg->first_line.u.reply.statuscode);
+   srjson_AddStrStrToObject(jdoc, jr, "rr", 2,
+   msg->first_line.u.reply.reason.s, 
msg->first_line.u.reply.reason.len);
} else {
if(msg->parsed_uri_ok==0 && parse_sip_msg_uri(msg)<0) {
srjson_AddStrStrToObject(jdoc, jr, "rU", 2, "", 0);
@@ -296,6 +299,8 @@ static int sj_serialize_data(sip_msg_t* msg, srjson_doc_t 
*jdoc, str* smode)
sj_add_xuri_attr(puri, 2, "rd", 2, jdoc, jr);
sj_add_xuri_attr(puri, 3, "rp", 2, jdoc, jr);
}
+   srjson_AddNumberToObject(jdoc, jr, "rs", 0);
+   srjson_AddStrStrToObject(jdoc, jr, "rr", 2, "", 0);
}
 
puri = parse_from_uri(msg);


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:4f8a2bec: modules: readme files regenerated - uac ... [skip ci]

2018-08-30 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 4f8a2becb5d9aa53eeaca1f6bdba7e55bdfe4ebb
URL: 
https://github.com/kamailio/kamailio/commit/4f8a2becb5d9aa53eeaca1f6bdba7e55bdfe4ebb

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2018-08-30T10:31:29+02:00

modules: readme files regenerated - uac ... [skip ci]

---

Modified: src/modules/uac/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/4f8a2becb5d9aa53eeaca1f6bdba7e55bdfe4ebb.diff
Patch: 
https://github.com/kamailio/kamailio/commit/4f8a2becb5d9aa53eeaca1f6bdba7e55bdfe4ebb.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:49f35427: uac: reg_active - new parameter to control if remote registrations are active

2018-08-30 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 49f354276df3cfc2cdb0f85b5a1839f86733aead
URL: 
https://github.com/kamailio/kamailio/commit/49f354276df3cfc2cdb0f85b5a1839f86733aead

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-08-30T10:16:14+02:00

uac: reg_active - new parameter to control if remote registrations are active

- default 1 (active)
- can be changed at runtime via rpc command uac.reg_active 0|1

---

Modified: src/modules/uac/uac.c
Modified: src/modules/uac/uac_reg.c
Modified: src/modules/uac/uac_reg.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/49f354276df3cfc2cdb0f85b5a1839f86733aead.diff
Patch: 
https://github.com/kamailio/kamailio/commit/49f354276df3cfc2cdb0f85b5a1839f86733aead.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:505d42ad: uac: docs for reg_active param and uac.reg_active rpc command

2018-08-30 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 505d42ad214848420335542132b44ab7180a7b65
URL: 
https://github.com/kamailio/kamailio/commit/505d42ad214848420335542132b44ab7180a7b65

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-08-30T10:23:19+02:00

uac: docs for reg_active param and uac.reg_active rpc command

---

Modified: src/modules/uac/doc/uac_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/505d42ad214848420335542132b44ab7180a7b65.diff
Patch: 
https://github.com/kamailio/kamailio/commit/505d42ad214848420335542132b44ab7180a7b65.patch

---

diff --git a/src/modules/uac/doc/uac_admin.xml 
b/src/modules/uac/doc/uac_admin.xml
index 650ec8823c..637d976e25 100644
--- a/src/modules/uac/doc/uac_admin.xml
+++ b/src/modules/uac/doc/uac_admin.xml
@@ -507,6 +507,27 @@ modparam("uac", "reg_keep_callid", 1)


 
+
+   
+   reg_active (int)
+   
+   If set to 0, no remote regisrations are done. 
In other words,
+   it can control at once if the module should do 
remote registratios
+   or not. It can be changed at runtime via rpc 
command
+   'uac.reg_active 0|1'.
+   
+   The default value is 1 (active).
+   
+   Set reg_active 
parameter
+   
+...
+modparam("uac", "reg_active", 0)
+...
+   
+   
+   
+
+

 

@@ -1165,6 +1186,26 @@ event_route[uac:reply] {


 
+   
+   
+   uac.reg_active
+   
+   
+   Control if the module should do remote registrations or 
not. Setting
+   to 1 enables remote registrations for all records and 0 
disables
+   doing them.
+   
+   
+   uac.reg_active usage
+   
+...
+   kamctl rpc uac.reg_active 0
+   kamctl rpc uac.reg_active 1
+...
+   
+   
+   
+

 



___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:094d36ae: modules: readme files regenerated - sipjson ... [skip ci]

2018-08-30 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 094d36ae1f28dd22310c59ee0fab85e382c43c2e
URL: 
https://github.com/kamailio/kamailio/commit/094d36ae1f28dd22310c59ee0fab85e382c43c2e

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2018-08-30T08:16:53+02:00

modules: readme files regenerated - sipjson ... [skip ci]

---

Modified: src/modules/sipjson/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/094d36ae1f28dd22310c59ee0fab85e382c43c2e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/094d36ae1f28dd22310c59ee0fab85e382c43c2e.patch

---

diff --git a/src/modules/sipjson/README b/src/modules/sipjson/README
index f8578b2f61..add1b53f97 100644
--- a/src/modules/sipjson/README
+++ b/src/modules/sipjson/README
@@ -10,7 +10,7 @@ Daniel-Constantin Mierla
 

 
-   Copyright © 2018 asipto.com
+   Copyright © 2018 asipto.com
  __
 
Table of Contents
@@ -27,9 +27,12 @@ Daniel-Constantin Mierla
 
   3.1. sj_serialize(opt, ovar)
 
+4. Output Samples
+
List of Examples
 
1.1. sj_serialize usage
+   1.2. sj_serialize output
 
 Chapter 1. Admin Guide
 
@@ -45,12 +48,15 @@ Chapter 1. Admin Guide
 
 3.1. sj_serialize(opt, ovar)
 
+   4. Output Samples
+
 1. Overview
 
This module serializes SIP message attributes into a JSON document.
 
It can facilitate getting the SIP attributes in a structure inside one
-   of the embedded interpreters (e.g., KEMI interpreters).
+   of the embedded interpreters (e.g., KEMI interpreters, Lua can parse
+   JSON in an internal hash table).
 
 2. Dependencies
 
@@ -72,7 +78,7 @@ Chapter 1. Admin Guide
 
3.1. sj_serialize(opt, ovar)
 
-3.1. sj_serialize(opt, ovar)
+3.1.  sj_serialize(opt, ovar)
 
Do the serialization of SIP messagge attributes into a JSON document.
 
@@ -95,3 +101,48 @@ Chapter 1. Admin Guide
 ...
 sj_serialize("0B", "$var(json)");
 ...
+
+4. Output Samples
+
+   The content of the output variable is a JSON. Next are some samples.
+
+   Example 1.2. sj_serialize output
+...
+# the content of $var(json) after sj_serialize("0B", "$var(json)")
+#  - the content is compacted, next it has been pretty-formatted for better 
view
+ing
+...
+{
+  "mt":2,
+  "rm":"OPTIONS",
+  "pr":"udp",
+  "si":"127.0.0.1",
+  "sp":36747,
+  "Ri":"127.0.0.1",
+  "Rp":5060,
+  "ru":"sip:alice@127.0.0.1",
+  "rU":"alice",
+  "rd":"127.0.0.1",
+  "rp":0,
+  "fU":"sipsak",
+  "fd":"172.17.0.2",
+  "ua":"sipsak 0.9.7pre",
+  "ci":"482215126@172.17.0.2",
+  "rb":""
+}
+...
+# the sip message sent to Kamailio:
+...
+OPTIONS sip:alice@127.0.0.1 SIP/2.0
+Via: SIP/2.0/UDP 127.0.0.1:65502;branch=z9hG4bK.79e78613;rport;alias
+From: sip:sipsak@172.17.0.2;tag=74806173
+To: sip:alice@127.0.0.1
+Call-ID: 482215126@172.17.0.2
+CSeq: 1 OPTIONS
+Contact: sip:sipsak@127.0.0.1:65502
+Content-Length: 0
+Max-Forwards: 70
+User-Agent: sipsak 0.9.7pre
+Accept: text/plain
+
+...


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:2a636f59: sipjson: docs - added sample of output content

2018-08-30 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 2a636f593597fae4082923a9aee78b9963eccbc1
URL: 
https://github.com/kamailio/kamailio/commit/2a636f593597fae4082923a9aee78b9963eccbc1

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-08-30T08:06:12+02:00

sipjson: docs - added sample of output content

---

Modified: src/modules/sipjson/doc/sipjson_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/2a636f593597fae4082923a9aee78b9963eccbc1.diff
Patch: 
https://github.com/kamailio/kamailio/commit/2a636f593597fae4082923a9aee78b9963eccbc1.patch

---

diff --git a/src/modules/sipjson/doc/sipjson_admin.xml 
b/src/modules/sipjson/doc/sipjson_admin.xml
index 5624678033..ccfa868073 100644
--- a/src/modules/sipjson/doc/sipjson_admin.xml
+++ b/src/modules/sipjson/doc/sipjson_admin.xml
@@ -20,7 +20,8 @@


It can facilitate getting the SIP attributes in a structure 
inside one
-   of the embedded interpreters (e.g., KEMI interpreters).
+   of the embedded interpreters (e.g., KEMI interpreters, Lua can 
parse
+   JSON in an internal hash table).


 
@@ -116,5 +117,54 @@ sj_serialize("0B", "$var(json)");
 

 
+   
+   Output Samples
+   
+   The content of the output variable is a JSON. Next are some 
samples.
+   
+   
+   sj_serialize output
+   
+...
+# the content of $var(json) after sj_serialize("0B", "$var(json)")
+#  - the content is compacted, next it has been pretty-formatted for better 
viewing
+...
+{
+  "mt":2,
+  "rm":"OPTIONS",
+  "pr":"udp",
+  "si":"127.0.0.1",
+  "sp":36747,
+  "Ri":"127.0.0.1",
+  "Rp":5060,
+  "ru":"sip:alice@127.0.0.1",
+  "rU":"alice",
+  "rd":"127.0.0.1",
+  "rp":0,
+  "fU":"sipsak",
+  "fd":"172.17.0.2",
+  "ua":"sipsak 0.9.7pre",
+  "ci":"482215126@172.17.0.2",
+  "rb":""
+}
+...
+# the sip message sent to :
+...
+OPTIONS sip:alice@127.0.0.1 SIP/2.0
+Via: SIP/2.0/UDP 127.0.0.1:65502;branch=z9hG4bK.79e78613;rport;alias
+From: sip:sipsak@172.17.0.2;tag=74806173
+To: sip:alice@127.0.0.1
+Call-ID: 482215126@172.17.0.2
+CSeq: 1 OPTIONS
+Contact: sip:sipsak@127.0.0.1:65502
+Content-Length: 0
+Max-Forwards: 70
+User-Agent: sipsak 0.9.7pre
+Accept: text/plain
+
+...
+
+   
+   
 
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev