[sr-dev] [kamailio/kamailio] passing argument to event_callback function (#1627)
### Description Right Now, There is no way to pass the parameter to event_callback function to be executed by KEMI Interpreter. This is required when we have to pass call_uuid for async call without suspending transaction. In callback we don't have anything refer to the previous transaction. ### Troubleshooting Reproduction Debugging Data ``` (paste your debugging data here) ``` Log Messages ``` (paste your log messages here) ``` SIP Traffic ``` (paste your sip traffic here) ``` ### Possible Solutions We need to introduce parameter to event_callback with ; Initially let's keep it to only single parameter. ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` root@ip-172-31-3-45:~# kamailio -v version: kamailio 5.1.3 (x86_64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled on 15:16:50 Apr 24 2018 with gcc 4.8.4 ``` * **Operating System**: ``` root@ip-172-31-3-45:~# uname -a Linux ip-172-31-3-45 3.13.0-143-generic #192-Ubuntu SMP Tue Feb 27 10:45:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux ``` -- 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/issues/1627___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] debian pkg missing dependency on docbook2x (#1624)
This clearly is a bug. I don't understand why bug label was removed. Also, I my opinion this kind of error should not be ignored, but build should stop at it. -- 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/issues/1624#issuecomment-417585090___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:957b43dd: tls: docs - some updates to sample tls.cfg
Module: kamailio Branch: master Commit: 957b43ddea8dad434736e800a16581d49ccb2478 URL: https://github.com/kamailio/kamailio/commit/957b43ddea8dad434736e800a16581d49ccb2478 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2018-08-31T10:19:06+02:00 tls: docs - some updates to sample tls.cfg --- Modified: src/modules/tls/tls.cfg --- Diff: https://github.com/kamailio/kamailio/commit/957b43ddea8dad434736e800a16581d49ccb2478.diff Patch: https://github.com/kamailio/kamailio/commit/957b43ddea8dad434736e800a16581d49ccb2478.patch --- diff --git a/src/modules/tls/tls.cfg b/src/modules/tls/tls.cfg index c1a08f6759..dd25abd4ac 100644 --- a/src/modules/tls/tls.cfg +++ b/src/modules/tls/tls.cfg @@ -33,13 +33,13 @@ require_certificate = yes # This is an example server domain for TLS connections # received from the loopback interface. We allow -# the use of SSLv2 and SSLv3 protocols here, we do +# the use of TLSv1 protocols here, we do # not require that clients present client certificates # but if they present it it must be valid. We also use # a special certificate and CA list for loopback # interface. # -#[server:127.0.0.1:5061] +#[server:5.6.7.8:5061] #method = TLSv1 #verify_certificate = yes #require_certificate = no @@ -48,9 +48,11 @@ require_certificate = yes #verify_depth = 3 #ca_list = local_ca.pem #crl = local_crl.pem +#server_name = kamailio.org +#server_id = kamailio.org -# Special settings for the example.sip (1.2.3.4) public SIP -# server. We do not verify the certificate of the +# Special settings for connecting to the example.sip (1.2.3.4) +# public SIP server. We do not verify the certificate of the # server because it can be expired. The server # implements authentication using SSL client # certificates so configure the client certificate @@ -62,3 +64,5 @@ require_certificate = yes #private_key = /usr/local/etc/kamailio/tls/example_key.pem #ca_list = /usr/local/etc/kamailio/tls/example_ca.pem #crl = /usr/local/etc/kamailio/tls/example_crl.pem +#server_name = example.sip +#server_id = example.sip ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] tm: crash on memcpy fix (#1628)
- in some cases tag is not initialized and lead to crash. Memory pointer check before writing to added. Pre-Submission Checklist - [ ] Commit message has the format required by CONTRIBUTING guide - [ ] Commits are split per component (core, individual modules, libs, utils, ...) - [ ] Each component has a single commit (if not, squash them into one commit) - [ ] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ x ] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [ ] PR should be backported to stable branches - [ x ] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1628 -- Commit Summary -- * tm: crash on memcpy fix -- File Changes -- M src/modules/tm/t_reply.c (1) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1628.patch https://github.com/kamailio/kamailio/pull/1628.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/1628 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:4b3a7d37: sipjson: added options to serialize To and CSeq attributes
Module: kamailio Branch: master Commit: 4b3a7d37ce9d91bcd0367712de5ca1f2668eaebe URL: https://github.com/kamailio/kamailio/commit/4b3a7d37ce9d91bcd0367712de5ca1f2668eaebe Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2018-08-31T11:14:27+02:00 sipjson: added options to serialize To and CSeq attributes - c and t mode options --- Modified: src/modules/sipjson/sipjson_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/4b3a7d37ce9d91bcd0367712de5ca1f2668eaebe.diff Patch: https://github.com/kamailio/kamailio/commit/4b3a7d37ce9d91bcd0367712de5ca1f2668eaebe.patch --- diff --git a/src/modules/sipjson/sipjson_mod.c b/src/modules/sipjson/sipjson_mod.c index ca6ea8e8bd..e2798332f0 100644 --- a/src/modules/sipjson/sipjson_mod.c +++ b/src/modules/sipjson/sipjson_mod.c @@ -345,6 +345,26 @@ static int sj_serialize_data(sip_msg_t* msg, srjson_doc_t *jdoc, str* smode) srjson_AddStrStrToObject(jdoc, jr, "rb", 2, s.s, s.len); } break; + case 'c': + if(msg->cseq==NULL && ((parse_headers(msg, HDR_CSEQ_F, 0)==-1) + || (msg->cseq==NULL)) ) { + s.s = ""; + s.len = 0; + } else { + s = get_cseq(msg)->number; + } + srjson_AddStrStrToObject(jdoc, jr, "cs", 2, s.s, s.len); + break; + case 't': + puri = parse_to_uri(msg); + if(puri==NULL) { + srjson_AddStrStrToObject(jdoc, jr, "tU", 2, "", 0); + srjson_AddStrStrToObject(jdoc, jr, "td", 2, "", 0); + } else { + sj_add_xuri_attr(puri, 1, "tU", 2, jdoc, jr); + sj_add_xuri_attr(puri, 2, "td", 2, jdoc, jr); + } + break; } } return 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:6c5fc213: sipjson: docs - updates to serialize options and sample json section
Module: kamailio Branch: master Commit: 6c5fc21329bac531b64c1350c10e3d0490aefef6 URL: https://github.com/kamailio/kamailio/commit/6c5fc21329bac531b64c1350c10e3d0490aefef6 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2018-08-31T11:20:08+02:00 sipjson: docs - updates to serialize options and sample json section --- Modified: src/modules/sipjson/doc/sipjson_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/6c5fc21329bac531b64c1350c10e3d0490aefef6.diff Patch: https://github.com/kamailio/kamailio/commit/6c5fc21329bac531b64c1350c10e3d0490aefef6.patch --- diff --git a/src/modules/sipjson/doc/sipjson_admin.xml b/src/modules/sipjson/doc/sipjson_admin.xml index ccfa868073..f357367086 100644 --- a/src/modules/sipjson/doc/sipjson_admin.xml +++ b/src/modules/sipjson/doc/sipjson_admin.xml @@ -93,6 +93,16 @@ B - (uppercase B) SIP message body + + + c - (lowercase c) CSeq attributes + + + + + t - (lowercase t) To header attributes + + @@ -120,7 +130,12 @@ sj_serialize("0B", "$var(json)"); Output Samples - The content of the output variable is a JSON. Next are some samples. + The content of the output variable is a JSON. Next are some samples. Note + that the content might change with future development and this example + become outdated, simply print the document when you start testing your + config and match the name of the attribute with the name of pseudo-variables + to understand what values can be there. Unlike pseudo-variables, the + $null values might converted to empty strings. sj_serialize output @@ -146,6 +161,7 @@ sj_serialize("0B", "$var(json)"); "ua":"sipsak 0.9.7pre", "ci":"482215126@172.17.0.2", "rb":"" + ... } ... # the sip message sent to &kamailio;: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:e913fa83: Merge pull request #1628 from rromrrom/crash_on_empty_string
Module: kamailio Branch: master Commit: e913fa83f87b34e236817b8db60341fe5a193a3d URL: https://github.com/kamailio/kamailio/commit/e913fa83f87b34e236817b8db60341fe5a193a3d Author: Daniel-Constantin Mierla Committer: GitHub Date: 2018-08-31T11:24:38+02:00 Merge pull request #1628 from rromrrom/crash_on_empty_string tm: crash on memcpy fix --- Modified: src/modules/tm/t_reply.c --- Diff: https://github.com/kamailio/kamailio/commit/e913fa83f87b34e236817b8db60341fe5a193a3d.diff Patch: https://github.com/kamailio/kamailio/commit/e913fa83f87b34e236817b8db60341fe5a193a3d.patch --- diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c index 2f5488a309..271932c90c 100644 --- a/src/modules/tm/t_reply.c +++ b/src/modules/tm/t_reply.c @@ -299,6 +299,7 @@ inline static int update_totag_set(struct cell *t, struct sip_msg *ok) for (i=t->fwded_totags; i; i=i->next) { if (i->tag.len==tag->len + && i->tag.s && memcmp(i->tag.s, tag->s, tag->len) ==0 ){ /* to tag already recorded */ LM_DBG("to-tag retransmission\n"); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tm: crash on memcpy fix (#1628)
Thanks! -- 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/1628#issuecomment-417607352___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tm: crash on memcpy fix (#1628)
Merged #1628 into master. -- 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/1628#event-1820140798___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:aede7c48: modules: readme files regenerated - sipjson ... [skip ci]
Module: kamailio Branch: master Commit: aede7c4835dd516cea75a5191d1ae6af3460c3c8 URL: https://github.com/kamailio/kamailio/commit/aede7c4835dd516cea75a5191d1ae6af3460c3c8 Author: Kamailio Dev Committer: Kamailio Dev Date: 2018-08-31T11:31:46+02:00 modules: readme files regenerated - sipjson ... [skip ci] --- Modified: src/modules/sipjson/README --- Diff: https://github.com/kamailio/kamailio/commit/aede7c4835dd516cea75a5191d1ae6af3460c3c8.diff Patch: https://github.com/kamailio/kamailio/commit/aede7c4835dd516cea75a5191d1ae6af3460c3c8.patch --- diff --git a/src/modules/sipjson/README b/src/modules/sipjson/README index add1b53f97..525ae98351 100644 --- a/src/modules/sipjson/README +++ b/src/modules/sipjson/README @@ -93,6 +93,8 @@ Chapter 1. Admin Guide 'opt' parameter cannot be empty, '0' can be given when only default attributes are wanted. + B - (uppercase B) SIP message body + + c - (lowercase c) CSeq attributes + + t - (lowercase t) To header attributes * ovar - name of the output pseduo-variable This function can be used from ANY_ROUTE. @@ -105,6 +107,11 @@ sj_serialize("0B", "$var(json)"); 4. Output Samples The content of the output variable is a JSON. Next are some samples. + Note that the content might change with future development and this + example become outdated, simply print the document when you start + testing your config and match the name of the attribute with the name + of pseudo-variables to understand what values can be there. Unlike + pseudo-variables, the $null values might converted to empty strings. Example 1.2. sj_serialize output ... @@ -129,6 +136,7 @@ ing "ua":"sipsak 0.9.7pre", "ci":"482215126@172.17.0.2", "rb":"" + ... } ... # the sip message sent to Kamailio: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] passing argument to event_callback function (#1627)
I do not really get what you need or what to achieve here? Can you give an example with native kamailio.cfg `event_route[...]` that needs to be covered by what you try to ask here? -- 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/issues/1627#issuecomment-417613106___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] debian pkg missing dependency on docbook2x (#1624)
Overall this is not actually deb build specific issue, but something that happens during install, as I could spot during building and installing using git repo inside a docker container (for kamailio unit tests). I guess that was more an optional step, attempting to build man pages from docbooks for modules readmes. I think this should be made optional properly. I do not think anyone was using manpage-style docs so far for modules and starting now to install/package them all makes no sense. -- 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/issues/1624#issuecomment-417614166___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] debian pkg missing dependency on docbook2x (#1624)
Daniel-Constantin Mierla writes: > I think this should be made optional properly. I do not think anyone > was using manpage-style docs so far for modules and starting now to > install/package them all makes no sense. Optional is fine with me. I just want the build to work without errors. Also, if an error occurs, the build must stop, This is not the case now. -- Juha -- 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/issues/1624#issuecomment-417618299___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:35aef078: core: Makefiles - catch unavailbility of docbook2man tool
Module: kamailio Branch: master Commit: 35aef078dfbcb92de9591eea2841b3ba0f9682f6 URL: https://github.com/kamailio/kamailio/commit/35aef078dfbcb92de9591eea2841b3ba0f9682f6 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2018-08-31T12:45:24+02:00 core: Makefiles - catch unavailbility of docbook2man tool - print an info message instead of ending up in execution error of Makefile rule trying to generate man pages from xml files - DOCBOOK var renamed to DOCBOOKMAN to be more suggestive for its purpose - related to GH #1624 --- Modified: src/Makefile.modules Modified: src/Makefile.shared Modified: src/Makefile.utils --- Diff: https://github.com/kamailio/kamailio/commit/35aef078dfbcb92de9591eea2841b3ba0f9682f6.diff Patch: https://github.com/kamailio/kamailio/commit/35aef078dfbcb92de9591eea2841b3ba0f9682f6.patch --- diff --git a/src/Makefile.modules b/src/Makefile.modules index bbcca26122..8649db2756 100644 --- a/src/Makefile.modules +++ b/src/Makefile.modules @@ -278,16 +278,17 @@ endif #man page build rules ifneq (,$(wildcard $(MOD_NAME).xml)) - +ifneq ($(DOCBOOKMAN),) $(MOD_NAME).7: $(MOD_NAME).xml - $(DOCBOOK) -s ../../../doc/stylesheets/serdoc2man.xsl $< + $(DOCBOOKMAN) -s ../../../doc/stylesheets/serdoc2man.xsl $< man: $(MOD_NAME).7 - else - man: - + @echo "info - no docbook to man tool to convert $(MOD_NAME).xml" +endif +else +man: endif diff --git a/src/Makefile.shared b/src/Makefile.shared index 82a29d2447..9d2d81fe65 100644 --- a/src/Makefile.shared +++ b/src/Makefile.shared @@ -43,8 +43,8 @@ sh_err_fail= try_err=$(1) ; if [ $$? != 0 ]; then echo ERROR: $(1) failed ; fi endif -DOCBOOK = $(shell which docbook2x-man 2>/dev/null) -ifeq ($(DOCBOOK),) - DOCBOOK = $(shell which db2x_docbook2man 2>/dev/null) +DOCBOOKMAN = $(shell which docbook2x-man 2>/dev/null) +ifeq ($(DOCBOOKMAN),) + DOCBOOKMAN = $(shell which db2x_docbook2man 2>/dev/null) endif diff --git a/src/Makefile.utils b/src/Makefile.utils index f7ce508e17..e8a8b8a1a6 100644 --- a/src/Makefile.utils +++ b/src/Makefile.utils @@ -117,16 +117,17 @@ endif #man page build rules ifneq (,$(wildcard $(UTIL_NAME).xml)) - +ifneq ($(DOCBOOKMAN),) $(UTIL_NAME).7: $(UTIL_NAME).xml - $(DOCBOOK) -s ../../doc/stylesheets/serdoc2man.xsl $< + $(DOCBOOKMAN) -s ../../doc/stylesheets/serdoc2man.xsl $< man: $(UTIL_NAME).7 - else - man: - + @echo "info - no docbook to man tool to convert $(UTIL_NAME).xml" +endif +else +man: endif $(man_prefix)/$(man_dir)/man8: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] debian pkg missing dependency on docbook2x (#1624)
Pushed a patch to catch when the tool from docbook to mack conversion is not available and just print an info message. I think this should do it for now, if one wants to start generating man pages, can do it by installing the tool. I will close this issue and if one wants to package man pages for modules' readme, open a feature request. To my knowledge, so far they were never packaged. If some new issues after the patch, just reopen. -- 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/issues/1624#issuecomment-417630049___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] debian pkg missing dependency on docbook2x (#1624)
Closed #1624. -- 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/issues/1624#event-1820321904___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Module RTPPROXY param Timeout_Socket not Working (#1597)
@miconda Can you please comment on this. -- 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/issues/1597#issuecomment-417631455___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq: add optional parameter to dmq_handle_message() (#1626)
some context for this PR... we are testing using the `tsilo` module for mobile push notifications while maintaining multiple registrars with `dmq_usrloc` if an `INVITE` goes to a registrar "A" and then the UA registers to registrar "B", the dmq message is sent to registrar "A" with UA location info,and the INVITE can be resumed successfully. ``` if (is_method("KDMQ")) { dmq_handle_message("1"); if ($tU == "usrloc") { $var(a) = ""; json_get_field("$rb", "aor", "$var(a)"); $var(a) = $(var(a){s.strip,1}); #strip quotes $var(a) = $(var(a){s.striptail,1}); #strip quotes $var(p) = "sip:" + $var(a); route(PUSHJOIN); } exit; } ``` -- 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#issuecomment-417652457___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] uac module unused var in master
CC (gcc) [M uac.so] uac_reg.o uac_reg.c: In function 'rpc_uac_reg_active': uac_reg.c:2110:6: warning: unused variable 'none' [-Wunused-variable] str none = {"none", 4}; ^~~~ ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] debian pkg missing dependency on docbook2x (#1624)
Daniel-Constantin Mierla writes: > I will close this issue and if one wants to package man pages for > modules' readme, open a feature request. To my knowledge, so far they > were never packaged. If some new issues after the patch, just reopen. Thanks, debian package now built OK without docbook2x. -- Juha -- 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/issues/1624#issuecomment-417688685___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:0d2dd5b0: uac: remove unused variable 'none' compiler warning, reported from Juha
Module: kamailio Branch: master Commit: 0d2dd5b0a2c4c910e27ae7162d72f446ff92e365 URL: https://github.com/kamailio/kamailio/commit/0d2dd5b0a2c4c910e27ae7162d72f446ff92e365 Author: Henning Westerholt Committer: Henning Westerholt Date: 2018-08-31T19:12:19+02:00 uac: remove unused variable 'none' compiler warning, reported from Juha --- Modified: src/modules/uac/uac_reg.c --- Diff: https://github.com/kamailio/kamailio/commit/0d2dd5b0a2c4c910e27ae7162d72f446ff92e365.diff Patch: https://github.com/kamailio/kamailio/commit/0d2dd5b0a2c4c910e27ae7162d72f446ff92e365.patch --- diff --git a/src/modules/uac/uac_reg.c b/src/modules/uac/uac_reg.c index ba53c8ed12..625cd434be 100644 --- a/src/modules/uac/uac_reg.c +++ b/src/modules/uac/uac_reg.c @@ -2107,7 +2107,6 @@ static void rpc_uac_reg_active(rpc_t* rpc, void* ctx) } omode = *reg_active; *reg_active = (nmode)?1:0; - str none = {"none", 4}; /* add entry node */ if (rpc->add(ctx, "{", &th) < 0) { ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] uac module unused var in master
Am Freitag, 31. August 2018, 16:27:41 CEST schrieb Juha Heinanen: > CC (gcc) [M uac.so] uac_reg.o > uac_reg.c: In function 'rpc_uac_reg_active': > uac_reg.c:2110:6: warning: unused variable 'none' [-Wunused-variable] > str none = {"none", 4}; > ^~~~ Hi Juha, I removed the variable, thank you. Best regards, Henning -- Henning Westerholt https://skalatan.de/blog/ ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:db3b9dbd: tm: crash on memcpy fix
Module: kamailio Branch: master Commit: db3b9dbd48f7bb74abf08b0e97bcac15015df719 URL: https://github.com/kamailio/kamailio/commit/db3b9dbd48f7bb74abf08b0e97bcac15015df719 Author: Roman Romanchenko Committer: Roman Romanchenko Date: 2018-08-31T12:02:43+03:00 tm: crash on memcpy fix - in some cases tag is not initialized and lead to crash. Memory pointer check before writing to added. --- Modified: src/modules/tm/t_reply.c --- Diff: https://github.com/kamailio/kamailio/commit/db3b9dbd48f7bb74abf08b0e97bcac15015df719.diff Patch: https://github.com/kamailio/kamailio/commit/db3b9dbd48f7bb74abf08b0e97bcac15015df719.patch --- diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c index 474851aa7c..f53625e833 100644 --- a/src/modules/tm/t_reply.c +++ b/src/modules/tm/t_reply.c @@ -299,6 +299,7 @@ inline static int update_totag_set(struct cell *t, struct sip_msg *ok) for (i=t->fwded_totags; i; i=i->next) { if (i->tag.len==tag->len + && i->tag.s && memcmp(i->tag.s, tag->s, tag->len) ==0 ){ /* to tag already recorded */ LM_DBG("to-tag retransmission\n"); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq: add optional parameter to dmq_handle_message() (#1626)
Very cool! It is definitely useful. However, I have one very small comment. I'm not sure what value it adds allowing the config to determine the returned value - only that the function returns without exiting. Possibly just semantics right now, but it could potentially restrict future module development - or not, but better to be safe. Would it still serve its purpose if the parameter was renamed to something like "return" or "continue" and only return 1 if set or 0 if not? Again, nice use case :) -- 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#issuecomment-417745593___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq: add optional parameter to dmq_handle_message() (#1626)
@charlesrchance thanks for your input, and nice catch. I updated the PR to rename the param `continue` and only pass `1` (if it's set to 1 or greater) -- 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#issuecomment-417750312___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:bce08905: dmq: add optional parameter to dmq_handle_message()
Module: kamailio Branch: master Commit: bce08905dc0bea2f9bce44460dcaee4e786b9bd2 URL: https://github.com/kamailio/kamailio/commit/bce08905dc0bea2f9bce44460dcaee4e786b9bd2 Author: Emmanuel Schmidbauer Committer: Emmanuel Schmidbauer Date: 2018-08-31T14:17:26-04:00 dmq: add optional parameter to dmq_handle_message() --- Modified: src/modules/dmq/dmq.c Modified: src/modules/dmq/doc/dmq_admin.xml Modified: src/modules/dmq/message.c Modified: src/modules/dmq/message.h --- Diff: https://github.com/kamailio/kamailio/commit/bce08905dc0bea2f9bce44460dcaee4e786b9bd2.diff Patch: https://github.com/kamailio/kamailio/commit/bce08905dc0bea2f9bce44460dcaee4e786b9bd2.patch --- diff --git a/src/modules/dmq/dmq.c b/src/modules/dmq/dmq.c index b374b8de31..d28686da9c 100644 --- a/src/modules/dmq/dmq.c +++ b/src/modules/dmq/dmq.c @@ -91,6 +91,8 @@ static void destroy(void); static cmd_export_t cmds[] = { {"dmq_handle_message", (cmd_function)dmq_handle_message, 0, 0, 0, REQUEST_ROUTE}, + {"dmq_handle_message", (cmd_function)w_dmq_handle_message, 1, + fixup_int_1, 0, REQUEST_ROUTE}, {"dmq_send_message", (cmd_function)cfg_dmq_send_message, 4, fixup_spve_all, 0, ANY_ROUTE}, {"dmq_bcast_message", (cmd_function)cfg_dmq_bcast_message, 3, @@ -412,4 +414,4 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2) { sr_kemi_modules_add(sr_kemi_dmq_exports); return 0; -} \ No newline at end of file +} diff --git a/src/modules/dmq/doc/dmq_admin.xml b/src/modules/dmq/doc/dmq_admin.xml index 0903f6b40c..26555e24a3 100644 --- a/src/modules/dmq/doc/dmq_admin.xml +++ b/src/modules/dmq/doc/dmq_admin.xml @@ -219,12 +219,22 @@ modparam("dmq", "ping_interval", 90) Functions -dmq_handle_message() +dmq_handle_message([continue]) Handles a DMQ message by passing it to the appropriate local peer (module). The peer is identified by the user part of the To header. +Meaning of parameters: + + + +continue - by default, dmq_handle_message() will end +execution of routing script. If this optional parameter is set to "1", dmq_handle_message() +will continue executing the routing script after it's been called. + + + This function can be used from REQUEST_ROUTE. diff --git a/src/modules/dmq/message.c b/src/modules/dmq/message.c index 679f671fc6..2293cc3600 100644 --- a/src/modules/dmq/message.c +++ b/src/modules/dmq/message.c @@ -40,7 +40,7 @@ str dmq_404_rpl = str_init("User Not Found"); /** * @brief config function to handle dmq messages */ -int ki_dmq_handle_message(sip_msg_t *msg) +int ki_dmq_handle_message(sip_msg_t *msg, int returnval) { dmq_peer_t *peer; if((parse_sip_msg_uri(msg) < 0) || (!msg->parsed_uri.user.s)) { @@ -60,7 +60,7 @@ int ki_dmq_handle_message(sip_msg_t *msg) LM_ERR("sending reply\n"); goto error; } - return 0; + return returnval; } LM_DBG("dmq_handle_message peer found: %.*s\n", msg->parsed_uri.user.len, msg->parsed_uri.user.s); @@ -68,12 +68,22 @@ int ki_dmq_handle_message(sip_msg_t *msg) LM_ERR("failed to add dmq job\n"); goto error; } - return 0; + return returnval; error: return -1; } +int w_dmq_handle_message(struct sip_msg *msg, char *str1, char *str2) +{ + int i = 0; + if(str1) { + if(get_int_fparam(&i, msg, (fparam_t*)str1)<0) return -1; + } + if(i>1) i = 1; + return ki_dmq_handle_message(msg, i); +} + int dmq_handle_message(struct sip_msg *msg, char *str1, char *str2) { - return ki_dmq_handle_message(msg); -} \ No newline at end of file + return ki_dmq_handle_message(msg, 0); +} diff --git a/src/modules/dmq/message.h b/src/modules/dmq/message.h index 5131f87c02..9c9f835745 100644 --- a/src/modules/dmq/message.h +++ b/src/modules/dmq/message.h @@ -24,7 +24,8 @@ #ifndef _MESSAGE_H_ #define _MESSAGE_H_ +int w_dmq_handle_message(struct sip_msg *, char *str1, char *str2); int dmq_handle_message(struct sip_msg *, char *str1, char *str2); -int ki_dmq_handle_message(sip_msg_t *msg); +int ki_dmq_handle_message(sip_msg_t *msg, int returnval); #endif ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:18c1eb2c: Merge pull request #1626 from kamailio/dmq_handle_message-return
Module: kamailio Branch: master Commit: 18c1eb2c05c9eadea240677db27576caaef0950c URL: https://github.com/kamailio/kamailio/commit/18c1eb2c05c9eadea240677db27576caaef0950c Author: Charles Chance Committer: GitHub Date: 2018-08-31T19:50:05+01:00 Merge pull request #1626 from kamailio/dmq_handle_message-return dmq: add optional "continue" parameter to dmq_handle_message() --- Modified: src/modules/dmq/dmq.c Modified: src/modules/dmq/doc/dmq_admin.xml Modified: src/modules/dmq/message.c Modified: src/modules/dmq/message.h --- Diff: https://github.com/kamailio/kamailio/commit/18c1eb2c05c9eadea240677db27576caaef0950c.diff Patch: https://github.com/kamailio/kamailio/commit/18c1eb2c05c9eadea240677db27576caaef0950c.patch --- diff --git a/src/modules/dmq/dmq.c b/src/modules/dmq/dmq.c index b374b8de31..d28686da9c 100644 --- a/src/modules/dmq/dmq.c +++ b/src/modules/dmq/dmq.c @@ -91,6 +91,8 @@ static void destroy(void); static cmd_export_t cmds[] = { {"dmq_handle_message", (cmd_function)dmq_handle_message, 0, 0, 0, REQUEST_ROUTE}, + {"dmq_handle_message", (cmd_function)w_dmq_handle_message, 1, + fixup_int_1, 0, REQUEST_ROUTE}, {"dmq_send_message", (cmd_function)cfg_dmq_send_message, 4, fixup_spve_all, 0, ANY_ROUTE}, {"dmq_bcast_message", (cmd_function)cfg_dmq_bcast_message, 3, @@ -412,4 +414,4 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2) { sr_kemi_modules_add(sr_kemi_dmq_exports); return 0; -} \ No newline at end of file +} diff --git a/src/modules/dmq/doc/dmq_admin.xml b/src/modules/dmq/doc/dmq_admin.xml index 0903f6b40c..26555e24a3 100644 --- a/src/modules/dmq/doc/dmq_admin.xml +++ b/src/modules/dmq/doc/dmq_admin.xml @@ -219,12 +219,22 @@ modparam("dmq", "ping_interval", 90) Functions -dmq_handle_message() +dmq_handle_message([continue]) Handles a DMQ message by passing it to the appropriate local peer (module). The peer is identified by the user part of the To header. +Meaning of parameters: + + + +continue - by default, dmq_handle_message() will end +execution of routing script. If this optional parameter is set to "1", dmq_handle_message() +will continue executing the routing script after it's been called. + + + This function can be used from REQUEST_ROUTE. diff --git a/src/modules/dmq/message.c b/src/modules/dmq/message.c index 679f671fc6..2293cc3600 100644 --- a/src/modules/dmq/message.c +++ b/src/modules/dmq/message.c @@ -40,7 +40,7 @@ str dmq_404_rpl = str_init("User Not Found"); /** * @brief config function to handle dmq messages */ -int ki_dmq_handle_message(sip_msg_t *msg) +int ki_dmq_handle_message(sip_msg_t *msg, int returnval) { dmq_peer_t *peer; if((parse_sip_msg_uri(msg) < 0) || (!msg->parsed_uri.user.s)) { @@ -60,7 +60,7 @@ int ki_dmq_handle_message(sip_msg_t *msg) LM_ERR("sending reply\n"); goto error; } - return 0; + return returnval; } LM_DBG("dmq_handle_message peer found: %.*s\n", msg->parsed_uri.user.len, msg->parsed_uri.user.s); @@ -68,12 +68,22 @@ int ki_dmq_handle_message(sip_msg_t *msg) LM_ERR("failed to add dmq job\n"); goto error; } - return 0; + return returnval; error: return -1; } +int w_dmq_handle_message(struct sip_msg *msg, char *str1, char *str2) +{ + int i = 0; + if(str1) { + if(get_int_fparam(&i, msg, (fparam_t*)str1)<0) return -1; + } + if(i>1) i = 1; + return ki_dmq_handle_message(msg, i); +} + int dmq_handle_message(struct sip_msg *msg, char *str1, char *str2) { - return ki_dmq_handle_message(msg); -} \ No newline at end of file + return ki_dmq_handle_message(msg, 0); +} diff --git a/src/modules/dmq/message.h b/src/modules/dmq/message.h index 5131f87c02..9c9f835745 100644 --- a/src/modules/dmq/message.h +++ b/src/modules/dmq/message.h @@ -24,7 +24,8 @@ #ifndef _MESSAGE_H_ #define _MESSAGE_H_ +int w_dmq_handle_message(struct sip_msg *, char *str1, char *str2); int dmq_handle_message(struct sip_msg *, char *str1, char *str2); -int ki_dmq_handle_message(sip_msg_t *msg); +int ki_dmq_handle_message(sip_msg_t *msg, int returnval); #endif ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq: add optional parameter to dmq_handle_message() (#1626)
Merged #1626 into master. -- 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#event-1821270633___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:37c27ef7: modules: readme files regenerated - dmq ... [skip ci]
Module: kamailio Branch: master Commit: 37c27ef7b42e2db7ea5754d4fe96854debc54b66 URL: https://github.com/kamailio/kamailio/commit/37c27ef7b42e2db7ea5754d4fe96854debc54b66 Author: Kamailio Dev Committer: Kamailio Dev Date: 2018-08-31T21:01:29+02:00 modules: readme files regenerated - dmq ... [skip ci] --- Modified: src/modules/dmq/README --- Diff: https://github.com/kamailio/kamailio/commit/37c27ef7b42e2db7ea5754d4fe96854debc54b66.diff Patch: https://github.com/kamailio/kamailio/commit/37c27ef7b42e2db7ea5754d4fe96854debc54b66.patch --- diff --git a/src/modules/dmq/README b/src/modules/dmq/README index 909443f69d..d4ddcb8645 100644 --- a/src/modules/dmq/README +++ b/src/modules/dmq/README @@ -46,7 +46,7 @@ Charles Chance 4. Functions - 4.1. dmq_handle_message() + 4.1. dmq_handle_message([continue]) 4.2. dmq_send_message(peer, node, body, content_type) 4.3. dmq_bcast_message(peer, body, content_type) 4.4. dmq_t_replicate([skip_loop_test]) @@ -109,7 +109,7 @@ Chapter 1. Admin Guide 4. Functions -4.1. dmq_handle_message() +4.1. dmq_handle_message([continue]) 4.2. dmq_send_message(peer, node, body, content_type) 4.3. dmq_bcast_message(peer, body, content_type) 4.4. dmq_t_replicate([skip_loop_test]) @@ -269,17 +269,23 @@ modparam("dmq", "ping_interval", 90) 4. Functions - 4.1. dmq_handle_message() + 4.1. dmq_handle_message([continue]) 4.2. dmq_send_message(peer, node, body, content_type) 4.3. dmq_bcast_message(peer, body, content_type) 4.4. dmq_t_replicate([skip_loop_test]) 4.5. dmq_is_from_node() -4.1. dmq_handle_message() +4.1. dmq_handle_message([continue]) Handles a DMQ message by passing it to the appropriate local peer (module). The peer is identified by the user part of the To header. + Meaning of parameters: + * continue - by default, dmq_handle_message() will end execution of + routing script. If this optional parameter is set to "1", + dmq_handle_message() will continue executing the routing script + after it's been called. + This function can be used from REQUEST_ROUTE. Example 1.8. dmq_handle_message usage ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev