Hi
I was wondering what exactly happens with parallel branching in this
situation:
branch_route[BR_T]
{
if (condition)
{
# Stuff below not required
exit or return
}
do other stuff before relaying
}
Will this break, stop the processing of all branches with higher
index as the one being processed? From what I observe, I fear this is
the case.
Could I safely use return(1) (vs return which probably is return(0)
thus eq exit)? Or would the only safe option be to wrap the 'other
stuff' in an else statement?
Mit freundlichen Grüssen
-Benoît Panizzon-
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Hello guys,
i compiled kamailio and i want it installed on debian's deb location, i.e.:
/etc/kamailio
/usr/lib/x86_64-linux-gnu/kamailio/modules
etc..
I know if i do
make prefix=/ all
make prefix=/ install
the config will end up on /etc/kamailio, but then the modules will be on
/lib64...
i don't see a way of doing this, is there?
Thanks!
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Dear List,
We're load balancing MRCP requests using Kamailio dispatcher module's call load distribution algorithm.
We want to achieve the same maximum number of concurrent sessions on each MRCP backend but because the duration of each request varies, we’re unable to achieve this (at the moment we send the same number of requests to each backend but they all have different maximum concurrent requests).
Is there a way/module that will send requests to the backend with the least number of ongoing sessions? My guess is, this module needs to connect to the backends to know their status. Any pointers appreciated.
Thank you
With best wishes,
Unai Rodriguez
Hello Kamailio list!
We have a scenario that makes use of the UAC-module to send SIP MESSAGE and
then in some cases the Kamailio process core dumps after some time after
processing messages. I have been able to gather a core dump which shows
this backtrace appended below. We are using Kamailio 5.6 retrieved from the
kamailio repository: http://deb.kamailio.org/kamailio56. We are running
Kamailio in a Docker container which runs on "5.10.0-25-cloud-amd64 #1 SMP
Debian 5.10.191-1 (2023-08-16) x86_64 GNU/Linux"
We have previously tried to use Kamailio 5.7 but it gave the same type of
crashes.
We have been using the uac module a lot but it is just in this scenario we
get a core dump. We have some kind of relation to a specific scenario but
it can take from several seconds from the last SIP message of this scenario
up to 50 minutes until the crash occurs. To me this sounds like some kind
of cleanup that is not handled properly. The back trace indicates that free
of shared memory could be the issue, but I don't know the code
unfortunately.
The last things we see in the log file is:
2024-01-23T13:18:08.828+01:00 Jan 23 12:18:08 /usr/sbin/kamailio[4789]:
INFO: <script>: Incoming SIP TCP request conid 21 call-id
un0rihsRLJLvP-grn6LO-A
2024-01-23T13:18:08.835+01:00 Jan 23 12:18:08 /usr/sbin/kamailio[4789]:
INFO: <script>: Incoming SIP TCP request conid 21 call-id
WQjhldpRJbxjZRYe7fWgbw
2024-01-23T13:18:08.860+01:00 Jan 23 12:18:08 /usr/sbin/kamailio[4795]:
CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 49
2024-01-23T13:18:09.486+01:00 Jan 23 12:18:09 /usr/sbin/kamailio[4751]:
ALERT: <core> [main.c:783]: handle_sigs(): child process 4777 exited by a
signal 11
2024-01-23T13:18:09.486+01:00 Jan 23 12:18:09 /usr/sbin/kamailio[4751]:
ALERT: <core> [main.c:787]: handle_sigs(): core was generated
2024-01-23T13:18:09.516+01:00 Jan 23 12:18:09 /usr/sbin/kamailio[4751]:
INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not
initialized
2024-01-23T13:18:09.570+01:00 Started /root/sipconfig/startkamailio.sh
2024-01-23T13:18:09.570+01:00 info: :-) Starting Kamailio
Just before all the crashes we see the "CRITICAL: <core>
[core/pass_fd.c:281]: receive_fd(): EOF on 49" log line.
Best regards,
Mattis Lind
# gdb /usr/sbin/kamailio /core
*GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git*
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/kamailio...
(No debugging symbols found in /usr/sbin/kamailio)
warning: Can't open file /dev/zero (deleted) during file-backed mapping
note processing
[New LWP 4777]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -DD -M 18 -m 192 -A
serverId=17173 -A sendTraceLocal="sip:10'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:77
77 ../sysdeps/x86_64/multiarch/strlen-evex.S: No such file or directory.
(gdb) bt full
#0 __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:77
No locals.
#1 0x00007f5425e34b78 in __vfprintf_internal (s=s@entry=0x55a06e969a60,
format=format@entry=0x55a06e558020 "%s: %.*s%s%s%sBUG: qm: fragm. %p
(address %p) beginning overwritten (%lx)! Memory allocator was called from
%s:%u. Fragment marked by %s:%lu. Exec from %s:%u.\n",
ap=ap@entry=0x7ffd6bebfb50, mode_flags=mode_flags@entry=0) at
vfprintf-internal.c:1647
len = <optimized out>
step0_jumps = {0, 1717, 1621, 3413, 3317, 3997, 2677, 2837, 3613,
1773, 4309, 4445, 3517, 4437, 4389, 2789, 4197, 3917, 3221, 2997, 1141,
1365, 1997, 1925, 1885, 733, 3709, 533, 533, 4101}
space = <optimized out>
is_short = <optimized out>
use_outdigits = 0
outc = <optimized out>
step1_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1773, 4309, 4445, 3517,
4437, 4389, 2789, 4197, 3917, 3221, 2997, 1141, 1365, 1997, 1925, 1885,
733, 3709, 533, 533, 0}
group = 0
prec = -1
step2_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4309, 4445, 3517,
4437, 4389, 2789, 4197, 3917, 3221, 2997, 1141, 1365, 1997, 1925, 1885,
733, 3709, 533, 533, 0}
string = 0x756d6f7266222c22 <error: Cannot access memory at address
0x756d6f7266222c22>
left = 0
is_long_double = <optimized out>
width = 0
signed_number = <optimized out>
step3a_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4213, 0, 0, 0, 4389,
2789, 4197, 3917, 3221, 0, 0, 0, 0, 1925, 0, 0, 0, 0, 0, 0}
alt = <optimized out>
showsign = 0
is_long = 0
is_char = <optimized out>
pad = <optimized out>
step3b_jumps = {0 <repeats 11 times>, 3517, 0, 0, 4389, 2789, 4197,
3917, 3221, 2997, 1141, 1365, 1997, 1925, 1885, 733, 3709, 0, 0, 0}
step4_jumps = {0 <repeats 14 times>, 4389, 2789, 4197, 3917, 3221,
2997, 1141, 1365, 1997, 1925, 1885, 733, 3709, 0, 0, 0}
args_value = <optimized out>
is_negative = <optimized out>
number = {longlong = <optimized out>, word = <optimized out>}
base = <optimized out>
the_arg = {pa_wchar = 4777 L'\x12a9', pa_int = 4777, pa_long_int =
4777, pa_long_long_int = 4777, pa_u_int = 4777, pa_u_long_int = 4777,
pa_u_long_long_int = 4777,
pa_double = 2.3601515901836347e-320, pa_long_double =
1.74131181638025811763e-4947, pa_float128 =
3.09319115455554459548860449034534676e-4962,
pa_string = 0x12a9 <error: Cannot access memory at address 0x12a9>,
pa_wstring = 0x12a9 <error: Cannot access memory at address 0x12a9>,
pa_pointer = 0x12a9, pa_user = 0x12a9}
spec = 115 's'
_buffer = {__routine = 0x4, __arg = 0xd, __canceltype = 1855363680,
__prev = 0xe0}
_avail = <optimized out>
thousands_sep = 0x0
grouping = 0xffffffffffffffff <error: Cannot access memory at
address 0xffffffffffffffff>
done = 238
f = 0x55a06e5580a7 "s:%lu. Exec from %s:%u.\n"
lead_str_end = 0x55a06e558020 "%s: %.*s%s%s%sBUG: qm: fragm. %p
(address %p) beginning overwritten (%lx)! Memory allocator was called from
%s:%u. Fragment marked by %s:%lu. Exec from %s:%u.\n"
end_of_spec = <optimized out>
work_buffer =
"h\r\000\000\000\000\000\000\000\000\000\000\060\000\000\000\000\000\000\000\375\177\000\000
\372\353k\375\177\000\000\237MSn\n\000\000\000\000\000\000\000\240U",
'\000' <repeats 18 times>,
"P\225Un\240U\000\000\000\000\000\000[\214A\323\f\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377\206\002",
'\000' <repeats 14 times>, "\004\000\000\000\000\000\000\000
\367\353k\375\177\000\000\301\225Un\240U\000\000\323\262\vn\240U\000\000\000\000\000\000\000\000\000\000s\374On\240U\000\000W\225Un\240U\000\000\350>\212\027T\177\000\000
\323\365$T\177\000\000\060\a\354k\375\177\000\00--Type <RET> for more, q to
quit, c to continue without paging--
0\220\371\227n\240U\000\000"...
workend = 0x7ffd6bebf9f8 ""
ap_save = {{gp_offset = 16, fp_offset = 48, overflow_arg_area =
0x7ffd6bebfc30, reg_save_area = 0x7ffd6bebfb70}}
nspecs_done = 10
save_errno = 4
readonly_format = 0
do_longlong_number = <optimized out>
__result = <optimized out>
#2 0x00007f5425ec079f in __vsyslog_internal (pri=<optimized out>,
fmt=0x55a06e558020 "%s: %.*s%s%s%sBUG: qm: fragm. %p (address %p)
beginning overwritten (%lx)! Memory allocator was called from %s:%u.
Fragment marked by %s:%lu. Exec from %s:%u.\n",
ap=0x7ffd6bebfb50, mode_flags=0) at ../misc/syslog.c:233
now_tm = {tm_sec = 8, tm_min = 18, tm_hour = 12, tm_mday = 23,
tm_mon = 0, tm_year = 124, tm_wday = 2, tm_yday = 22, tm_isdst = 0,
tm_gmtoff = 0, tm_zone = 0x55a06e94c5e0 "UTC"}
now = 1706012288
fd = <optimized out>
f = 0x55a06e969a60
buf = 0x0
bufsize = 0
msgoff = 21
saved_errno = <optimized out>
failbuf =
"`\232\226n\240U\000\000\000\204\201\247[\214A\323`\374\353k\375\177\000\000\300p\371%T"
clarg = {buf = <optimized out>, oldaction = <optimized out>}
#3 0x00007f5425ec0c46 in __syslog (pri=<optimized out>, fmt=<optimized
out>) at ../misc/syslog.c:117
ap = {{gp_offset = 48, fp_offset = 48, overflow_arg_area =
0x7ffd6bebfc70, reg_save_area = 0x7ffd6bebfb70}}
#4 0x000055a06e3b7839 in ?? ()
No symbol table info available.
#5 0x000055a06e3bc039 in qm_free ()
No symbol table info available.
#6 0x000055a06e3c7c28 in qm_shm_free ()
No symbol table info available.
#7 0x00007f542325fb8e in uac_send_tm_callback () from
/usr/lib/x86_64-linux-gnu/kamailio/modules/uac.so
No symbol table info available.
#8 0x00007f5424a2f002 in run_trans_callbacks_internal () from
/usr/lib/x86_64-linux-gnu/kamailio/modules/tm.so
No symbol table info available.
#9 0x00007f5424a2f179 in run_trans_callbacks () from
/usr/lib/x86_64-linux-gnu/kamailio/modules/tm.so
No symbol table info available.
#10 0x00007f54249d5e8c in free_cell_helper () from
/usr/lib/x86_64-linux-gnu/kamailio/modules/tm.so
No symbol table info available.
#11 0x00007f5424aa8f82 in wait_handler () from
/usr/lib/x86_64-linux-gnu/kamailio/modules/tm.so
No symbol table info available.
#12 0x000055a06e37a263 in ?? ()
No symbol table info available.
#13 0x000055a06e37a79d in ?? ()
No symbol table info available.
#14 0x000055a06e37acc6 in timer_main ()
No symbol table info available.
#15 0x000055a06e0a5f62 in main_loop ()
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#16 0x000055a06e0b120c in main ()
No symbol table info available.
When receiving to-tag and returning 180 ring without SDP body, how can it be converted into 183 with SDP and returned to from-tag. I want to realize that when I receive 180 no sdp, I will play an audio clip for the from-tag.:
INVITE (SDP)
──────────────────────────> │
100 Trying
<────────────────────────── │
│ INVITE (SDP)
│ ──────────────────────────>
100 Trying
│ <──────────────────────────
180 Ringing
│ <──────────────────────────
183 Session Progress (SDP) │
<────────────────────────── │
Hi
I have come across an issue with the usrloc database on kamailio 5.6 and 5.7
Jan 26 07:19:45 dev-cpereg01 kamailio[2708456]: ERROR: <core> [db_query.c:244]: db_do_insert_cmd(): error while submitting query
Jan 26 07:19:45 dev-cpereg01 kamailio[2708456]: ERROR: usrloc [ucontact.c:686]: db_insert_ucontact(): inserting contact in db failed somedudetp0216 (uloc-65b237f8-28983d-1)
Jan 26 07:19:45 dev-cpereg01 kamailio[2708456]: ERROR: usrloc [urecord.c:419]: wb_timer(): inserting contact into database failed (aor: somedudetp0216)
settings:
# ----- usrloc params -----
modparam("usrloc", "db_url", DBLOCAL)
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "ka_mode", 0)
modparam("usrloc", "ka_filter", 1)
modparam("usrloc", "timer_procs", 1)
modparam("usrloc", "ka_from", "sip:ping@sip.imp.ch")
modparam("usrloc", "server_id_filter", 1)
# Use DMQ to sync userloc
loadmodule "dmq_usrloc.so" # Replicate usrloc via dmq
# Enable userloc sync
modparam("dmq_usrloc", "enable", 1)
# Do a full sync on start
modparam("dmq_usrloc", "sync", 1)
I assume, when kamailio is being restartet there are some expired entries still present in the database which kamailio tries to insert on a new registration.
This leads to this duplicate key error.
Is there a way to tell kamailio to use 'replace into' instread of 'insert into'?
Solution for now, is to manually delete expired entries from the database.
--
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Hello Kamailio community,
After the January refactoring of OpenSSL integration, configurations that
initialise libssl in rank 0 (thread #1) are likely to trigger errors more
aggressively. This type of configuration has all along been broken due to
OpenSSL use of thread-local variables.
The first "victim" is https://github.com/kamailio/kamailio/issues/3727 —
the configuration has dispatcher + db_unixodbc (+ some driver) — this
configuration initialises libssl in rank 0(thread #1).
I have a couple of PRs in the queue for db_unixodbc, db_mysql (PostgreSQL
may need similar attention).
master and 5.7 branches are affected
Regards
Richard
Hello,
LCR module logic is :
When the function /load_gws()/ is called, matching gateways (that are
not currently designated as defunct) are ordered for forwarding purposes
as follows:
1.
according to longest Request-URI user part match
2.
according to tuple's priority
3.
according to tuple's randomized weight
or, if priority_ordering parameter is set to value 1, as follows:
1.
according to tuple's priority
2.
according to tuple's randomized weight
and Smaller priority value means higher priority (highest priority value
being 0 and lowest being 255). so I have 3 lcr_rule_target use the same
lcr_rule entry but 3 different Gateways and priority. So the order of
rules would be longest Request-URI (same) and the priority but the
result is:
added matched_gws[0]=[3, 5, 200, 2193562]
added matched_gws[1]=[1, 5, 2, 6888519]
added matched_gws[2]=[2, 5, 50, 2159388]
same prefix but first rule target with priority 200 and then 2 and then
50. I think the result would be priority 2,50 and 100.
¿Or not?
---
I'm SoCIaL, MayBe
Hi,
I'm trying a DMQ dialog sync up setup with 2 x Kamailios. I have this scenario:
1. Kamailio1 receives INVITE and sends KDQM to Kamailio2 to sync up dialog => OK
2. Kamailio2 receives 200OK
3. Kamailio2 does not send anything back to Kamailio1 to update dialog state => not OK, i expected a KDMQ to be send back to Kamailio1 to update dialog state
I was wondering if DMQ module supports the above? I am using 5.6 version of kamailio, and I am curios if this might be implemented in later branches?
Thank you,
Stefan
Hi
https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#branch_name_-…
"Assigning $null to uri attribute will drop the branch, for the rest of
attributes will just set the value to null."
Where do I need to assing $null to the brach URI to get it dropped? And
what happens to the index, is there a gap, or do the subsequent
branches get re-indexed so they don't match with the ulc indexes anymore?
Actual example, I have multiple contacts I would like to add to branches.
Two of the contacts are from the location database + an additional
contact.
# Basic Branch:
$ru = $(ulc(aor=>addr)[0]);
$du = $(ulc(aor=>received)[0]);
$fs = $(ulc(aor=>socket)[0]);
# Additional Branch:
append_branch($(ulc(aor=>addr)[1]));
$(branch(dst_uri)[-1]) = $(ulc(aor=>received)[1]);
$(branch(send_socket)[-1]) = $(ulc(aor=>socket)[1]);
and so on, actually a loop over all ulc contacts.
# Lasst Additional Branch, point to other registrar, not to a usrloc location.
append_branch($ru);
$(branch(dst_uri)[-1]) = "sip:other-registrar:5060;transport=udp";
$fsn = "LocalUDPv4";
$(branch(send_socket)[-1]) = $fs;
t_on_branch("BR_T");
branch_route[BR_T]
{
$var(socket) = $(ulc(aor=>socket)[$T_branch_idx]);
if ($var(socket) == 0) {
xlog("L_INFO", "$cfg(route): DROPPING BRANCH: $T_branch_idx No local socket on this registrar\n");
$(branch(uri)[$T_branch_idx]) = $null;
}
}
I don't get this right! Call is still sent to that contact.
--
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________