Hi,
When using dialog module and track_cseq_updates when needing to update CSeq for authenticated invites, if early media is present the CSeq in the Rack header is not also incremented.
Kamailio version:
version: kamailio 4.4.2 (x86_64/linux) 892ad6
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 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: 892ad6
compiled on 11:18:36 Sep 28 2016 with gcc 5.4.0
--
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/801
Sipwise hat ON:
We have more than one server and we need to keep things in db in order to share sca subscription/appearance between servers
--
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/781
>From http://lists.kamailio.org/pipermail/sr-dev/2016-August/036231.html
On 24/08/16 10:17, Andreas Granig wrote:
> Hi,
>
> When translating strings with the dialplan module, you sometimes end up
> with very complex patterns for sanitizing the target string and
> performing some replacements, since for a given dialplan id, processing
> stops on the first match within the dialplan entries for a given dpid.
>
> The idea is to introduce a "continue" flag (default 0) in the dialplan
> table indicating to proceed with processing further dialplan entries
> within the given dpid after a match. The use case is to have a sanitize
> rule with highest priority which e.g. removes any spaces, dashes and
> parentheses from the target string, then with a lower priority do
> further processing with the cleaned up string, e.g. stripping leading
> double-zeroes or a plus when normalizing to E164 numbers, or replacing a
> single leading zero with the country code and so on.
>
> This is particularly useful when a user dials a number from an address
> book of some sort (e.g. on a mobile app) where number formats are stored
> with country-specific formating characters like "+1-(234)-567 890", and
> catching all of that in one rule results in really messy match/replace
> patterns.
--
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/764
### Description
Hello,
When there is an error in my ruby script, app_ruby prints exception message without a stack trace, like this:
```
Dec 14 16:25:17 servername /usr/sbin/kamailio[24313]: ERROR: app_ruby [app_ruby_api.c:105]: app_ruby_print_last_exception(): exception: wrong number of arguments (1 for 2..3)
Dec 14 16:25:17 servername /usr/sbin/kamailio[24313]: ERROR: app_ruby [app_ruby_api.c:1078]: app_ruby_run_ex(): ruby exception (6) on callback for: ksr_request_route (res type: 17)
```
Altough this message tells what is the error, it doesn't tell **where** the error happened, so it's hard to find the source of the problem.
In ruby, exceptions have _backtrace()_ method returning stack trace as an array of strings. It would be really helpful if app_ruby also call this method and append its result to error message.
### Reproduction
in kamailio.cfg
```
loadmodule "app_ruby.so"
modparam("app_ruby", "load", "/etc/kamailio/ruby/routes.rb")
cfgengine "ruby"
```
in /etc/kamailio/ruby/routes.rb
```
def some_method(param1, param2)
end
def ksr_request_route
some_method(1)
end
```
### Expected behavior
```
Dec 14 16:46:24 servername /usr/sbin/kamailio[24314]: ERROR: <core> [core/kemi.c:87]: sr_kemi_core_err(): wrong number of arguments (1 for 2): /etc/kamailio/ruby/routes.rb:1:in `some_method'
/etc/kamailio/ruby/routes.rb:4:in `ksr_request_route'
```
#### Actual observed behavior
```
Dec 14 16:45:42 servername /usr/sbin/kamailio[24311]: ERROR: app_ruby [app_ruby_api.c:105]: app_ruby_print_last_exception(): exception: wrong number of arguments (1 for 2)
```
### Possible Solutions
Relevant code seem to be here: https://github.com/kamailio/kamailio/blob/master/src/modules/app_ruby/app_r…
I found example C code to print stack trace here but couldn't figure out how to integrate to app_ruby: http://zoo-project.org/svn/trunk/zoo-project/zoo-kernel/service_internal_ru…
Equivalent ruby code would be (this code is not idiomatic, my aim is to provide C-like ruby code):
```
def some_error_generating_method
method_taking_two_params(1)
rescue => exception
message = exception.to_s() + "\n"
stack_trace = exception.backtrace()
for line in stack_trace
message = message + line + "\n"
end
print(message)
end
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.2.0 (x86_64/linux) 535e13
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 535e13
compiled on 10:26:34 Nov 28 2018 with gcc 4.8.5
```
* **Operating System**:
Centos 7.2 64bit
```
Linux servername 3.10.0-327.28.2.el7.x86_64 #1 SMP Wed Aug 3 11:11:39 UTC 2016 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/1766
### Description
I recently downloaded kamailio 5.2.3 and tried to install it for investigation purposes. I was trying to include app_java module in order to execute some brief java apps in kamailio. But then I get the same issue wen I compile and when I run kamailio
Thank you for all the help you can give me
### Troubleshooting
I get the same bunch of warnings everytime I try to make all
java_msgobj.c: In function ‘fill_sipmsg_object’:
java_msgobj.c:83:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->id);
^~~~~~~~~~~~~~
java_msgobj.c:83:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:96:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->pid);
^~~~~~~~~~~~~~
java_msgobj.c:96:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:110:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:110:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:127:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:127:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:142:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:142:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:156:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->len);
^~~~~~~~~~~~~~
java_msgobj.c:156:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:172:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:172:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:189:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:189:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:205:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->parsed_orig_ruri_ok);
^~~~~~~~~~~~~~
java_msgobj.c:205:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:222:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:222:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:237:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->add_to_branch_len);
^~~~~~~~~~~~~~
java_msgobj.c:237:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:251:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->hash_index);
^~~~~~~~~~~~~~
java_msgobj.c:251:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:265:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->msg_flags);
^~~~~~~~~~~~~~
java_msgobj.c:265:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:286:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:286:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:306:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:306:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
CC (gcc) [M app_java.so] java_support.o
CC (gcc) [M app_java.so] java_iface.o
java_iface.c: In function ‘java_exec’:
java_iface.c:205:53: warning: passing argument 2 of ‘(*_aj_env)->NewLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
invk_method_ref = (*_aj_env)->NewLocalRef(_aj_env, invk_method);
^~~~~~~~~~~
java_iface.c:205:53: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:205:18: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
invk_method_ref = (*_aj_env)->NewLocalRef(_aj_env, invk_method);
^
java_iface.c:208:39: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method_ref);
^~~~~~~~~~~~~~~
java_iface.c:208:39: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:216:40: warning: passing argument 2 of ‘(*_aj_env)->MonitorEnter’ from incompatible pointer type [-Wincompatible-pointer-types]
if((*_aj_env)->MonitorEnter(_aj_env, invk_method_ref) != JNI_OK) {
^~~~~~~~~~~~~~~
java_iface.c:216:40: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:234:40: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method_ref);
^~~~~~~~~~~~~~~
java_iface.c:234:40: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:235:40: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method);
^~~~~~~~~~~
java_iface.c:235:40: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:258:39: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method_ref);
^~~~~~~~~~~~~~~
java_iface.c:258:39: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:259:39: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method);
^~~~~~~~~~~
java_iface.c:259:39: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:266:39: warning: passing argument 2 of ‘(*_aj_env)->MonitorExit’ from incompatible pointer type [-Wincompatible-pointer-types]
if((*_aj_env)->MonitorExit(_aj_env, invk_method_ref) != JNI_OK) {
^~~~~~~~~~~~~~~
java_iface.c:266:39: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:272:38: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method_ref);
^~~~~~~~~~~~~~~
java_iface.c:272:38: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:273:38: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method);
^~~~~~~~~~~
java_iface.c:273:38: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
CC (gcc) [M app_java.so] java_native_methods.o
java_native_methods.c: In function ‘Java_org_siprouter_SipMsg_ParseSipMsg’:
java_native_methods.c:484:9: warning: return from incompatible pointer type [-Wincompatible-pointer-types]
return fill_sipmsg_object(jenv, _aj_msg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC (gcc) [M app_java.so] app_java_mod.o
app_java_mod.c: In function ‘child_init’:
app_java_mod.c:236:38: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, child_init_id);
^~~~~~~~~~~~~
app_java_mod.c:236:38: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
#### Reproduction
1. Download 5.2.3
2. in /usr/local/src/kamailio-5.2.3/
2.1 make include_modules="app_java" cfg
2.2 make all
2.3 make install
3 kamailo -e -E -ddd
#### Debugging Data
0(18169) ERROR: <core> [core/sr_module.c:498]: load_module(): could not open module </usr/local/lib64/kamailio/modules/app_java.so>: libjvm.so: cannot open shared object file: No such file or directory
0(18169) CRITICAL: <core> [core/cfg.y:3507]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 300, column 12-24: failed to load module
0(18169) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <app_java> found
0(18169) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 306, column 46: Can't set module parameter
0(18169) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <app_java> found
0(18169) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 307, column 55: Can't set module parameter
0(18169) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <app_java> found
0(18169) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 308, column 60: Can't set module parameter
0(18169) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <app_java> found
0(18169) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 309, column 41: Can't set module parameter
0(18169) ERROR: <core> [core/cfg.y:3370]: yyparse(): cfg. parser: failed to find command java_method_exec (params 2)
0(18169) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 483, column 37: unknown command, missing loadmodule?
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
version: kamailio 5.2.3 (x86_64/linux) c36229
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: c36229
* **Operating System**:
Ubuntu 18.04
--
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/1984
The local-request event route is not documented. When using our friend google I find an old blog post by @miconda but not much else. I can come up with some good text, but need to know what can be done in the route, like
- modify request uri
- add/remove headers
- drop request
- add/modify destination uri ($du)
--
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/980
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
We are using xmlrpc to terminate the calls once customer balance reaches to zero. call got terminated but we will not be able to set the dialog variable related to hangup_reason. There should be a way during dlg.terminate_dlg xmlrpc request that if i mention the some parameter then it should set before sending bye to callee and caller.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your log messages here)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
root@ip-172-31-4-160:/etc/kamailio# kamailio -version
version: kamailio 5.1.4 (x86_64/linux) 6ebfda
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 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: 6ebfda
compiled on 11:48:26 Sep 7 2018 with gcc 4.8.4
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
root@ip-172-31-4-160:/etc/kamailio# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
root@ip-172-31-4-160:/etc/kamailio# uname -a
Linux ip-172-31-4-160 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/1737
This will allow us to point https://www.kamailio.org/wiki/features/new-in-devel to the file and "force" developers to update that file with the new features when they are introduced in the repository
Remaining developers to upgrade the wiki seems pointless and anyone can create a PR for changes
---
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/668
### Description
Consuming messages without message body fails due to a JSON parsing error:
```
ERROR: kazoo [kz_json.c:287]: kz_json_parse(): Error parsing json: unexpected end of data
ERROR: kazoo [kz_json.c:288]: kz_json_parse():
ERROR: kazoo [kz_amqp.c:2960]: kz_amqp_send_worker_event(): error parsing json body
```
This makes it unable to consume messages from RabbitMQ's event exchange plugin ( https://www.rabbitmq.com/event-exchange.html ), as the documentatin states: **"The message body is always blank."**
### Possible Solutions
As a possible fix I tried following change in kz_amqp.c:
```
void kz_amqp_send_worker_event(kz_amqp_server_ptr server_ptr, amqp_envelope_t* envelope, kz_amqp_bind_ptr bind)
{
char buffer[100];
kz_amqp_cmd_ptr cmd = NULL;
kz_amqp_consumer_delivery_ptr ptr = NULL;
json_obj_ptr json_obj = NULL;
json_object* JObj = NULL;
str* message_id = NULL;
int idx = envelope->channel-1;
int worker = 0;
int _kz_server_id = server_ptr->id;
int msg_size = envelope->message.body.len;
//begin of changes
int routingkey_size = envelope->routing_key.len;
if (msg_size == 0 && routingkey_size > 0 ) {
char *routingkey_data = pkg_malloc(routingkey_size + 1);
memset(routingkey_data, 0, routingkey_size + 1);
memcpy(routingkey_data, (char*)envelope->routing_key.bytes, routingkey_size);
LM_DBG("Message size: %d\n", msg_size);
LM_DBG("Routing Key: %s\n", routingkey_data);
char *pos = strchr(routingkey_data,'.');
while (pos){
*pos = '_';
pos = strchr(pos,'.');
}
LM_DBG("New Routing Key: %s\n", routingkey_data);
sprintf(buffer, "kazoo:%s", routingkey_data);
if(kz_amqp_consumer_fire_event(buffer) != 0) {
LM_ERR("kazoo:%s not found", routingkey_data);
}
pkg_free(routingkey_data);
return;
}
char *json_data = pkg_malloc(msg_size + 1);
if(!json_data) {
LM_ERR("no more package memory available. needed %d\n", msg_size + 1);
return;
}
char *json_data = pkg_malloc(msg_size + 1);
//end of changes
if(!json_data) {
LM_ERR("no more package memory available. needed %d\n", msg_size + 1);
return;
}
```
The change is rather simple: If there is no message-body supplied, the event-route _kazoo:<binding_key>_ is called (after replacing any '.' with '_' in the routing_key).
--
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/1837
### Description
Currently, the `geoip2` module loads the IP database at startup and keeps it in cache and there is no way to tell Kamailio to reload the database without a full restart.
### Possible Solutions
To keep this module inline with other modules that use external datasources, I would suggest to implement a new RPC command and a new geoip2 function to reload the database defined in the `path` geoip2 modparam without the need of a restart.
I'm not aware of the effort required for implementing either of them, but only having an RPC command would effectively solve this issue as you can call RPC commands from within Kamailio conf, thus, the reload function would not be something strictly required but more of a nice-to-have.
### Examples:
Function:
```
geoip2_reload()
```
RPC command:
```
kamctl rpc gip2.reload / kamctl rpc geoip2.reload
```
Kamcmd command:
```
kamcmd geoip2.reload
```
--
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/2029