Hello all,
I'm currently implementing a Kamailio with RADIUS.
I want to send an Access-Request to my RADIUS server and in order to do that i'm using misc_radius module and radius_does_uri_exist() function without any arguments :
"if (radius_does_uri_exist()) {"
For my module configuration I have the following configurations :
"modparam("misc_radius", "radius_config", "/etc/radcli/radiusclient.conf")
modparam("misc_radius", "uri_extra", "Sip-Method=$rm")"
From what i understand, with …
[View More]this config my access-request should contain the default attributes and Sip-Method Attribute but that is not happening. Only defaults attributes are included.
I've tried to run Kamailio with "-ddd" flag for better debug and i only get this error : "1(176) DEBUG: misc_radius [functions.c:615]: radius_does_uri_user_host_exist(): failure".
Is there any other configuration that i must do?
Thanks for the help.
Cheers,
Duarte
[View Less]
Hello,
we should consider an online devel meeting sometime soon to summarize
what was done at (and still needs to be done after) devel meeting in
Dusseldorf and plan a bit the targets for next major release (5.8 or 6.0)?
If considered useful, I propose Dec 5 at 14:30UTC (15:30
Berlin/Paris/Madrid/Rome), but we can also look for other dates as well.
Topics to be discussed can be added at:
-
https://github.com/kamailio/kamailio-wiki/blob/main/docs/devel/irc-meetings…
Pull requests …
[View More]can be made by users without git access.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
[View Less]
Hello guys,
I have this setup where one side is TLS and the other UDP. Normally this
works fine, but we have this provider sending sips as the schema everywhere
(from, to, rr, contacts), kamailio sends the same sips to the upstream usp
freeswitch.
My problem is when FS sends back a 200OK and kamailio forwards it back to
the provider, the provider sends an ACK and kamailio can't match it with
the dialog and doesn't know where to forward it.
i think this is happening because FS when is sees …
[View More]SIPS is setting the
contact port as 5081 instead of the usual 5080...
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
[View Less]
Hello World!
Kamailio 5.5 in use.
I wonder, how I could prevent this issue.
modparam("dialog", "send_bye", 1)
modparam("dialog", "default_timeout", 21600)
in the corresponding route:
$dlg_ctx(timeout_route) = "DIALOG_TIMEOUT";
dlg_manage();
Dialog starts on Node01 and it's variables, status and timer are DMQ
synced to Node02
As both nodes have the same information, I guess both arm the timeout
trigger and sometimes the wrong node is more trigger friendly.
If dlg_ontimeout() is triggered …
[View More]on Node02 then:
* No Bye is send, as Node02 is not handling that Dialog.
* Dialog is removed from Memory on Node02 and state synced back to
Node01
* Dialog is removed from Memory on Node01 too, but NOT from database [*1]
* Dialog CDR is never commited on Node01
* Call is never sent to timeout_route
And subsequent in dialog messages on Node01 result in:
dlg_onroute(): unable to find dialog
Did I misconfigure something?
Is there a way to make sure the timer is NOT triggered on the node not
handling the dialogue?
Shall I try by setting the default_timeout and then use a timeout_avp
to set that timeout slightly lower AFTER the dialog has started? Or
would this be synced to the other node too?
I found out, session timer changes are not synced after an initial timer
was synced, so you can not extend the session timer after setting a
initial timeout. So maybe this is also true for dialog timeout?
[*1] this also explains why upon restarting kamailio, the dialog
suddenly is back and after timing out again, a CDR is then written with
a way too long duration.
--
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
______________________________________________________
[View Less]
Hi
I'm trying to change the lifetime timer on a KDMQ dialog message before
handing it with dmq_handle_message();
if(has_body("application/json") && $fU == 'dialog')
{
if (jansson_get("lifetime", $rb, "$var(lifetime)"))
{
xlog("L_INFO", "$cfg(route): DIALOG JSON action: $var(action) state: $var(state) lifetime: $var(lifetime)\n");
$var(new_lifetime) = $var(lifetime) + 60;
…
[View More] $var(newrb) = $rb;
jansson_set("integer", "lifetime", $var(new_lifetime), "$var(newrb)");
xlog("L_INFO", "$cfg(route): DIALOG JSON NEW: $var(newrb)\n");
set_body("$var(newrb)","application/json");
msg_apply_changes();
}
}
dmq_handle_message();
exit;
The JSON string looks good after that manipulation, it contains the
updated lifetime.
But dmq_handle_message() does not seem to get the body anymore. So I
wonder what set_body() exactly does. Is it replacing the body or
appending to it?
Is there a way to crank up debug output in the dialog and/or dmq module?
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
______________________________________________________
[View Less]
Hello,
Kamailio SIP Server v5.6.5 stable release is out.
This is a maintenance release of the latest stable branch, 5.6, that
includes fixes since the release of v5.6.4. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.6.x. Deployments running previous v5.6.x
versions are strongly recommended to be upgraded to v5.6.5.
Note that 5.6 is the second last stable branch, still officially
maintained by Kamailio …
[View More]development team. The latest stable branch is
5.7, with v5.7.3 being release out of it.
For more details about version 5.6.5 (including links and guidelines to
download the tarball or from GIT repository), visit:
* https://www.kamailio.org/w/2023/11/kamailio-v5-6-5-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training -- asipto.com
[View Less]
Hello,
I am considering to release Kamailio v5.6.5 (out of branch 5.6) later
this week (likely on Thursday or Friday, Nov 23/24, 2023). If anyone is
aware of
issues not yet on the bug tracker, report them there asap in order to
have a better chance to be fixed.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training -- asipto.com
Hello!
I'm facing an issue 2/3 times a day with the following errors in the logs:
Nov 22 00:09:02 /usr/local/sbin/kamailio[3720]: CRITICAL: <core>
[core/mem/q_malloc.c:150]: qm_debug_check_frag(): BUG: qm: prev. fragm. tail
overwritten(c0c0c000, abcdefed)[0x7f9600b754f8:0x7f9600b75530]! Memory
allocator was called from core: core/re.c:430. Fragment marked by core:
db_res.c:139. Exec from core/mem/q_malloc.c:391.
Nov 22 00:09:02 /usr/local/sbin/kamailio[3720]: CRITICAL: <core>
[…
[View More]core/mem/q_malloc.c:155]: qm_debug_check_frag(): BUG: qm: prev. fragm. tail
overwritten [0x7f9600b75460:0x7f9600b75498] - fragment marked by tm:
t_fwd.c:230
Nov 22 00:09:02 abrt-hook-ccpp: Process 3720 (kamailio) of user 0 killed by
SIGABRT - ignoring (repeated crash)
Do you have any idea where it could come from? I'm running Kamailio 5.6.4.
Regards,
Igor.
--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com
[View Less]
Hello,
during the Kamailio Developers Meeting 2023 in Dusseldorf that took
place last week, it was proposed to obsolete modules that seem to be
unmaintained and no activity about them was noticed during the past
years. It is quite some overhead in packaging them and trying to keep
them compiling when they have external dependencies, therefore such step
should spare some resources in the future.
The list (see below) was built based on the options of those present at
the meeting, now we want to …
[View More]discuss it on the larger communities of
developers and users. If you are using any of these modules or you think
any of them worth keeping, reply with the names of the modules that you
want to be kept.
The proposed action is to relocate the obsoleted modules to a new git
repository "kamailio-obsolete" to still keep some visibility to them and
in the eventually of future interest on any of them, it can be
reintroduced in the main repository.
Next is the initial list of modules proposed to be considered obsolete:
- app_java
- app_lua_sr
- app_mono
- app_python
- app_sqlang
- auth_identity
- call_control
- db2_ldap
- db2_ops
- db_cassandra
- db_perldvdb
- dnssec
- domainpolicy
- h350
- mediaproxy
- osp
- peering
- print
- print_lib
- pua_xmpp
- ratelimit
- uid_auth_db
- uid_avp_db
- uid_domain
- uid_gflags
- uid_uri_db
- uri_db
- xmpp
- xprint
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training -- asipto.com
[View Less]
Hi,
Setup: kamailio acting as a UAC needs to register with a server whose
outbound proxy is DNS SRV based only, there's no A record on the proxy's
FQDN. The provider advertises two SRV records.
;; ANSWER SECTION:
_sips._tcp.sip.provider.com. 10 IN SRV 10 50 5061 sip11-sip.provider.com.
_sips._tcp.sip.provider.com. 10 IN SRV 15 50 5061 sip10-sip.provider.com.
Everything was working fine, until the provider changed the SRV priority,
putting a lower priority on the host that is actually down at …
[View More]the moment.
In this case, sip11-sip.provider.com is DOWN and sip10-sip.provider.com is
UP.
Now, what's happening is Kamailio tries to REGISTER with the lower priority
host, gets no reply back (TCP connection doesn't get established). It then
takes 30 seconds for Kamailio to try the host with the higher priority,
registering successfully. And so it goes for every re-register: failure =>
30 seconds => register OK.
The same happens for INVITES to the downstream: INVITE => timeout => 30
seconds => INVITE (other host 200 OK).
I've tried to play with TCP and DNS params, but so far no luck: no matter
what I did - it took the same 30 seconds for Kamailio to detect failure and
retry the secondary host.
Any suggestions will be highly appreciated.
Kamailio 5.6.4 (x86_64/linux) 239d0a
tcp_connection_lifetime=3604
tcp_max_connections=60
tcp_connect_timeout=10
tcp_keepalive = yes
tcp_crlf_ping=yes
tcp_keepcnt=3
tcp_keepidle=30
tcp_keepintvl=30
tcp_reuse_port=1
tcp_accept_no_cl=yes
tcp_rd_buf_size=16384
use_dns_cache = on
use_dns_failover = on
dns_srv_loadbalancing = on
dns_try_naptr = on
dns_try_ipv6=no
dns_try_naptr=no
dns_use_search_list=no
dns_retr_time=1
dns_retr_no=3
Thanks
--Sergiu
[View Less]
Hi, I am trying to register an endpoint as follows:
REGISTER sip:siptest.booger.net SIP/2.0
Via: SIP/2.0/UDP X.X.X.X.76:31114;branch=z9hG4bK223420485;rport
From: sip:1720XXXXXXX@siptest.booger.net;tag=962873337
To: sip:1720XXXXXXX@siptest.booger.net
Call-ID: 2053687751-32761-1(a)EH.BJI.BAE.HG
CSeq: 2067 REGISTER
Contact: sip:1720XXXXXXX@X.X.X.X:31114;reg-id=2;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B82A1C58B>"
Authorization: Digest username="654fe87c-67ff-42dd-8d5e-…
[View More]79786a99713c", realm="siptest.booger.net", nonce="ZVaJtmVWiIrsuWc5hkzM3MUUUs8MgRFR", uri=sip:siptest.booger.net, response="119a3b6426cdcfa037bf1825b69139a5", algorithm=MD5
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP2170 1.0.11.64
Supported: path
Expires: 120
MAC: 00:0b:82:a1:c5:8b
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
Note that the Authorization username differs from the To-From username. This is intentional, as I am testing use of randomly generated credential .
This worked with this endpoint directly against Asterisk, for instance.
However, registering against Kamailio now, I am getting:
Nov 16 21:24:26 vs-rs01 /usr/sbin/kamailio[584855]: DEBUG: {1 2067 REGISTER 2053687751-32761-1(a)EH.BJI.BAE.HG} auth_db [authorize.c:503]: auth_check(): authentication username mismatch with from/to username
Even though I have this set in the config:
if (!auth_check("$fd", "subscriber", 0)) { // default 1, change to 0 to skip check
0 is supposed to mean no user checks performed.
I am doing this because I want to use the complex credentials for authentication, but want the endpoint to tell me the phone number in an INVITE to/from, instead of putting in the extremely long credential.
Is there a way to get Kamailio to accept different SIP User ID and Authentication ID fields?
Thanks,
Jawaid
[View Less]
Hello all,
I'm using the following Lua script to fetch data from Redis, which is in form of list:
function split(str, delimiter)
for token in string.gmatch(str, "[^" .. delimiter .. "]+") do
return token
end
end
function contains(mainString, subString)
return string.find(mainString, subString, 1, true) ~= nil
end
function longest_match_acode()
local currentSeconds = os.time()
local milliseconds = os.clock() * 1000
local …
[View More]ddate = os.date("%Y-%m-%d %H:%M:%S", currentSeconds) .. string.format(".%03d", milliseconds)
KSR.xlog.xinfo("starting date:" ..ddate)
local size = 0
local result
local acode = "29192"
local inputbcode = "4474173"
local delimiter = ":"
while size == 0 do
local currentSeconds = os.time()
acode = string.sub(acode, 1, string.len(acode) - 1)
KSR.ndb_redis.redis_cmd("srvN", "LRANGE price:" .. acode .." 0 -1", "r")
size = tonumber(KSR.pv.get("$redis(r=>size)"))
end
local left = 0
local right = size - 1
while left <= right do
local currentSeconds = os.time()
local milliseconds = os.clock() * 1000
local ddate = os.date("%Y-%m-%d %H:%M:%S", currentSeconds) .. string.format(".%03d", milliseconds)
resultRight = tostring(KSR.pv.get("$redis(r=>value[" .. right .. "])"))
resultLeft = tostring(KSR.pv.get("$redis(r=>value[" .. left .. "])"))
local bcodeLeft = split(resultLeft, delimiter)
local bcodeRight = split(resultRight, delimiter)
if contains(inputbcode, bcodeRight) then
KSR.xlog.xinfo("Input bcode contains bcode value from Redis: " .. resultRight .. " at index: " .. right .. " with date: " .. ddate)
end
if contains(inputbcode, bcodeLeft) then
KSR.xlog.xinfo("Input bcode contains bcode value from Redis: " .. resultLeft .. " at index: " .. left .. " with date: " .. ddate)
end
left = left + 1
right = right - 1
end
local currentSeconds = os.time()
local milliseconds = os.clock() * 1000
local ddate = os.date("%Y-%m-%d %H:%M:%S", currentSeconds) .. string.format(".%03d", milliseconds)
KSR.xlog.xinfo("ending date:" ..ddate)
end
function ksr_request_route()
if KSR.is_INVITE() then
longest_match_acode()
KSR.sl.send_reply("404", "Not found");
end
end
I'm getting the following warning in the log : WARNING: LUA {INVITE}: <core> [core/pvapi.c:340]: pv_cache_add(): pv cache limit is going to be exceeded - pkg memory may get filled with pv declarations
I think the issue is in the following lines:
resultRight = tostring(KSR.pv.get("$redis(r=>value[" .. right .. "])"))
resultLeft = tostring(KSR.pv.get("$redis(r=>value[" .. left .. "])"))
the list coming from Redis has around 30k items, which I'm iterating through using value[x] which is exhausting the pv declaration as per my understanding.
How to overcome this issue? Is it possible to save the list as an array variable and then iterate through that array?
Regards,
[View Less]
Hello,
Kamailio SIP Server v5.7.3 stable release is out.
This is a maintenance release of the latest stable branch, 5.7, that
includes fixes since the release of v5.7.2. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.7.x. Deployments running previous v5.7.x
versions are strongly recommended to be upgraded to v5.7.3.
For more details about version 5.7.3 (including links and guidelines to
download the tarball or …
[View More]from GIT repository), visit:
* https://www.kamailio.org/w/2023/11/kamailio-v5-7-3-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - www.kamailioworld.com
[View Less]
Hello,
I am considering to release Kamailio v5.7.3 (out of branch 5.7) soon
(likely on Friday 17 or during the beginning of next week). If anyone is
aware of issues not yet on the bug tracker, report them there asap in
order to have a better chance to be fixed.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - www.kamailioworld.com
I want to register SIP Trunk directly in Kamailio. How can I register the SIP trunk in Kamailio. Please find the below sample SIP trunk details.
Network IP 10.2.2.2
Subnet Mask 255.255.255.252
Customer IP 10.3.3.3
Gateway IP 10.1.1.1
SBCIP 10.4.4.4
Username 12345678
Password 1234
Please help me with configuration to register SIP trunk in kamailio.
Hi All,
I am playing around with the dlg_req_within to send a REINVITE to toggle some rtpengine parameters and this works fine.
The first time I use the command after tracking the dialog, it sends a REINVITE with an incremented CSEQ value.
However when I issue it again, it sends another REINVITE but with the same CSEQ value, so again 2 for example.
How can you ensure its incremented or can you set it somehow?
As would like to generate at least 2 reinvites per dialog.
Many thanks
Jon
…
[View More]Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
[View Less]
Hello Daniel,
I’m using kamailio 5.7.2 currently and this misterious crash occurs again. Now core files are generated also, here is the trace:
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007fae9a2d0859 in __GI_abort () at abort.c:79
#2 0x00005614ad79afd8 in qm_debug_check_frag (qm=0x7fae78e77000, f=0x7fae79805028, file=0x7fae77c8c134 "uac: uac_send.c", line=860, efile=0x5614ad936f99 "core/mem/q_malloc.c", eline=511) at core/mem/q_malloc.c:129
#3 …
[View More]0x00005614ad79f7c1 in qm_free (qmp=0x7fae78e77000, p=0x7fae79805060, file=0x7fae77c8c134 "uac: uac_send.c", func=0x7fae77c8cf10 <__func__.15157> "uac_send_tm_callback", line=860, mname=0x7fae77c8c014 "uac") at core/mem/q_malloc.c:511
#4 0x00005614ad7ab410 in qm_shm_free (qmp=0x7fae78e77000, p=0x7fae79805060, file=0x7fae77c8c134 "uac: uac_send.c", func=0x7fae77c8cf10 <__func__.15157> "uac_send_tm_callback", line=860, mname=0x7fae77c8c014 "uac") at core/mem/q_malloc.c:1350
#5 0x00007fae77c3686b in uac_send_tm_callback (t=0x7fae797dcf40, type=131072, ps=0x7fff8bd990d0) at uac_send.c:860
#6 0x00007fae783abc27 in run_trans_callbacks_internal (cb_lst=0x7fae797dcfe8, type=131072, trans=0x7fae797dcf40, params=0x7fff8bd990d0) at t_hooks.c:241
#7 0x00007fae783abd1e in run_trans_callbacks (type=131072, trans=0x7fae797dcf40, req=0x0, rpl=0x0, code=0) at t_hooks.c:261
#8 0x00007fae782bd8cb in free_cell_helper (dead_cell=0x7fae797dcf40, silent=0, fname=0x7fae783e9f62 "timer.c", fline=653) at h_table.c:165
#9 0x00007fae7837649c in wait_handler (ti=724701450, wait_tl=0x7fae797dcff8, data=0x7fae797dcf40) at timer.c:653
#10 0x00005614ad50be68 in timer_list_expire (t=724701450, h=0x7fae78ef5d18, slow_l=0x7fae78ef95e0, slow_mark=33641) at core/timer.c:857
#11 0x00005614ad50c3a7 in timer_handler () at core/timer.c:922
#12 0x00005614ad50c8d5 in timer_main () at core/timer.c:961
#13 0x00005614ad45fbf3 in main_loop () at main.c:1833
#14 0x00005614ad46ae93 in main (argc=14, argv=0x7fff8bd99b48) at main.c:3086
I think it occurs only if $uac_req(evroute) is set to 1 and I define the event_route[uac:reply] route.
My uac_reply route is easy:
if ($uac_req(evcode)==200) {
xlog("L_INFO", "Registration for user $fU has been refreshed successfully.");
$sht(vtp=>asterisk_restarted) = $null;
route(SAVE_REG);
}
else {
xlog("L_INFO", "Registration failed: $uac_req(evcode)");
}
the SAVE_REG route is the following:
route[SAVE_REG] {
xlog("L_INFO", "Saving pbx registration...:$fU");
$var(maxExpiry) = MAX_PBX_REG_EXPIRY;
route(GET_CLIENT_ID);
sql_pvquery("ca", "select count(*) from pbxusers where user = '$fU'", "$var(pbxusersCnt)");
if ($var(pbxusersCnt)>0) {
if ($var(clientId) == 0) {
sql_query("ca", "update pbxusers set expiry = TIMESTAMPADD(SECOND, $var(maxExpiry), SYSDATE()), online=1 where user = '$fU'");
}
else {
sql_query("ca", "update pbxusers set client_id = '$var(clientId)', expiry = TIMESTAMPADD(SECOND, $var(maxExpiry), SYSDATE()), online=1 where user = '$fU'");
}
}
else {
sql_query("ca", "insert into pbxusers (user, expiry, client_id, online) values ('$fU', TIMESTAMPADD(SECOND, $var(maxExpiry), SYSDATE()), '$var(clientId)', 0)");
}
}
And GET_CLIENT_ID route is:
route[GET_CLIENT_ID] {
$var(clientId) = 0;
if (is_present_hf("X-AT-ClientId")) {
$var(clientId) = $hdr(X-AT-ClientId);
}
}
Any idea, is it a bug or I do something wrong in config files?
Peter
From: Dr. Barabás Péter via sr-users <sr-users(a)lists.kamailio.org>
Date: Sunday, 2023. October 8. 18:49
To: miconda(a)gmail.com <miconda(a)gmail.com>, Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Cc: Dr. Barabás Péter <dr.peter.barabas(a)gmail.com>
Subject: [SR-Users] Re: uac_req_send + evroute + crash
Hello Daniel,
I do not see any “failed to send request with authentication”.
The next CRITICAL log appears after calling uac_req_send():
CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f114995ada8), called from uac: uac_send.c: uac_send_tm_callback(860), first free uac: uac_send.c: uac_resend_tm_callback(732) - ignoring
Now we use kamailio 5.7.2 and no crash has come, but the critical logs above exist.
I saw a ticket in github: https://github.com/kamailio/kamailio/issues/3522, may the crash be similar or the same to that?
I will make a try next week with downgrading to 5.6.2 and try to reproduce the crash.
Peter
From: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Friday, 2023. October 6. 13:55
To: Dr. Barabás Péter <dr.peter.barabas(a)gmail.com>, Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Subject: Re: [SR-Users] uac_req_send + evroute + crash
Hello,
do you also get error log messages that include "failed to send request with authentication"?
Which CRITICAL log appears when you call uac_req_send()? You pasted a couple of them in the initial email?
Cheers,
Daniel
On 05.10.23 17:32, Dr. Barabás Péter wrote:
Hello,
I used kamailio version 5.6.2. I refreshed to 5.7.2 today.
As I remember it was in kamailio long time ago therefore I could skip evroute route.
But this CRITICAL log appears always when I call uac_req_send().
I call it with settings:
$uac_req(auser) = $var(username);
$uac_req(apasswd) = $var(password);
Where username and password are retrived from web service before call.
In event_route I got first 401 after 200.
Peter
From: Daniel-Constantin Mierla <miconda(a)gmail.com><mailto:miconda@gmail.com>
Date: Thursday, 2023. October 5. 17:25
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org><mailto:sr-users@lists.kamailio.org>
Cc: Dr. Barabás Péter <dr.peter.barabas(a)gmail.com><mailto:dr.peter.barabas@gmail.com>
Subject: Re: [SR-Users] uac_req_send + evroute + crash
Hello,
On 05.10.23 16:34, Dr. Barabás Péter via sr-users wrote:
Hi All,
I use kamailio In front of Asterisk and kamailio needs to refresh registrations periodically towards Asterisk to ensure the availability of users from Asterisk side.
I use uac module and call uac_req_send() for sending REGISTER requests.
I set $uac_req(evroute)=1
The event_route[uac:reply] is called fine, but in kamailio logs I see the next lines:
CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f114995ada8), called from uac: uac_send.c: uac_send_tm_callback(860), first free uac: uac_send.c: uac_resend_tm_callback(732) - ignoring
After some time, kamailio has crashed.
CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f114995ada8), called from uac: uac_send.c: uac_send_tm_callback(860), first free uac: uac_send.c: uac_resend_tm_callback(732) – ignoring
CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 34
ALERT: <core> [main.c:774]: handle_sigs(): child process 1407950 exited by a signal 6
what version of Kamailio are you using? Is Asterisk challenging for authentication?
Does it happen every time or seldom?
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training - Online - Nov 14-16, 2023 -- asipto.com
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training - Online - Nov 14-16, 2023 -- asipto.com
[View Less]
Hi
I'm still looking for a better way to tell Kamailio that we want to
enter 'maintenance' and STAY in maintenance after a restart.
Maintenance is: Reject all messages without totag with 503 to prevent
creating new dialogues.
I could use a shared pv and the use kamcmd pv.shvSet to toggle it.
But when kamailio is restarted, that pv is also reset to it's initial
state. Not good, if I want to make sure the node stays in maintenance
mode after a restart as for example after pushing a config …
[View More]change via
ansible.
So what comes to my mind is to check for the presence of a file.
something like:
route[CHECK_MAINTENANCE]
{
if (!has_totag() && is_method("INVITE")) {
if (file_exist("/etc/kamailio/maintenance.flag")) {
xlog("L_ERR", "Maintenance flag present! Rejecting INVITE\n");
t_send_reply("503", "Maintenance mode - no new calls accepted");
exit;
}
}
}
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
______________________________________________________
[View Less]
Hello everyone,
I have previously set up Kamailio 5.7.2 IMS configuration (including P-CSCF, S-CSCF and I-CSCF) and successfully made voice calls. Now I'm trying to set up an IP-SM-GW AS using the example here (with some tweaks):
https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/example…
Currently I'm trying to send the SMS using a SIP software client (MicroSIP).
The problem is, while the SMS is received at the AS and stored in the database, it does not send it to the callee.…
[View More]
While troubleshooting the problem, I've found that reg_fetch_contacts("location", "$var(uri)", "caller") in route[SEND_SMS] cannot find the contact which was added by reginfo_handle_notify("location") in route[NOTIFY] in the usrloc database. By tracing the problem more, I've found that reginfo_handle_notify (when handling reg event NOTIFY) adds the complete AoR in the "username" field in the location table, e.g. as "bob(a)ims.mnc001.mcc001.3gppnetwork.org". But reg_fetch_contacts (when trying to send the SMS) looks up the table using only the user part in the "username" field, e.g. "bob". So it cannot find the callee contact and the configuration assumes the callee is still not registered; so it tries to send out a SUBSCRIBE every time it tries to send an SMS to the callee, instead of actually sending the SMS.
Does anybody have any idea on what could have caused this inconsistent behavior between reginfo_handle_notify and reg_fetch_contacts?
[View Less]
Hi List
I wanted to take one of our cores down gracefully by not destroy
running dialogues to be able to implement a config change on Kamailio
5.5
For this I did:
kamctl dispatcher.remove ID SIP-URI, for every IC
This worked fine, Kamailio is instructed to reply 503 on out of
dialogue traffic from unknown endpoints causing the endpoints to
re-route traffic to the other core, eventually making it possible to
stop and restart Kamailio without harm.
dialog count was steadily decreasing, until …
[View More]after about 10 minutes
after removing the dispatcher URI's it started to increase again.
kamctl dispatcher.list shows me, all dispatcher URI I removed are back!
There is no ds_reload() being executed by calls.
In the module description, I find no hint, that the dispatcher config
is being reloaded from file in some interval or so.
What could be the cause of my removed dispatcher suddenly being back?
--
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
______________________________________________________
[View Less]
Hi,
since we use git also for our kamailio stuff, we need to check in also
host specific stuff.
(same kamailio.cfg but different addresses and ... )
For this I thought an include_file for different hosts would be nice,
but I can not check in the different host specific files,
because I can not use something like:
|include_file "$HN(n).cfg"
It is not allowed in kamailio 5.6.x
Or better: the pseudo variable is not replaced.
Is there a way to work arround, or is it possible to make it …
[View More]possible?
Best regards
Bernd
|
[View Less]
Good evening everyone,
I'm trying to set a scenario with my extensions registered against kamailio via wss and then once authenticated forward the register to my asterisk.
After this, I use dispatcher module to balance invites to my asterisks.
I have a few questions, the first part seems to be working as I want but when asterisk receives an invite and responds with INVITE (SDP) it doesn't appear on my kamailio (but every other message appears) You can see it in this sngrep captures
Kamailio:
[…
[View More]cid:image001.png@01DA0E88.5F82F510]
Asterisk
[cid:image002.png@01DA0E88.5F82F510]
I guess it is because something in my asterisk pjsip configuration is wrong but I can't figure out what. So I'm start to think that maybe It is because I need to configure an rtpproxy app to change SDP and make RTP traffic go through kamailio
Maybe there's something else I need to do, or there's a guide to do this. But I can't find anything
Any help will be very appreciated
Thank you in advance
Samuel Moya Tinoco
Departamento de Sistemas y Redes
Móvil: (+34) 606985997
smoya(a)vivelibre.es<mailto:smoya@vivelibre.es>
[cid:image003.png@01DA0E88.5F82F510]
Soluciones inteligentes
para la autonomía personal
[View Less]
Hello,
following the Kamailio Developers Meeting discussions and provided that
GNU/Linux malloc() aligns allocated memory to 16 bytes on x86_64 (64b
CPUs), I just updated the native Kamailio qm (quick malloc - the default
one) and fm (fast malloc) memory managers to also align to 16 bytes:
-
https://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.ht…
By default they do it to 16 also for 32b CPUs, the overhead at startup
with default config was rather insignificant (…
[View More]like 5000 bytes for
private memory set to 8MB), so I didn't want to bother that much (that's
also because some 32b CPUs could require larger alignment that the size
of the pointer address), but for flexibility I added the an option to
set the alignment size at compile time with KSR_MEMORY_ALIGN define
(e.g., -DKSR_MEMORY_ALIGN=8UL).
The main benefit at this moment is that Kamailio should be able to use
the OS distribution (e.g., Debian) packaged libwolfssl instead of
bundling and building the library inside it to compile with custom
flags, like it is done now. Also, it is safe for the future to use other
libraries that leverage internally the OS memory alignment size for
specific optimizations.
I also increased the optimize factor to 15, which should speed up a bit
dealing with larger chunks of memory (now up to 32KB, previously was up
to 16KB). Considering that it is more and more common to deal with
larger SIP messages (e.g., a webrtc invite can easily be like 20KB) as
well as tls/encryption needs addition space that the unencrypted udp/tcp.
Hopefully these updates don't have side effects, it was nothing
consistent changed, a few defines and fields to match the new alignment
constraints. But testing is important, try to play with the master and
your configs whenever you have any chance.
Unfortunately the tlsf memory manager seems to be specifically designed
for aligning to 8 bytes, a rather old related issue in that project is
not concluded:
- https://github.com/mattconte/tlsf/issues/16
That means the tls_wolfssl module linked with the officially packaged
libwolfssl has to be used with qm or fm malloc from now on. Or it has to
be built like so far to use tlsf memory manager. The tls/tlsa module can
still be used with tlsf memory manager.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
[View Less]
Hello,
during the Kamailio Developers Meeting 2023 in Dusseldorf early this
week, Victor Seva shared how one can setup own development environment
for facilitating the automatic checks for clang-format and few other
useful bits (e.g., training white spaces) using pre-commit tool. So I
thought it would be useful to shared further to both developers and
users communities (as the later can make patches and pull requests as well).
If I forgot something, Victor should amend me, but the main steps …
[View More]are:
- install pre-commit package (either via apt or via pip3)
- install clang-format (debian/ubuntu should have it as a package)
- go to the folder with git clone of Kamailio source and run:
pre-commit install
The above command can take some time, but it is needed only once.
After that, on evey commit, the checks should be performed a summary
should be presented on screen, like:
$ git commit src/
check yaml...........................................(no files to
check)Skipped
check xml............................................(no files to
check)Skipped
fix end of
files.........................................................Passed
trim trailing
whitespace.................................................Passed
check for merge
conflicts................................................Passed
mixed line
ending........................................................Passed
clang-format.............................................................Passed
If the check of clang-format results in "Failed", like:
clang-format.............................................................Failed
the pre-commit hooks will correct it, so you can just run again the
commit command and the 2nd time should be good to go.
If for whatsoever reasons pre-commit is installed but you need to
ignore/skip the pre-commit hooks, just provide -n or --no-verify to the
commit command, like:
$ git commit -n src/
By using pre-commit hooks, one could easily avoid making pull requests
that are failing to meet the code formatting checks on github portal as
well as ensure that as developer one does no forget to run clang-format
before commit.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
[View Less]