Hello everyone,
While going through the WebRTC example configuration (cfg) to better
understand and implement it in my setup, I came across a potential issue in
the code block. The code in question can be found at this link:
https://github.com/kamailio/kamailio/blob/465994de2859c7863b4cef8457be0a207…
In the code, there is an "if else" block, "if(loose_route())" that seems to
be incorrect. It appears that the "if" block will always evaluate to true,
given that "loose_route" never returns 0. According to the documentation,
the return values of "loose_route" are specified as 1, 2, -1, -2, -3.
Therefore, it seems the "if" block is unnecessary, and the "else" block
will never be executed. Could someone please confirm this observation and,
if accurate, suggest a correction for the code?
Thank you for your attention to this matter.
Best regards,
Pavan Kumar
Hi all,
i have a problem with my Kamailio SIP Server.
I set up a Kamailio SIP server in a virtual machine on a private network and i connect to this with a WireGuard VPN.
The problem is that i can connect to the SIP server throught different clients and users and i can call the other users, the devices ring and i can answer to the calls but unfortunatly there is no audio during the call :(
I can't understand why, it seems all si OK, a year ago i set up another SIP server with the same configuration and all works correctly with it.
Can anyone help me to understand why? I can copy and paste here all the config files if you need it.
Thank you so much in advance
Christian
Hello list,
I'm using Kamailio to balance SIP request between two Asterisk. I have a
problem with Parking calls using Asterisk Application. When a user
parking a call, some times can't pick up parked call because the call to
pick up the Call go to the other Asterisk.
I'm using the 1 algorithm "hash over from URI" without success.
Any hint?
--
---
I'm SoCIaL, MayBe
Hello,
I'm trying to set up the dispatcher module from kamailio, but I'm running into errors just loading the dispatcher module and setting the params in my config file and would like to know where I'm going wrong.
I've added destinations through kamctl as well and whenever I try to use dispatcher reload or dispatcher dump, I get a 500 error saying neither of those methods are found.
I'm using kamailio version 5.6.3 and these are the errors I'm getting when starting up kamailio:
/usr/sbin/kamailio[102176]: ERROR: dispatcher [dispatch.c:824]: ds_load_list(): can't open list file [/etc/kamailio/dispatcher.list]
/usr/sbin/kamailio[102176]: ERROR: dispatcher [dispatcher.c:434]: mod_init(): no dispatching list loaded from file
/usr/sbin/kamailio[102176]: ERROR: <core> [core/sr_module.c:974]: init_mod(): Error while initializing module dispatcher (/usr/lib/x86_64-linux-gnu/kamailio/modules/dispatcher.so)
Many thanks in advance,
Temi
Hello all, little and fast context, we have 8 docker swarm clusters (4 nodes each) where there are deployed as global service 4 kamailio per cluster. Each cluster runs 8 replicas of a call processing service/app (for the sake of this question we’ll assume the performance of this app is ok, no problems on what it does and how much it consumes in cpu/memory).
kamailio is configured to use http_client module to query the processing app (those queries are load balanced by the docker swarm cluster) in a very simple way, added below in this email.
Everything goes well, there’s an average of ~450 caps on each kamailio on peak hours.
Question and reason of this email is: Is this the best approach i can take? (the http_client) or maybe there’s a more efficient one for this scenario? maybe kemi, or other?
The processing app is written in golang.
We’re planning to add more traffic (significantly more) to this instances and i would like to know if there’s a better scenario, to explore it before this migration.
Thanks, regards
—
request_route {
route(AF_SL);
}
route[AF_SL] {
if(is_method("ACK")){
exit;
}
if(is_method("REGISTER")){
sl_reply("200", "OK");
exit;
}
if(is_method("OPTIONS")){
sl_reply("200", "OK");
exit;
}
if(is_method("CANCEL")){
sl_reply("200","OK");
sl_reply("487","Request Terminated");
exit;
}
if(is_method("INVITE")){
if ($hdr(X-Carrier-In)!="" && $hdr(Organization)!="" && $hdr(X-SBC-Type)!="") {
sl_reply("100","Trying");
$var(retCode) = http_client_query("http://cbrcre:3001/cbrcre/v1/callHandler",'xsbct=$(hdr(X-SBC-Type){s.escape.param})&org=$(hdr(Organization){s.escape.param})&xci=$(hdr(X-Carrier-In){s.escape.param})&fu=$(fu{s.escape.param})&ru=$(ru{s.escape.param})&rU=$(rU{s.escape.param})&fU=$(fU{s.escape.param})&ci=$(ci{s.escape.param})&cin=$(hdr(Call-Info){s.escape.param})&ih=$hdr(Identity)&tag=$(ft{s.escape.param})&ct=$(ct{s.escape.param})&via=$(hdr(Via)[0]{s.escape.param})', "$var(result)");
xlog("L_INFO", "*************** RESULT: $var(result)\n\n");
jansson_get("response_code", "$var(result)", "$var(rc)");
switch($var(rc)){
case "200":
if jansson_get("contact", "$var(result)", "$var(ct)") == true {
append_branch("$var(ct)");
}
if jansson_get("callinfo", "$var(result)", "$var(cinfo)") == true {
append_to_reply("Call-Info: $var(cinfo)\r\n");
}
if jansson_get("pai", "$var(result)", "$var(pai)") ==true {
append_to_reply("P-Asserted-Identity: $var(pai)\r\n");
}
if jansson_get("xfrom", "$var(result)", "$var(xfrom)") ==true {
append_to_reply("X-From: $var(xfrom)\r\n");
}
if jansson_get("identity", "$var(result)", "$var(identity)") ==true {
append_to_reply("Identity: $var(identity)\r\n");
}
append_to_reply("X-Handled: ServiceBroker\r\n");
sl_send_reply("302", "Redirect");
break;
default:
jansson_get("reason","$var(result)","$var(reason)");
jansson_get("sbReason","$var(result)","$var(sbreason)");
append_to_reply("X-SBReason: $var(sbreason)\r\n");
sl_send_reply("$var(rc)", "$var(reason)");
}
exit;
}
xlog("L_ERR","missing xci or org or sbct");
sl_send_reply("608", "SBK Rejected");
}
}
Hello,
Just to confirm, as I quickly checked into a code of 5.8.x branch, there
were no modification on app_python3 module to comply with tls_threads_mode
mechanism?
Asking this beforehand posting a bug, that if using a quite simple script
into module, with tls_threads_mode = 2 Kamailio just hangs at the start and
become unresponsive.
And by simple I mean something like this
class PyKamailio:
def __init__(self):
self.test = 1
def child_init(self, rank):
"""Executed by app_python module when a new worker process (child)
is initialized by Kamailio."""
return 1
def mod_init():
""" Executed by app_python module when it is initialized by Kamailio."""
return PyKamailio()
with tls_threads_mode = 1 and 3 it loads, but if add some HTTPS calls
inside the script (even not the calls, but importing the methods, that are
making calls with import), it just start failing on TLS load, despite that
on packets processed (OPTIONS) no python_exec() is called, just from the
fact of having HTTPS calls into Python script.
--
Best regards,
Ihor (Igor)
Hello,
We have a production Kamailio 5.2.7 server which has suddenly started
reporting spikes in the shared memory use. When looking into this, we
noticed that at the same time as the memory spikes Kamailio also logs a
huge amount of errors like the following.
Can anyone help with an explanation for what's going on? The xx.xx.52.202
address is the Kamailio server itself. We record historical numbers of
network connections for the server overall, and that doesn't show any
increase in the number of TCP connections, either at the time of the spikes
or as a general trend.
Thanks in advance!
Apr 26 09:23:16 vpbx11 /sbin/kamailio[44272]: ERROR: <core>
[core/tcp_main.c:2703]: tcpconn_1st_send(): connect xx.xx.52.202:42726
failed (RST) Connection refused
Apr 26 09:23:16 vpbx11 /sbin/kamailio[44272]: ERROR: <core>
[core/tcp_main.c:2711]: tcpconn_1st_send(): xx.xx.52.202:42726: connect &
send for 0x14bbf44c9f40 failed: Connection refused (111)
Apr 26 09:23:16 vpbx11 /sbin/kamailio[44272]: ERROR: tm
[../../core/forward.h:293]: msg_send_buffer(): tcp_send failed
Apr 26 09:23:16 vpbx11 /sbin/kamailio[44272]: WARNING: <core>
[core/tcp_main.c:1149]: tcp_do_connect(): xx.xx.52.202:42726: could not
find corresponding listening socket for xx.xx.52.202, using default...
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
Hi,
There are two proxy servers and two registrar servers with DMQ enabled, and
we have upgraded the proxy servers to 5.7.4 and the registrar servers to
5.5.5.
Kamailio proxy version 5.7.4
Kamailio registrar version: 5.5.5
Following the upgrade of the proxy server to 5.7.4, calls are not working
and no response is received.
Once again, we have reverted the proxy server to 5.5.5, so that the proxy
server and the registrar server version are now the same.The calls are now
working as expected.
We suspect it could be an DMQ issue.
I would appreciate your suggestions on this matter of compatibility between
proxy and registry servers.
Thanks.
Hello,,
I am using this docker file for installaing kamailio. I wana use it with open5gs for trynig VoNR , I used before it for VoLTE it works but right now I have this error in installation process.
icscf | 0(34) ERROR: <core> [core/sr_module.c:527]: ksr_locate_module(): could not find module <maxfwd> in </usr/lib64/kamailio/modules_k/:/usr/ lib64/kamailio/modules/:/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/:/usr/lib/x86_64-linux-gnu/kamailio/modules/:/usr/local/lib64/kamailio/ modules>
icscf | 0(34) CRITICAL: <core> [core/cfg.y:4008]: yyerror_at(): parse error in config file /etc/kamailio_icscf/kamailio_icscf.cfg, line 94, colu mn 12-19: failed to load module
scscf | 0(38) ERROR: <core> [core/sr_module.c:527]: ksr_locate_module(): could not find module <maxfwd> in </usr/lib64/kamailio/modules_k/:/usr/ lib64/kamailio/modules/:/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/:/usr/lib/x86_64-linux-gnu/kamailio/modules/:/usr/local/lib64/kamailio/
and there is docker file that Im using:
FROM ubuntu:focal
ENV DEBIAN_FRONTEND=noninteractive
# Install updates and dependencies
RUN apt-get update && \
apt-get -y install mysql-server tcpdump screen tmux ntp ntpdate git-core dkms \
gcc flex bison libmysqlclient-dev make libssl-dev libcurl4-openssl-dev \
libxml2-dev libpcre2-dev bash-completion g++ autoconf libmnl-dev \
libsctp-dev libradcli-dev libradcli4 libjson-c-dev pkg-config iproute2 net-tools \
iputils-ping
# Fetch Kamailio code (branch 5.3)
RUN mkdir -p /usr/local/src/ && cd /usr/local/src/ && \
git clone https://github.com/kamailio/kamailio && \
cd kamailio && git checkout 5.8
# Build and Install Kamailio
RUN cd /usr/local/src/kamailio && make cfg
COPY modules.lst /usr/local/src/kamailio/src
RUN cd /usr/local/src/kamailio && \
make -j`nproc` Q=0 all | tee make_all.txt && \
make install | tee make_install.txt && \
ldconfig
COPY kamailio_init.sh /
CMD /kamailio_init.sh