Hello All
Good Day
Here I am trying to achieve something like this
WSS to UDP Ext registartion which works well using
https://github.com/havfo/WEBRTC-to-SIP/tree/master/etc
Note here i am forwarding the registartion to asterisk pbx server and
define WSS of kamailio
Now for calls
- Webrtc - SIP calls works
- SIP - Webrtc calls not working
Here I am getting the request of the call on kamailio but kamailio send 404
not found to Asterisk PBX
Webrtc - Webrtc calls not working
Can anyone guide me on what I am doing wrong?
Thanks
Vishal P
Hello,
I'd like to know if there is a way, from Kamailio side, take the
refer-to header Kamailio receive in a REFER request and create a new
INVITE whit this data; then bridge the call between the originating user
and the new destination user.
Thank you
Regards
--
---
I'm SoCIaL, MayBe
Hello Daniel,
Thanks for the reply.
The extra dictionary is already included otherwise an error is thrown and Kamailio doesn't start.
However, i realized my mistake now and you were right. I was checking for the extra attributes in a tcpdump and on radius server and i didn't had the dictionary configured on both of them. The extra attributes are in the packet but weren't being listed.
One more question. Kamailio doesn't have a way to do a totally custom RADIUS access-request packet right?
(Sorry if this opens another thread. I usually just hit reply on the mailing list and let Outlook create the e-mail, but it usually creates another thread and i'm not sure why).
Thanks again.
Cheers,
Duarte
Hello Daniel,
Thanks for the reply.
The extra dictionary is already included otherwise an error is thrown and Kamailio doesn't start.
However, i realized my mistake now and you were right. I was checking for the extra attributes in a tcpdump and on radius server and i didn't had the dictionary configured on both of them. The extra attributes are in the packet but weren't being listed.
One more question. Kamailio doesn't have a way to do a totally custom RADIUS access-request packet right?
(Sorry if this opens another thread. I usually just hit reply on the mailing list and let Outlook create the e-mail, but it usually creates another thread and i'm not sure why).
Thanks again.
Cheers,
Duarte
Hello,
in RFC 3261 (sec. 8.1.1.6) it states about the Max-Forwards header field:
> A UAC MUST insert a Max-Forwards header field into each request it originates with a value that SHOULD be 70.
>
> Source: https://datatracker.ietf.org/doc/html/rfc3261#section-8.1.1.6
When Kamailio sends its OPTIONS keep-alive requests (from the nathelper
module I believe), Max-Forwards is missing:
> OPTIONS sip:alice@example.com:61266 SIP/2.0
> Via: SIP/2.0/UDP aa.bb.cc.dd:5060;branch=z9hG4bK5124450
> From: sip:pinger@sip.example.com;tag=uloc-6550aa14-7456-2461-6390f173-5fdb4667
> To: sip:alice@example.com:61266
> Call-ID: aba25282-2ca72be1-9d1fd53(a)aa.bb.cc.dd
> CSeq: 1 OPTIONS
> Content-Length: 0
The user agent library I'm using (libre from baresip) rejects these
requests with a "400 Bad Request" response, I looked at the sources and
it denies these requests because of the missing Max-Forwards header.
Of course this suffices for the keep-alive logic because all that's
needed is any traffic in both directions to keep both (potential) NATs
open. However you might agree that it does look a bit confusing at
first, and the RFC is clear about that.
So it's not a bug, but is this behavior intended?
Thanks, also thanks for all the great work that has been put into Kamailio.
Christian
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 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
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 can be made by users without git access.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
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 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
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 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
______________________________________________________
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;
$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
______________________________________________________
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 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
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>
[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
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 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
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 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
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-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
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 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,
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 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
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
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
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 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
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 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
______________________________________________________
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.
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?
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 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
______________________________________________________
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 possible?
Best regards
Bernd
|
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:
[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
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 (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
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 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
I'm encountering an issue with dialog handling in Kamailio. Initially, everything functions correctly, and if a connection terminates within two minutes, the BYE method works as expected. However, if the call exceeds two minutes, the BYE method doesn't seem to be recognized, and there are no related entries in the logs.
As someone new to working with Kamailio, I'm finding this quite perplexing. Could anyone offer guidance or troubleshooting steps to resolve this issue?
Thank you for your assistance.
Hello,
We have a Kamailio configuration with the following, however all the load
is going to the server at 22.22.22.22 (hiding the real IP obviously)
instead of being shared evenly between 22.22.22.22 and 33.33.33.33. Can
anyone please tell me why? The rtpengine server at 11.11.11.11 is intended
to only receive calls if the other two are offline. Thank you very much.
#!define RTPENGINE_ADDR "udp:11.11.11.11:7724=1 udp:22.22.22.22:7724=99999999
udp:33.33.33.33:7724=99999999"
modparam( "rtpengine", "rtpengine_sock", RTPENGINE_ADDR )
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
Hello all,
I have redis database where the data is inserted in JSON format:
#Redis Command
JSON.GET Index1J:12345678
#Redis Result
[
{
"SupplierID": "7",
"BCode": "987654",
"Rate": 0.159
},
{
"SupplierID": "7",
"BCode": "765432",
"Rate": 0.159
},
{
"SupplierID": "7",
"BCode": "5432159",
"Rate": 0.159
}
]
When I try to get the result using Lua script in Kamailio like the following:
#kamailio command
if KSR.ndb_redis.redis_cmd("srvN", "JSON.GET pricelistJ:441246890", "ra") then
KSR.xlog.xinfo("array size: $redis(ra=>size)\n");
KSR.xlog.xinfo("Redis Response: " .. tostring(ra) .. "\n")
KSR.xlog.xinfo("first values: $redis(ra=>value[0]) , $redis(ra=>value[1])\n");
end
Nov 7 07:58:15 868d08ee318d /usr/sbin/kamailio[72]: INFO: LUA {INVITE}: <script>: array size: <null>
Nov 7 07:58:15 868d08ee318d /usr/sbin/kamailio[72]: INFO: LUA {INVITE}: <script>: Redis Response: nil
Nov 7 07:58:15 868d08ee318d /usr/sbin/kamailio[72]: INFO: LUA {INVITE}: <script>: first values: <null> , <null>
I'm getting null results.
I don't know what I'm doing wrong here. Can you please assist?
Hello all,
I have a scenario on wich requires sequential fork (up to 30 possible destinations) with different
Call-ID for each leg. I am using topoh module enabled, but it always puts the same Call-ID.
Someone have a solution for this scenario?
Regards
Hello, I encountered such a problem:
An INVITE request comes to Kamailio.
Kamailio finds a location and forwards this INVITE to a device.
The device receives a push notification and registers on a new IP: port.
The tsilo module creates a new branch.
And this branch sends the INVITE.
The device responds with 100 -> 180 -> 302.
100 and 180 are forwarded to the calling subscriber, but anything greater
than 300, such as 302, is not forwarded.
DEBUG: tm [t_reply.c:1363]: t_should_relay_response(): ->>>>>>>>>
T_code=180, new_code=302
DEBUG: tm [t_reply.c:1448]: t_should_relay_response(): store - other
branches still active
DEBUG: tm [t_reply.c:1925]: relay_reply(): reply status=3 branch=1, save=1,
relay=-1 icode=0 msg status=302
Kamailio saves this code and does not pass it to the caller. Is there a way
to immediately pass this 302? It seems like something can be done in
t_on_branch_failure, which is invoked, but I can't figure out what needs to
be done there.
Is there a parameter that can solve my problem?
A similar question has been asked before, but the link in Daniel's response
leads to a non-existent ID:
https://lists.kamailio.org/pipermail/sr-users/2009-March/022447.html
In the config file:
#!define KEYVALUE "key=s:value"
modparam("pv", "varset", KEYVALUE)
works. But if I try to use defexp or defexps the ID KEYVALUE
is not set as expected and the parser complains.
## this doesn't parse
#!defexp KEYVALUE2 "key=s:value"
#!defexps KEYVALUE3 "key=s:value"
# both these lead to syntax error
modparam("pv", "varset", KEYVALUE2)
modparam("pv", "varset", KEYVALUE3)
Any ideas why defexp doesn't behave the same way here?
Shih-Ping
Hello all,
I'm using Kamailio as SIP proxy between session manager and SBC.
I came across an issue in BYE request where the SBC sent in the header list of Routes where first route is Kamailio IP, and the second is SM IP, in addition to other routes (last route is the caller party)
What Kamailio did is to route the BYE to the address set in the Request-URI, which is the caller party.
What should be done instead is that Kamailio should remove the Route header including its own IP, and route the BYE to the next hop which is in this case the SM IP.
How to accomplish that?
Following is the Route header in the BYE request coming from SBC:
[truncated]Route: <sip:KAMAILIO_IP;lr;ftag=xxxxxxxxxxxxxxxxxxxxxxx>,<sip:SM1@SM_IP;transport=udp;lr;av-asset-uid=xxxxxxxxxx>,<sip:127.0.0.2:15060;transport=udp;ibmsid=local.xxxxxxxxxxxx_xxxxxxxxx_xxxxxxxxx;lr;ibmdrr>,sips:127.0.0.2:15061;ibmsid=local.xxxxxxxxxx_xxxxxxxxxx_xxxxxxxx;lr;ibmdrr, sip:SM1@SM_IP;transport=tls;lr;av-asset-uid=xxxxxx, sip:CALLER_PARTY_IP:5061;transport=tls;lr
Regards,
Hi,
I was able to test the PLMN 00101 for VoLTE, but unable to test it with other PLMNs. I am specifically looking to have a successful test with PLMN31501. VoLTE is not enabling once I configure it.
I followed this https://open5gs.org/open5gs/docs/tutorial/02-VoLTE-setup/
Any one has experience for PLMN 315?
Hi,
I have a scenario where I have an edge proxy (named RS), which locally stores registrations from Endpoints in its USRLOC, but which then also forward's REGISTER requests on to another proxy (named CN), which stores registrations in its USRLOC. (which then does DMQ with another CN like it).
Both RS and CN are storing Path information, for example:
kamctl ul show displays on both RS and CN:
"Path": "sip:vs-rs01.blah.foo.bar;lr;received=sip:3.4.5.6:33577",
So I know the path info is in there.
I want CN , when presented with an INVITE, to reply with a 302 Redirect.
Right now I have this:
if (!lookup("location",sip:$tU@nodomain)) {
}
reg_fetch_contacts("location", "$tu", "called");
xlog("location info $ulc(called=>path)");
sl_send_reply("302","Redirect");
and the xlog does display the path. Good, so I have it being sent all the way through RS and CN and into CN’s USRLOC.
but this isn’t complete.
I am now faced with two issues.
One, I need to mangle the Path into a Contact header for the Redirect.
Two, I need to delete the Contact header that sl_send_reply is putting on there, which is the Contact as RS sees it from the endpoint. This needs to be removed and replaced with a Contact of only the RS server.
It feels like there ought to be a simpler way to do this than parsing the Path string and reassembling a Contact from it, but if there is it's not readily apparent. Both Google and chatgpt have failed me :)
Thanks in advance,
Jawaid
Hi Gang
I just updated our dev plattform from 5.6 to 5.7
5.5 was working fine with TLS under Ubuntu Focal.
5.6 under Jammy started to dump cores.
5.7 still shows the same behaviour, usually shortly after a restart.
Oct 20 09:45:01 dev-cpereg01 kamailio[11925]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f1bb0dd4bd8), called from tls: tls_init.c: ser_free(405), first free tls: tls_init.c: ser_free(405) - ignoring
Oct 20 09:45:11 dev-cpereg01 kamailio[11905]: ALERT: <core> [main.c:776]: handle_sigs(): child process 11924 exited by a signal 11
Oct 20 09:45:11 dev-cpereg01 kamailio[11905]: ALERT: <core> [main.c:779]: handle_sigs(): core was generated
Could anyone point me the correct direction on how to fix this issue?
Am I the only one seeing this issue?
--
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
______________________________________________________
Hi All,
I started a discussion on the matrix channel about some 404 RPM repos
and wanted to bring it here to further discuss.
We typically configure our various RPM-based package managers to allow
patch updates from the repos.
As an example, if trying to install 5.7.x, can be done as follows:
|yum -y install yum-utils yum-config-manager --add-repo
https://rpm.kamailio.org/centos/kamailio.repo yum-config-manager
--disable \* yum-config-manager --enable kamailio-5.7 yum install kamailio |
This will fail though because
https://rpm.kamailio.org/centos/7/5.7/5.7/x86_64/ does not exist.
Throughout the repos for centos/rhel/fedora I found the existence of
packages is inconsistent.
We can tell the intention was to allow the above behavior as the
kamailio.repo comes with the above configuration.
The above example will update /etc/yum.repos.d/kamailio.repo as follows:
|[kamailio-5.7] name=Kamailio - 5.7 - Packages for the latest Kamailio
5.7 release
baseurl=https://rpm.kamailio.org/centos/$releasever/5.7/5.7/$basearch/
enabled=1 metadata_expire=30d repo_gpgcheck=0
gpgkey=https://rpm.kamailio.org/rpm-pub.key type=rpm
skip_if_unavailable=True |
That is for centos though, and I found that some of the other distros
have incomplete kamailio.repo files as well.
In example, the rhel kamailio.repo is missing separate entries for 5.7,
but it does exist in the centos version.
Looks like some small cleanup is in order to make the end user
experience more consistent.
I believe sergey was maintaining those repos last, please chime in here
if you can.
If needed I can pick up some of those responsibilities as well.
--
Regards,
*Tyler Moore* <https://devopsec.net/>
Full Stack Software Engineer
<http://www.google.com/search?q=full+stack+software+engineer+job+description>
Flyball Labs <http://goflyball.com/>
Office: 888-907-2085, ext: 34 <tel:8889072085;ext=34>
Cell: 248-909-2769 <tel:2489092769>
Email: tmoore(a)goflyball.com
FLYBALL TECHNICAL SOLUTIONS, LLC <http://flyballlabs.com/>
--
Tyler Moore
Regards,
*Tyler Moore* <https://devopsec.net/>
Full Stack Software Engineer
<http://www.google.com/search?q=full+stack+software+engineer+job+description>
Flyball Labs <http://goflyball.com/>
Office: 888-907-2085, ext: 34 <tel:8889072085;ext=34>
Cell: 248-909-2769 <tel:2489092769>
Email: tmoore(a)goflyball.com
FLYBALL TECHNICAL SOLUTIONS, LLC <http://flyballlabs.com/>
Hi All,
I started a discussion on the matrix channel about some 404 RPM repos
and wanted to bring it here to further discuss.
We typically configure our various RPM-based package managers to allow
patch updates from the repos.
As an example, if trying to install 5.7.x, can be done as follows:
yum -y install yum-utils
yum-config-manager --add-repo https://rpm.kamailio.org/centos/kamailio.repo
yum-config-manager --disable \*
yum-config-manager --enable kamailio-5.7
yum install kamailio
This will fail though because
https://rpm.kamailio.org/centos/7/5.7/5.7/x86_64/ does not exist.
Throughout the repos for centos/rhel/fedora I found the existence of
packages is inconsistent.
We can tell the intention was to allow the above behavior as the
kamailio.repo comes with the above configuration.
The above example will update /etc/yum.repos.d/kamailio.repo as follows:
[kamailio-5.7]
name=Kamailio - 5.7 - Packages for the latest Kamailio 5.7 release
baseurl=https://rpm.kamailio.org/centos/$releasever/5.7/5.7/$basearch/
enabled=1
metadata_expire=30d
repo_gpgcheck=0
gpgkey=https://rpm.kamailio.org/rpm-pub.key
type=rpm
skip_if_unavailable=True
That is for centos though, and I found that some of the other distros
have incomplete kamailio.repo files as well.
In example, the rhel kamailio.repo is missing separate entries for 5.7,
but it does exist in the centos version.
Looks like some small cleanup is in order to make the end user
experience more consistent.
I believe sergey was maintaining those repos last, please chime in here
if you can.
If needed I can pick up some of those responsibilities as well.
Regards,
Tyler Moore
Full Stack Software Engineer
Flyball Labs
Office: 888-907-2085, ext: 34
Cell: 248-909-2769
Email: tmoore(a)goflyball.com
Hi All,
We have recently encountered a challenging issue in our environment that I
wanted to bring to your attention. A few months ago, we performed updates
to our Docker and OpenSSL installations, upgrading OpenSSL to version
1.1.1u. Since then, we have been experiencing intermittent traffic blocking
(TLS and UDP both for around 10 minutes and getting recovered) on some of
our instances.
Prior to the OpenSSL upgrade, we had not observed any such issues. However,
the situation has become more complex due to a substantial increase in
traffic, with each instance now handling 4K-5K concurrent calls and a daily
total of approximately 200,000 calls per instance.
Our initial suspicion was related to a Docker iptable issue. To investigate
further, we conducted a GDB trace using "kamctl pstrap" and discovered
specific log entries indicating potential issues within the
"pthread_rwlock_wrlock" function. This has prompted us to explore whether
the problems are linked to the OpenSSL upgrade.
We are considering upgrading Kamailio to the latest version, although this
process typically requires a significant amount of time for proper planning
and testing. Given the high volume of calls we are currently handling, we
are also exploring the possibility of a temporary solution involving a
rollback of the OpenSSL version to see if it resolves the issue.
Curiously, during a recent load test using SIPP, which simulated 10,000
concurrent calls with a rate of 100 calls per second, we did not encounter
the same problem.
any hints or insights you may have that could help us pinpoint the root
cause of the problem .
We do have a complete GDB trace available, but its size necessitates
sharing a truncated version for now.
version: kamailio 5.4.3 (x86_64/linux) 0178a5
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, 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: 0178a5
compiled on 12:36:56 Oct 22 2023 with gcc 4.8.5
Operating System Host :
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Rocky
Description: Rocky Linux release 8.8 (Green Obsidian)
Release: 8.8
Codename: GreenObsidian
container os (Centos7)
Kamctl pstraip output (truncated to last few lines)
---start 154 -----------------------------------------------------
kamailio: No such file or directory.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007fbf6f38a0c3 in __epoll_wait_nocancel () from /lib64/libc.so.6
$1 = 82
$2 = {pid = 154, unix_sock = 182, idx = 27, status = 1, rank = 48, desc =
"tcp receiver (tcp:xxx.xxx.xxx.xx:5060 <http://223.62.234.57:5060/>)
child=27", '\000' <repeats 81 times>}
#0 0x00007fbf6f38a0c3 in __epoll_wait_nocancel () from /lib64/libc.so.6
No symbol table info available.
#1 0x0000000000684858 in io_wait_loop_epoll (h=0xb41720 <io_w>, t=2,
repeat=0) at core/io_wait.h:1039
n = 84
r = 0
fm = 0x2
revents = 8201656
__FUNCTION__ = "io_wait_loop_epoll"
#2 0x0000000000699e7a in tcp_receive_loop (unix_sock=186) at
core/tcp_read.c:1997
__FUNCTION__ = "tcp_receive_loop"
#3 0x00000000005279e7 in tcp_init_children () at core/tcp_main.c:5134
r = 27
i = -1
reader_fd_1 = 186
pid = 0
si_desc = "tcp receiver (tcp:xxx.xx.xxx.xxx:5060
<http://223.62.234.57:5060/>
)\000\000\000\355\217c\000\000\000\000\000\240\213{\001\001\000\000\000\017\000\000\000\000\000\000\000\250\a2o\276\177\000\000\200\b\231o\000\000\000\000\260\006\346\261\376\177\000\000\230\210w\000\000\000\000\000=\000\000\000>\000\000\000\270\016z\350\274\177\000\000\060;8o\002\000\000\000P\224\346\352\001\000\000"
si = 0x0
__FUNCTION__ = "tcp_init_children"
#4 0x000000000042ae66 in main_loop () at main.c:1771
i = 16
pid = 94
si = 0x0
si_desc = "udp receiver child=15
sock=xxxx.xxx.xxx.xx:5060\000\000\000\v\235\200", '\000' <repeats 13
times>,
"P\r\346\261\376\177\000\000\270%}\000\000\000\000\000T\000\000\000\000\000\000\000\060;8o\277\177\000\000\343\207\201\000\000\000\000\000\277;8o\277\177\000\000
\271A\000\000\000\000\000@\374Ko\276\177\000"
nrprocs = 16
woneinit = 1
__FUNCTION__ = "main_loop"
#5 0x0000000000433ad6 in main (argc=9, argv=0x7ffeb1e60e38) at main.c:2856
cfg_stream = 0x16c9010
c = -1
r = 0
tmp = 0x7ffeb1e61f0c ""
tmp_len = 2496
port = 2496
proto = 1472
ahost = 0x0
aport = 0
options = 0x7d5238
":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 2208520674
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x7fbf6f40f3a0 <intel_02_known>
p = 0xf0b5ff <Address 0xf0b5ff out of bounds>
st = {st_dev = 76, st_ino = 120506675, st_nlink = 2, st_mode =
16877, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 40,
st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1698340416, tv_nsec =
618631009}, st_mtim = {tv_sec = 1698340416, tv_nsec = 618631009}, st_ctim =
{tv_sec = 1698340416, tv_nsec = 618631009}, __unused = {0, 0, 0}}
tbuf = '\000' <repeats 376 times>...
option_index = 0
long_options = {{name = 0x7d742f "help", has_arg = 0, flag = 0x0,
val = 104}, {name = 0x7d2a34 "version", has_arg = 0, flag = 0x0, val =
118}, {name = 0x7d7434 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name
= 0x7d743a "subst", has_arg = 1, flag = 0x0, val = 1025}, {name = 0x7d7440
"substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x7d7449
"substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x7d7453
"server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x7d745d
"loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x7d7468
"modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x7d7471
"log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x7d747c
"debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x0, has_arg = 0,
flag = 0x0, val = 0}}
__FUNCTION__ = "main"
[Inferior 1 (process 154) detached]
---end 154 -------------------------------------------------------
---start 155 -----------------------------------------------------
kamailio: No such file or directory.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007fbe6e5bd39e in pthread_rwlock_wrlock () from /lib64/libpthread.so.0
$1 = 83
$2 = {pid = 155, unix_sock = -1, idx = -1, status = 1, rank = -4, desc =
"tcp main process", '\000' <repeats 111 times>}
#0 0x00007fbe6e5bd39e in pthread_rwlock_wrlock () from
/lib64/libpthread.so.0
No symbol table info available.
#1 0x00007fbe68b745c9 in CRYPTO_THREAD_write_lock () from
/lib64/libcrypto.so.1.1
No symbol table info available.
#2 0x00007fbe68afe07e in CRYPTO_free_ex_data () from
/lib64/libcrypto.so.1.1
No symbol table info available.
#3 0x00007fbe68ea52c2 in SSL_free () from /lib64/libssl.so.1.1
No symbol table info available.
#4 0x00007fbe69149480 in tls_h_tcpconn_clean_f (c=0x7fbceeae00d0) at
tls_server.c:655
extra = 0x7fbceec3b898
__FUNCTION__ = "tls_h_tcpconn_clean_f"
#5 0x00000000004fbf2d in _tcpconn_free (c=0x7fbceeae00d0) at
core/tcp_main.c:1529
__FUNCTION__ = "_tcpconn_free"
#6 0x0000000000510912 in tcpconn_put_destroy (tcpconn=0x7fbceeae00d0) at
core/tcp_main.c:3284
__FUNCTION__ = "tcpconn_put_destroy"
#7 0x00000000005156a5 in handle_tcp_child (tcp_c=0x7fbe6f813440, fd_i=-1)
at core/tcp_main.c:3723
tcpconn = 0x7fbceeae00d0
response = {140449434960080, -2}
cmd = -2
bytes = 16
n = 1865551792
t = 887186228
crt_timeout = 410
con_lifetime = 57680
__FUNCTION__ = "handle_tcp_child"
#8 0x00000000005208ed in handle_io (fm=0x7fbe6f9d7c78, ev=1, idx=-1) at
core/tcp_main.c:4542
ret = 1
__FUNCTION__ = "handle_io"
#9 0x00000000004e93ed in io_wait_loop_epoll (h=0xad5740 <io_h>, t=5,
repeat=0) at core/io_wait.h:1070
n = 1
r = 0
fm = 0x7fbe6f9d7c78
revents = 1
__FUNCTION__ = "io_wait_loop_epoll"
#10 0x0000000000523c99 in tcp_main_loop () at core/tcp_main.c:4827
si = 0x0
r = 28
__FUNCTION__ = "tcp_main_loop"
#11 0x000000000042b1be in main_loop () at main.c:1779
i = 16
pid = 0
si = 0x0
si_desc = "udp receiver child=15 sock=xxx.xx.xxx.xxx:5060
<http://223.62.234.76:5060/>\000\000\000\v\235\200", '\000' <repeats 13
times>,
"P\r\346\261\376\177\000\000\270%}\000\000\000\000\000T\000\000\000\000\000\000\000\060;8o\277\177\000\000\343\207\201\000\000\000\000\000\277;8o\277\177\000\000
\271A\000\000\000\000\000@\374Ko\276\177\000"
nrprocs = 16
woneinit = 1
__FUNCTION__ = "main_loop"
#12 0x0000000000433ad6 in main (argc=9, argv=0x7ffeb1e60e38) at main.c:2856
cfg_stream = 0x16c9010
c = -1
r = 0
tmp = 0x7ffeb1e61f0c ""
tmp_len = 2496
port = 2496
proto = 1472
ahost = 0x0
aport = 0
options = 0x7d5238
":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 2208520674
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x7fbf6f40f3a0 <intel_02_known>
p = 0xf0b5ff <Address 0xf0b5ff out of bounds>
st = {st_dev = 76, st_ino = 120506675, st_nlink = 2, st_mode =
16877, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 40,
st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1698340416, tv_nsec =
618631009}, st_mtim = {tv_sec = 1698340416, tv_nsec = 618631009}, st_ctim =
{tv_sec = 1698340416, tv_nsec = 618631009}, __unused = {0, 0, 0}}
tbuf = '\000' <repeats 376 times>...
option_index = 0
long_options = {{name = 0x7d742f "help", has_arg = 0, flag = 0x0,
val = 104}, {name = 0x7d2a34 "version", has_arg = 0, flag = 0x0, val =
118}, {name = 0x7d7434 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name
= 0x7d743a "subst", has_arg = 1, flag = 0x0, val = 1025}, {name = 0x7d7440
"substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x7d7449
"substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x7d7453
"server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x7d745d
"loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x7d7468
"modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x7d7471
"log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x7d747c
"debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x0, has_arg = 0,
flag = 0x0, val = 0}}
__FUNCTION__ = "main"
[Inferior 1 (process 155) detached]
---end 155 -------------------------------------------------------
Thanks & Regards
Pintu Lohar
Hi,
We possess a code within Kamailio, which specifically handles malformed SIP
responses. Below is the code snippet:
*reply_routeCopy code if(!sanity_check("17604", "6")) { xlog("Malformed SIP
response from $si:$sp\n"); drop;*
Additionally, we have Kamailio drop request statistics as follows:
Command: *kamctl stats | grep core:drop_requests*
Output of the command: *core:drop_requests = 5*
My queries are:
1. Is the aforementioned "reply_route" related to the drop requests we are
experiencing?
2. If it is not related, what could be the cause of the drop requests?
Hello,
I am looking information about Kamailio operating as an SBC.
I saw this video of Kamailio World 2021: Kamailio As An SBC For Network Segregation:
https://www.youtube.com/watch?v=UW6l3R4OnsY&t=1381s
But where I can find more detailed technical information ?
Regards
Hi
Further trying to eliminate every possible cause of UDP drops...
We use Homer as HEP server in conjunction with the siptrace module.
So to prevent DQM traffic to be sent to Homer I added:
event_route[siptrace:msg] {
if(is_method("KDMQ")) {
drop();
}
}
And had a closer look to the traffic sent to homer.
I noticed, also xhttp:requests, as far as I see the replies, not the
requests, get mirrored to homer.
xhttp is not a sip method I could match I guess.
The event_route[siptrace:msg] docs state only method can be filtered.
So I can not filter requests on the separate http port I listen on for
xhttp json-rpc requests.
How can I prevent xhttp traffic to be mirrored to homer by the siptrace
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
______________________________________________________
Hello Kamailians!
As STIR/SHAKEN seems to cross the ocean and arrive on the European shores, I’m curious on how you’ve implemented it with Kamailio. I asked on our Matrix chat and got two responses that seems to not use the Kamailio STIR/SHAKEN support but rather a 3rd party service that they’ve integrated using restful APIs.
Please help me and share how you’re implementing STIR/SHAKEN with Kamailio.
I’m not shaken, nor stirred. yet.
Regards,
/O
Hi,
regarding ndb_redis,
I have 3 sentinels like this:
"192.168.88.155:26379"
"192.168.88.156:26379"
"192.168.88.157:26379"
So was thinking that I would configure ndb_redis this way:
modparam("ndb_redis", "server",
"name=srvZ;sentinel_group=myredis;sentinel_master=1;sentinel=
192.168.88.155:26379")
modparam("ndb_redis", "server",
"name=srvZ;sentinel_group=myredis;sentinel_master=0;sentinel=
192.168.88.156:26379")
modparam("ndb_redis", "server",
"name=srvZ;sentinel_group=myredis;sentinel_master=0;sentinel=
192.168.88.157:26379")
But the samples in the documentation show an extra sentinel key in the
config lines:
# sentinel (for a redis slave)
modparam("ndb_redis", "server",
"name=srvZ;sentinel_group=group_name;sentinel_master=0;sentinel=1.2.3.4:26379
;sentinel=1.2.3.5:26379")
# sentinel (for a redis master)
modparam("ndb_redis", "server",
"name=srvZ;sentinel_group=group_name;sentinel_master=1;sentinel=1.2.3.4:26379
;sentinel=1.2.3.5:26379")
So I am not sure if my configuration is correct.
Can someone clarify?
Hi,
I have an application as follows:
Multiple Kamailio Nodes
Shared Postgres database
Auth information will be stored in DB and accessed with Authdb.
Here is the behavior I seek:
I would like all the Kamailo nodes to cooperate in updating the database, each updating data as appropriate:
When a registration comes in to any Node, and it authenticated, create or update a database record in location table.
When a registration expires on that Node, delete database record in location table.
When INVITE comes in on any Node, ignore local cache and always lookup() record from database.
#1 and #2 are used so that a third SIP system can query the database and look up the Node a NAT’d subscriber is ‘connected’ to.
#3 is to let NON-NAT’d subscribers be contacted from any Node.
Now I have something close to this now – using following settings:
modparam("usrloc", "db_mode", 1) # immediately write registrations to the database.
modparam("usrloc", "db_timer_clean", 0) # do not expire DB records separately
modparam("usrloc", "db_check_update", 1)
This takes care of #1 and #2 above. However, #3 seems to still be relying purely on local cache and does not hit the database.
Is there a way to do #3? I can set db_mode to 3 but that would seem to have other effects besides merely making lookup() read from database.
Thanks in advance,
Jawaid