Hello,
the branch 5.7 has been created, to be used for releasing v5.7.x series.
To check out this branch, the following commands can be used:
git clone https://github.com/kamailio/kamailio kamailio-5.7
cd kamailio-5.7
git checkout -b 5.7 origin/5.7
Pushing commits in this branch:
git push origin 5.7:5.7
Note that 5.7 is an official stable branch, so only bug fixes, missing
kemi exports (discuss on sr-dev if not sure) or improvements to
documentation or helper tools can be pushed to this branch.
As usual, if there is a bug fixed, commit and push first to master
branch and then cherry pick to 5.7 branch:
git cherry-pick -x COMMITID
In few weeks, the first release from branch 5.7 will be out,
respectively Kamailio v5.7.0.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com
Hello
Is there a possibility to send a reply from within a branch route?
Experimental case (yes, I know it's a non working set-up, but I just
wonder if that would be possible).
Two registrar nodes, location information shared between the two.
CPE registers via TLS, therefore the existing connection shall be used
towards the CPE and that only exists on one of the registrars.
So in the Branch Route I would like to do something like:
$var(socket) = $(ulc(aor=>socket)[$T_branch_idx]);
if ($var(socket) == 0) {
send_reply("503","no local socket");
}
This would cause the core routing instance to select the next registrar
from the dispatcher list which hopefully holds the active socket.
But none of the 'send_reply' variants seem to be allowed within a
branch route.
Or is there a better solution?
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,
I am planning to split 5.7.x series on its own git branch 5.7 on
Thursday, May 4, 2023.
After that, master branch will be open for new features (to become part
of 5.8 or what ever version will be decided to be next). Usually testing
should continue for branch 5.7 for another 1-2 weeks, then, if no
relevant road blockers pop up, we should release 5.7.0 as first stable
version in the 5.7.x series.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com
Hi
5.6.4
I'm trying to add uacreg logic to my setup. When I add a new entry via rpc I
see that the reg is stored in mem but not inserted in the database for
persistency.
My uac params are like this:
modparam("uac", "reg_db_url",DBURL)
modparam("uac", "reg_timer_interval", 900)
modparam("uac", "reg_retry_interval", 10)
modparam("uac", "reg_random_delay", 0)
modparam("uac", "reg_hash_size", 12) ## 5.6
modparam("uac", "reg_db_table", "kam_uacreg")
modparam("uac", "reg_contact_addr", "192.168.255.254:5060") #Won't be used
#modparam("uac", "default_socket", "udp:192.168.0.125:5060") #Won't be used
modparam("uac", "reg_keep_callid", 1)
modparam("uac", "reg_active", 1)
modparam("uac", "reg_gc_interval", 30)
modparam("uac", "reg_use_domain", 0)
I'm used to add via rpc and have db persistency. Like for exmaple using the
domain module. Is this a bug in my config or does this module behave different?
Should I insert in the db and call to enable via RPC? If so, what would be the
best way to enable only the new inserted register instead of reloading all the
regs? It's expected to have many changes and do not want to have full reloads
all the time.
cheers,
Jon
--
PekePBX, the multitenant PBX solution
https://pekepbx.com
Hi all,
we are developing a softphone mobile application which registers to asterisk through kamailio. Kamailo proxies the request to asterisk and replies from asterisk to the clients.
Registration works fine with asterisk authentication. The problem appears in the following flow:
1. Mobile client A calls client B.
2. Asterisk gets INVITE through kamailo, sends back 401, and get INVITE with credentials.
3. Asterisk sends invite to client B towards kamailio.
4. Kamailio forwards INVITE if client is registered or sends a push notification to client B. When client B registers, kamailio continue the suspended transaction and forwards INVITE.
5. Client B gets INVITE, sends a SIP OK.
6. Asterisk gets SIP OK through kamailio and sends an ACK to client B, which is OK.
7. Asterisk sends the SIP OK to client A through kamailio.
8. Kamailio forwards SIP OK to client A but the contact address contains the asterisk IP instead kamailio.
9. Clilent A try to send ACK but it does not arrive to asterisk, and the call will be hungup after 30 secs.
So the question is what is missing, what is the correct solution? I try to use the provided configuration given in following link:
https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
The difference is that kamailio has no access to asterisk database.
Thanks for your help.
With kind regards,
Peter
Hello,
during past on-site/online devel meetings as well as on mailing lists or
tracker, there were various discussions around the idea or requests to
make new features available quicker to stable branches.
Of course, one can do local git cherry-picking, but I thought to bring
this in discussion and see if makes sense to get something more
coordinated between developers and community. Therefore I am
cross-posting to sr-dev and sr-users to see if there is interest for it
from both communities.
Somehow inspired from Debian, my first idea would be to create a
"x.y-backports" branch, where "x.y" is the branch for the stable release
series. For example, with 5.6 release series built from branch "5.6",
there could be "5.6-backports" branch which is kept in sync in "5.6" but
also can get "selected" new features from devel (master branch) backported.
The "selected" new features should be mostly a matter of the people
willing to put effort in backporting, but I would consider a list
recommendations not to end up with devel and backports branches being
more or less the same. For example, in the "no-backporting" list:
- no backporting of completely new modules
- no backporting of significant changes to the config file language
and native scripting interpreter
In the "ok-to-backport":
- updates to enable use with newer versions of external libraries
- changes to make some functions/modules to cope better with the core
infrastructure or end points
Commits to the backports branch can be proposed via pull requests.
The backports branch should be done only for latest stable version,
picking from the development version. Right now it would be 5.6, but we
can wait till 5.7 is released and then have it for it.
No packaging and no official releases should be made from backports
branch, only a git branch to be maintained as a community effort. Of
course, if someone wants to put more resources into it, we can discuss
about.
Anyhow, the first questions would be if such branch sounds good to have
and if there are people that think they can also contribute to maintain it.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com
Hi list,
Hope you are all well!
I'm using Kamailio version 5.6.4 (installed from the repo
rpm.kamailio.org/centos/7) and noticed that every route that uses "return
false" is exiting the script, instead of returning.... This was not the
case on version 5.4.6 as the same script is running fine.....
From this page
https://www.kamailio.org/wikidocs/tutorials/faq/main/#how-is-the-function-r…,
I would think that when a route returns false, it would return -1 and not
stop execution, since negative is equal to false, but it is actually
stopping (same as return 0)...
So, as an example, this test code doesn't work as expected. In case the
source is a public IP, the script doesn't print the "SRC public" it just
exits and then of course every other logic meant to be done is not
executed....
route[is_src_private]
{
if (is_ip_rfc1918("$si")) {
return true;
}
return false;
#return is_ip_rfc1918("$si"); *# this doesn't work too in case the
$si is a public IP*
}
request_route
{
...
if (route(is_src_private)) {
xlog("L_NOTICE", "SRC private\n");
} else {
xlog("L_NOTICE", "SRC public\n");
}
...
}
If is_src_private is changed to return -1 instead of false, then it all
works fine.
Also, I noticed that the following code will print "TEST: 0" in case the
$si is public and then stop execution. So looks like false is really being
converted to 0, but I guess that's unexpected... anyway apologies if I'm
missing something obvious....
route[is_src_private]
{
$var(t) = false;
if (is_ip_rfc1918("$si")) {
$var(t) = true;
}
xlog("L_ERR", "TEST: $var(t)\n");
return $var(t);
}
I could not find a recent ticket or email related to this situation and
I've already spent hours trying to understand what is the logic/problem
here, so would anyone have been across a similar case that could provide
some insight and clarify what is the expected behaviour of the *false*
usage (and boolean in general if possible)?
Thank you,
Kind regards,
Patrick Wakano
Hi Team
I think, I might have found something that was overseen in the
rtpengine module.
A (ipv6) <=> rtpengine <=> B (ipv4)
Invite+SDP from B to A
It looks like this works as expected. A SDP c= line is created
containing an ipv6 address.
Invite, no SDP from A to B
Reply with SDP offer from B to A
The information about A being reachable via ipv6 and therefore an ipv6
c= line being required, could be taken from the via header of the reply.
But am I right to fear, that the rtpengine module does not do this at
the moment?
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,
I moved the Kamailio database to RDS from a local instance and noticed that there were a large number of connections from the Kamailio user.
What is the normal number of connection that can be expected?
Thank you,
Hello,
in about 1 hour the kamailio.org server will be rebooted for some system
upgrades, it should be quickly back running, but if anyone accesses the
web/wiki or mailing lists archives exactly during that time, they might
not respond -- just wait for a minute and try again.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com
On Mon, May 07, 2018 at 04:44:14PM +0200, Daniel Tryba wrote:
> Sure. Attached. Problem appears to be that the topos query can't find
> callid-totag (from the response).
>
> I'll try the same scenario with the mysql backend to see if it behaves
> different.
Config works fine with mysql as topos backend. So the bug is restricted
to topos-redis.
Hi All,
Can someone point to a sample as to how we can *load the LCR Module tables*
namely the following at startup from a csv file or any other mechanism.
* lcr_gw_table
* lcr_rule_table
* lcr_rule_target_table
The idea is to not need to manually feed in the entries into the table but
instead add these in the beginning through either a *wrapper script
*OR *through
the kamailio cfg file* if possible.
Any pointers are much appreciated.
Thanks & Regards,
Harneet Singh
--
"Once you eliminate the impossible, whatever remains, no matter how
improbable, must be the truth" - Sir Arthur Conan Doyle
Hi Experts,
I believe the loose_route() in kamailio can be used for initial Out of the
dialog INVITE processing as well. Is that the correct understanding?
If so, the request will be forwarded ahead to the destination corresponding
to the Route Header remaining (if any) after Kamailio has stripped off it's
own Address(es) from the Route Header(s). Is that correct?
Regards,
Harneet Singh
--
"Once you eliminate the impossible, whatever remains, no matter how
improbable, must be the truth" - Sir Arthur Conan Doyle
Hello,
We have a transparent proxy in front of Asterisk boxes. The media is handled by rtpengine, and the "manage" work is done by Kamailio in the route[NATMANAGE] section like this:
if(nat_uac_test("8")) {
# Packet from backend server
if(ds_is_from_list()){
if (rtpengine_manage("replace-origin replace-session-connection direction=internal direction=pub")) {
xdbg("NATMANAGE --- Success rtpengine_manage() RTP from INTERNAL to EXTERNAL $ru");
}
}
else
{
if (rtpengine_manage("replace-origin replace-session-connection direction=pub direction=internal")) {
xdbg("NATMANAGE --- Success rtpengine_manage() RTP from EXTERNAL to INTERNAL $ru");
}
}
} else {
# Packet from backend server
if(ds_is_from_list()){
if (rtpengine_manage("replace-origin replace-session-connection trust-address direction=internal direction=pub")) {
xdbg("NATMANAGE --- Success rtpengine_manage() RTP from INTERNAL to EXTERNAL $ru");
}
}
else
{
if (rtpengine_manage("replace-origin replace-session-connection trust-address direction=pub direction=internal")) {
xdbg("NATMANAGE --- Success rtpengine_manage() RTP from EXTERNAL to INTERNAL $ru");
}
}
}
Everything is working fine, but with some clients (like Grandstream phone) the RTCP session wants to go tot he private address of the phone. Here is the log of one of these strange calls:
Apr 27 16:54:38 rtp1 rtpengine[2273]: INFO: [312ed76c31f21b71452e91e5184ad25b@172.16.2.210:5060]: [core] --------- Port 178.238.213.14:11088 <> 81.183.216.3:5068 , SSRC 77c19488, 625 p, 107500 b, 0 e, 29 ts
Apr 27 16:54:38 rtp1 rtpengine[2273]: INFO: [312ed76c31f21b71452e91e5184ad25b@172.16.2.210:5060]: [core] --------- Port 178.238.213.14:11089 <> 10.0.5.192:5069 (RTCP), SSRC 0, 0 p, 0 b, 0 e, 43 ts
As you can see the RTP itself is okay, but the RTCP will somehow go to the private address. If we tracing the sdp messages in sngrep, then we can see that Kamailio transforming IP addresses for the backend servers to the public (and the private address of the rtpengine) addresses.
We are missing something?
Thank you!
With kind regards,
Zoltan
Hi
Before I go too deep into try and error, I guess others have been there
too.
What are sensible value you use for the pike module to detect /
mitigate abusive behavior, especially dictionary attacks?
Are there better solutions that the pike 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
______________________________________________________
Hi Benoît
We use pike in combination with fail2ban.
Log a message -> create a fail2ban rule to block the ip for xxx time.
example:
if ($ua =~ "(friendly-scanner|sipvicious)") {
sl_send_reply("488", "Go away.");
xlog("L_INFO","$ci Blocking traffic from $si\n");
exit;
}
Cool thing is, you can write a log entry from every part in your
kamailio-config, and then fail2ban does the rest.
Regards
Stefan
Am 27.04.23 um 16:07 schrieb Benoit Panizzon:
> Hi
>
> Before I go too deep into try and error, I guess others have been there
> too.
>
> What are sensible value you use for the pike module to detect /
> mitigate abusive behavior, especially dictionary attacks?
>
> Are there better solutions that the pike module?
>
> Mit freundlichen Grüssen
>
> -Benoît Panizzon-
Dear all,
I am looking for some hooking mechanism for user defined routing blocks.
Is something like this already available?
1) a common part of the routing configuration shall not (or only slightly) be changed, after some hooks have been implemented
Something like a function "engage_hooks()" of some "hook_module"?
:
Routing config that should not be changed by application developers
engage_hooks(HOOK_TYPE);
Routing config that should not be changed by application developers
:
2) one application developer may "hook" new parts of the routing configuration into this, by
modparam("hook_module", "hook", "name=MY_RB;type=HOOK_TYPE;prio=50);
:
:
Route [MY_RB] {
Do something at hook HOOK_TYPE;
}
:
:
3) another application developer might want to "hook" into the same HOOK_TYPE with a higher priority
modparam("hook_module", "hook", "name=ANOTHER_RB;type=HOOK_TYPE;prio=20);
:
:
Route [ANOTHER_RB] {
Do another thing with higher priority at hook HOOK_TYPE
}
:
:
Kr,
Christoph
Hello All, new subscriber here.
I've been reading kamailio documentation to check if kamailio has a use case on the architecture for the solution for my company's software, here an small architecture diagram of our solution.
sipclient <----> [ Middleware ] <-----> SBC
Our middle ware is both a sip proxy and media proxy. we have a large number of sip clients but a small calling number,
our current bottleneck is that the middleware can't handle a high number of registration, i would like to deploy Kamailio as a load balancer for registrations, making sure it is statefull so registrations and calls are hashed into the same middleware server.
sipclients < ----> [ kamailio ] <------> [ middleware1, middleware2,...,middleware N] <-----> SBC
Any thoughts or pointers?
Hi all
I wonder, if there is a documentation on what action is performed by
rtpengine_manage() on which kind reply.
Am I right, that rtpengine_manage(), on any 4XX reply causes a delete?
So if there is a re-invite (for example to switch to T.38) and the
other party replies with 488 which in turn is passed through
rtpengine_manage() the existing RTP stream is deleted from rtpengine
instead of being left running with the previously agreed codec?
Has anyone already figured out a list of what reply codes should be
exempt from calling rtpengine_manage()?
--
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 Experts,
We have been using Kamailio as a sip proxy for a fair bit of time
now(version 5.3.2 though) and do understand the native routing mechanism
that can be instrumented through the kamailio cfg scripts.
We initially had only two sides, where the traffic could come from into
Kamailio and it just passed through to the other side(ie Traffic from A was
routed to B and that from B was routed to A). Off late, a few more sip
elements have been introduced in the deployment and now there is a need for
a more formal/robust mechanism to select the intended destination to
forward an initial SIP INVITE to.
I believe that we could still keep all the logic in the native kamailio
script and do the routing(for example, an incoming call where the *From URI*
contains *sip.elementA.com <http://sip.elementA.com>* should be routed to
destination *sip.elementB.com <http://sip.elementB.com>*, where as if the*
To URI *contains *sip.elementC.com <http://sip.elementC.com>*, the request
should be routed to *sip.elementC.com <http://sip.elementC.com>)**. *Since
we have many sip elements like A,B.C,D,E etc where the requests might have
to be routed to, based on certain different criteria, this logic would
become cumbersome. *What would be the best way to accommodate this?*
*Would it be possible to rewire this routing logic at runtime(*like in some
csv file that can be reloaded*) without a Kamailio restart? *
Regards,
Harneet Singh
--
"Once you eliminate the impossible, whatever remains, no matter how
improbable, must be the truth" - Sir Arthur Conan Doyle
Hi all,
We have a working Kamailio setup, lets call it a transparent proxy for Asterisk boxes. Its based on domain and dispatcher modules and everything is working as expected with the test clients (more or less microsip, softphone for ios, etc). We are tried to register with a Grandstream deskphone today, and we see that the phone sending sips:xxx in the Reg Contact field for example. Because the sips schema, the register is working, but we cannot initiate calls from this phone. If we are turning SIP scheme to sip from sips in the phone, then everything is working as expected.
I think we can transform those requests from sips to sip with Kamailio, but currently we dont know where can we start.
Has anybody a suggestion about this issue? I know that we can transform ruri, contact, etc with textops, nathelper and a lot of other modules, but what is the best for this sips->sip translation?
Thanks for your help.
With kind regards,
Zoltan
Hello,
I have 2 clients. 1 using websocket and 1 mobile using TLS.
Both can call each other perfectly. After 24-48 hours calls from mobile to
websocket failed with an error message: TCP/TLS connection (id: 0) for
WebSocket could not be found.
At the same time I can make calls from the websocket client to the mobile.
I know that the search of the connection is done by target address so I
printed the addresses + ports and they are matched to the ones that appear
on the ul.dump and ws.dump.
*kamcmd ul.dump output:*
Info: {
AoR: usrmt63ly_1040
HashID: 1830036546
Contacts: {
Contact: {
Address: sip:usrmt63ly_1040@example.com;transport=ws
Expires: 283
Q: -1
Call-ID: tvne1pskgkm2a01pnqm677
CSeq: 1060
User-Agent: JsSIP 3.9.0
Received: sip:*10.218.51.86:24061 <http://10.218.51.86:24061>*;transport=ws
Path: <sip:10.218.154.228:50443;transport=ws;received=sip:*10.218.51.86:24061
<http://10.218.51.86:24061>*;transport=ws;lr>
State: CS_NEW
Flags: 0
CFlags: 64
Socket: tls:10.218.154.228:50443
Methods: 7071
Ruid: uloc-61ebba84-64242101-89ba-1
Instance: <urn:uuid:7573726d-7436-116c-915f-313034304077>
Reg-Id: 1
Server-Id: 1642838660
Tcpconn-Id: 100420
Keepalive: 1
Last-Keepalive: 1680417282
KA-Roundtrip: 0
Last-Modified: 1680417282
}
}
}
*kamcmd ws.dump*
{
connections: {
100420: wss:*10.218.51.86:24061 <http://10.218.51.86:24061>* -> wss:
10.218.154.228:50443 (state: OPEN, last used 14s ago, sub-protocol: sip)
}
info: {
wscounter: 1
truncated: no
}
}
*Call from mobile (TLS) to websocket: Failed with error message: TCP/TLS
connection (id: 0) for WebSocket could not be found*
30(35263) INFO: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88}
<script>: request_route: method [INVITE] from [
sip:usrrcv4o4_1040@example.com] socket [sip:10.218.51.86:50909;transport=tls]
to [sip:usrmt63ly_1040@example.com]
30(35263) INFO: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88}
<script>: [RELAY]: method [INVITE] from [sip:usrrcv4o4_1040@example.com]
socket [sip:10.218.51.86:50909;transport=tls] to [
sip:usrmt63ly_1040@example.com] socket [sip:*10.218.51.86:24061
<http://10.218.51.86:24061>*;transport=ws]
30(35263) WARNING: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88}
<core> [core/msg_translator.c:2863]: *via_builder(): TCP/TLS connection
(id: 0) for WebSocket could not be found*
30(35263) ERROR: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88}
<core> [core/msg_translator.c:2040]: build_req_buf_from_sip_req(): could
not create Via header
30(35263) ERROR: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} tm
[t_fwd.c:479]: prepare_new_uac(): could not build request
30(35263) ERROR: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} tm
[t_fwd.c:1759]: t_forward_nonack(): failure to add branches
30(35263) ERROR: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} sl
[sl_funcs.c:418]: sl_reply_error(): stateless error reply used: No error
(2/SL)
30(35263) NOTICE: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} acc
[acc.c:287]: acc_log_request(): ACC: call missed:
timestamp=1680417920;method=INVITE;from_tag=e168ffa6-e577-48ec-b9c9-a73f5be318e8;to_tag=0c3e625e9f223a7ee2b093e8e31b2526-b7165bcb;call_id=4248c155-cd92-49b8-b68a-eef5f2cb3e88;code=500;reason=Server
Internal Error;src_user=usrrcv4o4_1040;src_domain=example.com
;src_ip=10.218.51.86;dst_ouser=usrmt63ly_1040;dst_user=usrmt63ly_1040;dst_domain=
example.com
*Call from websocket to mobile (TLS):*
38(35271) INFO: {1 7488 INVITE urcnete8r71dpkhmngd8} <script>:
request_route: method [INVITE] from [sip:usrmt63ly_1040@example.com] socket
[sip:*10.218.51.86:24061 <http://10.218.51.86:24061>*;transport=ws] to [
sip:usrrcv4o4_1040@example.com]
38(35271) INFO: {1 7488 INVITE urcnete8r71dpkhmngd8} <script>: [RELAY]:
method [INVITE] from [sip:usrmt63ly_1040@example.com] socket
[sip:*10.218.51.86:24061
<http://10.218.51.86:24061>*;transport=ws] to [
sip:usrrcv4o4_1040@example.com] socket [sip:10.218.51.86:20674
;transport=tls]
39(35272) INFO: {2 7488 INVITE urcnete8r71dpkhmngd8} <script>:
onreply_route[MANAGE_REPLY] method [INVITE] code [100] from [
sip:usrmt63ly_1040@example.com] to [sip:usrrcv4o4_1040@example.com]
39(35272) INFO: {2 7488 INVITE urcnete8r71dpkhmngd8} <script>:
onreply_route[MANAGE_REPLY] method [INVITE] code [200] from [
sip:usrmt63ly_1040@example.com] to [sip:usrrcv4o4_1040@example.com]
39(35272) NOTICE: {2 7488 INVITE urcnete8r71dpkhmngd8} acc [acc.c:287]:
acc_log_request(): ACC: transaction answered:
timestamp=1680417926;method=INVITE;from_tag=18q0p37nfo;to_tag=a88272a0-25ca-43c2-8ce9-8615831b7e9a;call_id=urcnete8r71dpkhmngd8;code=200;reason=OK;src_user=usrmt63ly_1040;src_domain=
example.com
;src_ip=10.218.51.86;dst_ouser=usrrcv4o4_1040;dst_user=usrrcv4o4_1040;dst_domain=10.218.51.86
38(35271) INFO: {1 7488 ACK urcnete8r71dpkhmngd8} <script>: request_route:
method [ACK] from [sip:usrmt63ly_1040@example.com] socket
[sip:*10.218.51.86:24061
<http://10.218.51.86:24061>*;transport=ws] to [
sip:usrrcv4o4_1040@example.com]
38(35271) INFO: {1 7488 ACK urcnete8r71dpkhmngd8} <script>: [RELAY]: method
[ACK] from [sip:usrmt63ly_1040@example.com] socket [sip:*10.218.51.86:24061
<http://10.218.51.86:24061>*;transport=ws] to [
sip:usrrcv4o4_1040@example.com] socket [sip:10.218.51.86:20674
;transport=tls]
*Version: kamailio 5.6.2 (x86_64/linux)*
What could be the reason for that?
Your help would be much appreciated.
Thanks,
Joey.
Hi alle
I think I have an issue with the dialogue and session timer module with
Kamailio 5.4
I sync the Session Expire Timer with the dialogue timeout via a common
AVP.
When I check a dialogue via kamcmd dlg.list
start_ts: 1682066352
init_ts: 1682066346
end_ts: 0
timeout: 1682066952
lifetime: 600
Timeout is increased on the first session refreshing re-invite, as
expected (in this case after 300 seconds). But it looks like the
dialogue just disappears (from kamcmd dlg.list, not from the backing
database) when the lifetime ist reached, leaving an orphan database
entry.
I would like to digg deeper into this. Is there a way to log more
details from the dialogue module like when it triggers dialogue expiry?
--
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Hello,
it is time to make the roadmap to the next major release series v5.7.x.
In my opinion, I would try to freeze the development during the first
part of April 2023, tentatively proposing April 14 as freezing date,
being like 4 weeks from now. Then testing phase and first release
(v5.7.0) sometime during May 2023. Alternative timelines can be
proposed, of course.
If anyone wants to add new features/modules, they have to be published
till freezing date, either pushed in the git repository or proposed as
pull request.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com
Kamailio Advanced Training - Online - March 27-30, 2023 - www.asipto.com
Hello,
I am proxying all RTP through RTPEngine. Everything works fine until about
5 seconds into the call, when rtpengine enters kernelization, after which
all RTP forwarding ceases. I've checked the required iptables entries, and
all looks good.
Here is a description of my environment:
# cat os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
# kamailio -v
version: kamailio 5.6.2 (x86_64/linux) 54a9c1
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_BLOCKLIST,
HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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: 54a9c1
compiled on 16:02:49 Dec 1 2022 with gcc 10.2.1
# rtpengine -v
Version: 11.1.1.3-1~bpo11+1
Michel Pelletier
Hi,
I was using the kamailio/kamailio docker repository in one of my projects,
and now the image is not available as the repo has been removed. Is the
"kamailio-ci" repo a replacement for it?
Thanks!
--
Manel Villar
Steegerstr. 59
13359 Berlin
Germany
Tel: (+49) (0)162 6574604
skype: manel.villar
manelvf(a)gmail.com
*"Ars longa, vita brevis"*
Hello,
the formal notification that the development for the next major version
5.7.0 is now frozen. The focus has to be on testing the master branch.
Also, the master branch should not get commits with new features till
the branch 5.7 is created, expected to happen in 2-4 weeks, a matter of
how testing goes on. Meanwhile, the commits with new features in the C
code can be pushed to personal branches, new pull requests can still be
done, but they will be merged after branching 5.7.
Can still be done commits with documentation improvements, enhancements
to related tools (e.g., kamctl, kamcmd), merging exiting pull requests
at this moment, exporting missing KEMI functions and completing the
functionality of the new modules added for 5.7.
Once the branch 5.7 is created, new features can be pushed again to
master branch as usual. From that moment, the v5.7.0 should be out very
soon, time used for further testing but also preparing the release of
packages.
If someone is not sure if a commit brings a new feature, just make a
pull request and it can be discussed there on github portal or via
sr-dev mailing list.
A summary of what is new in upcoming 5.7 is going to be built at:
* https://www.kamailio.org/wikidocs/features/new-in-5.7.x/
Upgrade guidelines will be collected at:
* https://www.kamailio.org/wikidocs/install/upgrade/5.6.x-to-5.7.0/
Everyone is more than welcome to contribute to the above wiki pages,
especially to the upgrade guidelines, to help everyone else during the
migration process from v5.6.x to 5.7.x.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Hello,
I am trying to implement RTPEngine failover, where if a selected RTPEngine node fails in the middle of the call (and not responding NG requests), I want to select an alternative node. However, when I call rtpengine_manage(), it does not seem to select an alternative node in case of a failure. To address this, I have attempted to check if $avp(RTP_INSTANCE) is null after calling rtpengine_manage(), and then use rtpengine_delete() to forget the selected RTPEngine node for the specific call, with the expectation that Kamailio would assign a new RTPEngine node for subsequent SIP message retries. However, it appears that rtpengine_delete() does not have the desired effect in this regard.
Here is an excerpt of my code for reference:
```
route[RTP] {
#!ifdef WITH_RTPENGINE
if (has_body("application/sdp")) {
if ($avp(x_source) == "INTERNAL") {
rtpengine_manage("replace-session-connection replace-origin direction=internal direction=external");
}
else if ($avp(x_source) == "EXTERNAL") {
rtpengine_manage("replace-session-connection replace-origin direction=external direction=internal");
}
if ($avp(RTP_INSTANCE) == $null) {
rtpengine_delete();
drop();
}
}
#!endif
}
```
Can you please advise on how I can achieve the desired failover behavior? Is there another function similar to `rtpengine_reset_call` that can make Kamailio forget the RTPEngine node for a specific call?
Thank you!
Hi,
I'd like to build an LCR solution that routes on both CLI & destination e.g.
CLI matches ^\+49*, destinations matches ^\+44* => route to gateway 5
for a large rule set (~ tens of thousands). Any recommendations for which modules to use? Can kamailio perform this particular task well or should I look at another solution? I'd be very grateful to hear about any experience of doing this. Many Thanks.
Regards,
John
Hello everyone,
I'm trying to connect Kamailio 5.5.5 to my PostgreSQL 14.
They are on two different servers.
I have created the Kamailio DB on the Postgre with the help of the command "kamdbctl create"
I'm able to connect to the database with no problem.
The problem is in the kamailio.cfg file, i have added this so far:
#!define WITH_PGSQL
#!ifdef WITH_PGSQL
#!define DBURL "postgres://USER:PASSWORD@IP:POPT/kamailio"
#!endif
#!ifdef WITH_PGSQL
loadmodule "db_postgres.so"
#!endif
modparam("db_postgres", "retries", 3)
modparam("db_postgres", "timeout", 10)
modparam("db_postgres", "tcp_keepalive", 600)
modparam("db_postgres", "lockset", 6)
modparam("db_postgres", "bytea_output_escape", 0)
But my kamailio doenst like this configuration, can someone help me find the problem?
Thank you in advance!
Best Regards!
Hello guys,
I can't find a simple way of changing the username and recalculate the has
in a REGISTER... do i have to use textops?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Hi
I still have odd behaviour with the SST module:
modparam("sst", "min_se", 300)
if (sstCheckMin("1")) {
xlog("L_ERR", "$cfg(route) Session Timer too small\n");
exit;
}
setflag(FLT_DLG); # set the dialog flag
setflag(FLT_SST); # Set the sst flag
if(is_present_hf("Session-Expires")) {
$avp(dlgtimeout) = $(hdr(Session-Expires){s.int});
}
On an INVITE containing those header:
Session-Expires: 3600;refresher=uac
Min-SE: 600
Supported: 100rel,timer
Expires: 330
Now Kamailio replies:
SIP/2.0 422 Session Timer Too Small
Min-SE: 300
What am I doing wrong?
--
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
______________________________________________________
Happy Eastern
Kamailio 5.4 used.
On dialogues calls, I noticed this happening on the second re-invite to refresh the session from the B side.
dlg_onroute(): unable to find dialog for INVITE with route param 'df9.da75' [2557:22445] and call-id '14148a68-f1b2-485d-b5a2-f9dd7773d2c0'
The did df9.da75 is identical to the one in the route-header on the first re-invite from the B side, before this one. No CDR was (yet) generated, and the dialogues is still present and on-going according to the database:
CallID [14148a68-f1b2-485d-b5a2-f9dd7773d2c0]
H-Entry: 2557 H-ID: 22445
But most probably not in memory as kamcmd dlg.stat_active shows zero (this is on a development node, so no other calls running).
There are no sip messages that end the call in between those two re-invites. I see no session timeouts or similar in the logs.
Any hint what could cause Kamailio not to find the corresponding dialogue on this re-invite?
--
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
Give it a try without modparams to see if it works, I have the same
config but without modparams and it runs without problems.
Else have a look into the kamailio logfile for errors.
Or check config with "kamailio -c"?
Regards
Stefan
Am 06.04.23 um 15:18 schrieb georgy.grigoryev(a)snapcom.fr:
> Hello everyone,
>
> I'm trying to connect Kamailio 5.5.5 to my PostgreSQL 14.
> They are on two different servers.
> I have created the Kamailio DB on the Postgre with the help of the
> command "kamdbctl create"
> I'm able to connect to the database with no problem.
> The problem is in the kamailio.cfg file, i have added this so far:
>
> #!define WITH_PGSQL
>
> #!ifdef WITH_PGSQL
> #!define DBURL "postgres://USER:PASSWORD@IP:POPT/kamailio"
> #!endif
>
> #!ifdef WITH_PGSQL
> loadmodule "db_postgres.so"
> #!endif
>
> modparam("db_postgres", "retries", 3)
> modparam("db_postgres", "timeout", 10)
> modparam("db_postgres", "tcp_keepalive", 600)
> modparam("db_postgres", "lockset", 6)
> modparam("db_postgres", "bytea_output_escape", 0)
>
> But my kamailio doenst like this configuration, can someone help me
> find the problem?
>
> Thank you in advance!
>
> Best Regards!
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only
> to the sender!
> Edit mailing list options or unsubscribe:
Hello all,
In my situation, it is possible to call forwarding to registered users
multiple times on same leg. For each forward i have to update To uri and
i am using uac_replace_to to do that.
But on second relaying, To uri was malformed. On below, Im attaching
configuration to illustrate my problem. (version-5.4.9)
First relay - /To: //sip:xyz@192.168.0.51/
Second relay - /To: sip:xyz@192.168.0.51sip:abc@192.168.0.51/
Thanks in advance.
Serdar
/loadmodule "uac.so"//
//modparam("uac","restore_mode","auto")//
//
//
//request_route {//
// ...//
// $avp(x) = "abc";//
// $avp(x) = "xyz";//
// $avp(myip) = "192.168.0.51";//
// $avp(i) = 0;//
// route(SERDAR);//
// ...//
//}//
//
//route[SERDAR] {//
// if ($(avp(x)[$avp(i)])!=$null) {//
// $avp(destination) = $(avp(x)[$avp(i)]);//
// $avp(i) = $avp(i) + 1;//
// $rU=$_s($avp(destination));//
//uac_replace_to("$_s(sip:$avp(destination)@$avp(myip))");//
// route(LOCATION);//
// } else {//
// send_reply("403", "Opps!");//
// exit;//
// }//
//}//
//
//route[LOCATION] {//
// $avp(oexten) = $rU;//
// if (!lookup("location") ) {//
// t_newtran();//
// switch ($var(rc)) {//
// case -1://
// case -3://
// send_reply("480", "Temporarily Unavailable");//
// exit;//
// case -2://
// send_reply("405", "Method Not Allowed");//
// exit;//
// }//
// }//
// t_on_failure("SERDAR_FAILURE");//
// if(!t_relay()) sl_reply_error();//
// exit;//
//}//
//
//failure_route[SERDAR_FAILURE] {//
// route(NATMANAGE);//
// if (t_is_canceled()) //exit;//
// route(SERDAR);//
//}/
Hello!
Is there any possibility to control more-or-less privacy related parameters
of pua_dialoginfo module (like include_localremote) per subscription?
Main idea is I want to show some users full info on the call other user is
making, for a different user - just show fact of the call without any
details.
For now I'm only seeing some manual manipulation over XML based on user who
is receiving NOTIFY, but maybe I'm trying to invent a weel here.
--
Best regards,
Ihor (Igor)
(please keep the list in the communication)
Hello,
you can find the modules for example in the Debian package service:
https://packages.debian.org/bullseye/amd64/kamailio-tls-modules/filelist
Crypto is in TLS module package.
Cheers,
Henning
From: Duarte Rocha <duarterocha91(a)gmail.com>
Sent: Donnerstag, 6. April 2023 15:42
To: Henning Westerholt <hw(a)gilawa.com>
Subject: Re: [SR-Users] Repository for modules
Thanks for the quick answer.
How can I see info regarding which modules are in the combined packages? One of the modules i'm looking into is the crypto module for example.
Otherwise, where can I get a list of modules not included in Debian packages?
Cheers,
Duarte
Henning Westerholt <hw(a)gilawa.com<mailto:hw@gilawa.com>> escreveu no dia quinta, 6/04/2023 à(s) 13:17:
Hello,
the majority of modules should be packaged for Debian. What modules are missing for you? Keep in mind that some modules are combined in some packages.
Some modules can not properly packaged due to missing dependencies, this needs to be installed from source, right.
Cheers,
Henning
From: Duarte Rocha <duarterocha91(a)gmail.com<mailto:duarterocha91@gmail.com>>
Sent: Donnerstag, 6. April 2023 13:55
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org<mailto:sr-users@lists.kamailio.org>>
Subject: [SR-Users] Repository for modules
Hello,
I'm currently testing Kamailio on a Debian 11 machine. In order to install it I used apt with repositories from Kamailio (https://deb.kamailio.org/).
Now I'm trying to add modules and I'm wondering the best way to do it. Using apt install i don't have access to all the modules. Is there another repository for this? Is my only solution downloading and compiling the modules?
Cheers
Hello,
I'm currently testing Kamailio on a Debian 11 machine. In order to install
it I used apt with repositories from Kamailio (https://deb.kamailio.org/).
Now I'm trying to add modules and I'm wondering the best way to do it.
Using apt install i don't have access to all the modules. Is there another
repository for this? Is my only solution downloading and compiling the
modules?
Cheers
Hi,
I had upgraded Kamailio from 5.4.7 to 5.5.5, Then I restarted the Kamailio
service.
After upgradation im getting the below error,
/usr/local/sbin/kamailio[21754]: ERROR: <core> [core/udp_server.c:596]:
udp_send(): sendto(sock, buf: 0x7f7502289200, len: 61012, 0, dst: (
10.122.45.189:5080), tolen: 16) - err: No buffer space available (105)
/usr/local/sbin/kamailio[21754]: ERROR: tm [../../core/forward.h:231]:
msg_send_buffer(): udp_send failed
/usr/local/sbin/kamailio[21754]: ERROR: tm [uac.c:678]:
send_prepared_request_impl(): Attempt to send to precreated request failed
ERROR: tm [../../core/forward.h:231]: msg_send_buffer(): udp_send failed
ERROR: tm [uac.c:678]: send_prepared_request_impl(): Attempt to send to
precreated request failed
Anyone have any idea on this errors.
Hi All,
We currently experience issues where scscf hangs randomly throughout the day. It started hanging once in a month, the issue has gotten worse over time and now it can hang more than 5 times in a day.
I have no prior kamailio experience or experience debugging c applications.
Kamailio version: 4.4.0
Running ps shows scscf processes are running.
Service status also shows scscf is running but it does not respond to sip requests.
Testing with sipsack hangs and print timeout errors.
root@NGVI-PCSCF2:/var/log # service scscf status
* Status of Kamailio SIP Server:
* scscf is running
sipsak -vv -s sip:NGVI-PCSCF2:6060
received ICMP message
received ICMP message** timeout after 500 ms**
Below is the extract from log files
Apr 5 12:04:46 NGVI-PCSCF2 /usr/sbin/kamailio[5102]: {1 1 ACK isbc505ramjjjr3g23cs02r53cms0uxbg2es(a)10.18.5.64} WARNING: tm [t_lookup.c:1476]: t_unref(): WARNING: script writer didn't release transaction
Apr 5 12:04:46 NGVI-PCSCF2 /usr/sbin/kamailio[5104]: {1 3 REGISTER _A9LGREyW2miE7LhPJzv7g..} ERROR: ims_registrar_scscf [save.c:1034]: update_contacts(): Unable to remove contact <sip:+2347020246874@154.66.2.182:5060;rinstance=28bf37d2cce6e4a1;transport=udp>
Apr 5 12:04:47 NGVI-PCSCF2 /usr/sbin/kamailio[5131]: ERROR: rr [rr_mod.c:300]: w_record_route(): Double attempt to record-route
Apr 5 12:04:47 NGVI-PCSCF2 /usr/sbin/kamailio[5144]: ERROR: rr [rr_mod.c:300]: w_record_route(): Double attempt to record-route
Apr 5 12:04:47 NGVI-PCSCF2 /usr/sbin/kamailio[5108]: {1 1 ACK r8ug398d118i8iaaunrouggisntkigkn(a)10.18.5.64} WARNING: tm [t_lookup.c:1476]: t_unref(): WARNING: script writer didn't release transaction
Apr 5 12:04:48 NGVI-PCSCF2 /usr/sbin/kamailio[5190]: CRITICAL: <core> [pass_fd.c:275]: receive_fd(): EOF on 23
Apr 5 12:04:48 NGVI-PCSCF2 /usr/sbin/kamailio[5062]: ALERT: <core> [main.c:741]: handle_sigs(): child process 5103 exited by a signal 11
Apr 5 12:04:48 NGVI-PCSCF2 /usr/sbin/kamailio[5062]: ALERT: <core> [main.c:744]: handle_sigs(): core was generated
Apr 5 12:06:12 NGVI-PCSCF2 kamailio: WARNING: <core> [daemonize.c:348]: daemonize(): pid file contains old pid, replacing pid
Apr 5 12:06:13 NGVI-PCSCF2 /usr/sbin/kamailio[15060]: WARNING: interconnectroute [ported_cache.c:113]: initPortedNumberCount(): Requested records[726049]: Total allocated[871258]: Fat 20% :Total MemUsed [26 MB divided between primary[0x7f22b8667d60] and secondary[0x7f22b93b3390]]
pr 5 04:38:24 NGVI-PCSCF2 /usr/sbin/kamailio[14018]: message repeated 107 times: [ ERROR: ims_usrloc_scscf [subscribe.c:430]: free_subscriber(): record not found in hash table]
Apr 5 12:50:38 NGVI-PCSCF2 /usr/sbin/kamailio[2604]: WARNING: interconnectroute [icncache_eventprocessor.c:76]: icnRefreshProcess(): total size 2147483648 qm_real_used 700707576 qm_used 387064680 1st_frag 0x7fd5f6d6a690 last_frag 0x7fd676d30fd0
Apr 5 13:00:25 NGVI-PCSCF2 /usr/sbin/kamailio[2437]: ERROR: ims_usrloc_scscf [subscribe.c:430]: free_subscriber(): record not found in hash table
Apr 5 13:00:26 NGVI-PCSCF2 /usr/sbin/kamailio[2437]: message repeated 125 times: [ ERROR: ims_usrloc_scscf [subscribe.c:430]: free_subscriber(): record not found in hash table]
Apr 5 13:01:25 NGVI-PCSCF2 /usr/sbin/kamailio[2437]: CRITICAL: <core> [main.c:650]: sig_alarm_abort(): shutdown timeout triggered, dying...
Apr 5 13:02:30 NGVI-PCSCF2 kamailio: WARNING: <core> [daemonize.c:348]: daemonize(): pid file contains old pid, replacing pid
Apr 5 13:02:30 NGVI-PCSCF2 /usr/sbin/kamailio[27629]: WARNING: interconnectroute [ported_cache.c:113]: initPortedNumberCount(): Requested records[726049]: Total allocated[871258]: Fat 20% :Total MemUsed [26 MB divided between primary[0x7f3093a3fd60] and secondary[0x7f309478b390]]
Thank you in advance.
Regards,
Solly Thoobe
Hello,
I'm running a Kamailio instance with some routing logic in it. When a UA sends an INVITE with urn:emergency:service:sos as RURI, Kamailio responds with a 400 Bad Request URI. I have set debug log level and it looks like the problem is in the parse_uri.c when sanity_check("1511", "7") is called:
parse_uri(): bad char ':' in state 3 parsed: <urn:emergency:service> (21) / <urn:emergency:service:sos> (25)
According to RFC8141 (https://www.rfc-editor.org/rfc/rfc8141), this is a correct URN, but maybe I'm missing something.
Is there a way to make Kamailio parse this RURI?
Kamailio version used: 5.6.4
Thank you!
Hello,
It's kamailio 5.6.4.
I can say that there is no segfault in case Identity is OK but bad attempts
sometimes are the reason for segfault. Not sure I can duplicate but it
happens several times per day.
Please look at logs.
in messages:
Apr 3 09:40:02 kam1 kernel: [6381565.762987] kamailio[9141]: segfault at
746c75616665 ip 00007f20c4cab6df sp 00007ffe7ec51470 error 4 in
libcrypto.so.1.1[7f20c4c3b000+19e000]
kamailio.log:
Apr 3 09:40:02 kam1 kamailio[9141]: NOTICE: <script>: it is INVITE with
Identity. Lets check Identity
Apr 3 09:40:02 kam1 kamailio[9141]: CRITICAL: <core>
[core/mem/q_malloc.c:501]: qm_free(): BUG: bad pointer 0x645f6d6574737973
(out of memory block!) called from tls: tls_init.c: ser_free(323) - ignoring
Apr 3 09:40:02 kam1 kamailio[9182]: CRITICAL: <core> [core/pass_fd.c:277]:
receive_fd(): EOF on 53
Apr 3 09:40:02 kam1 kamailio[9100]: ALERT: <core> [main.c:774]:
handle_sigs(): child process 9141 exited by a signal 11
Apr 3 09:40:02 kam1 kamailio[9100]: ALERT: <core> [main.c:777]:
handle_sigs(): core was not generated
Apr 3 09:40:02 kam1 kamailio[9100]: CRITICAL: <core>
[core/mem/q_malloc.c:501]: qm_free(): BUG: bad pointer 0x645f6d6574737973
(out of memory block!) called from tls: tls_init.c: ser_free(323) - ignoring
loadmodule "stirshaken.so"
####### STIRSHAKEN ######
modparam("stirshaken", "vs_verify_x509_cert_path", 1)
modparam("stirshaken", "vs_ca_dir", "/etc/kamailio/stir_CA")
#modparam("stirshaken", "vs_crl_dir", "/etc/kamailio/CRL")
modparam("stirshaken", "as_default_key",
"/etc/kamailio/key/private_key.pem")
modparam("stirshaken", "vs_cache_certificates", 1)
modparam("stirshaken", "vs_cache_dir", "/tmp/cert_cache")
modparam("stirshaken", "vs_cache_expire_s", 100)
if (is_method("INVITE") && is_present_hf("Identity")) {
xlog("L_NOTICE", "it is INVITE with Identity. Lets check
Identity\n");
if (1 == stirshaken_check_identity()) {
xlog("L_NOTICE", "Shaken Identity is OK\n");
} else {
xlog("L_NOTICE", "Shaken Identity is invalid\n");
}
}
Please give me some advice.
Hello all,
How can we handle stateless replies with kemi?
tm has the following param:
modparam("tm", "on_sl_reply", "stateless_replies")
What's the proper way to map the "stateless_reply" onreply_route to a
kemi function.
I'm playing with the app_jsdt module.
Thanks,
Ovidiu
Hi
Running Kamailio Registrar Node + rtpengine without dialog module, only
TRX module.
Situation: Some customer are in ranges to which RTP can directly be
routed, some are not.
So rtpengine shall be engaged only when backhauling of the rtp stream
is required.
On a message from a CPE, this is done by checking $si and on a message
to the CPE by checking $(ulc(aor=>addr)[$T_branch_idx]{uri.host});
On a BYE, rtpengine_delete() is called no matter if RTP was backhauled
or not. If rtpengine does not find the call to delete, no harm happens.
But now I struggle with Session Refresh Re-Invites TO the CPE as they
are routed very early on and do not pass the whole location lookup
stuff, therefore I have no access to the aor=>addr to determine if the
destination needs backhauling or not.
So the obvious solution which came to my mind is to call
rtpengine_query() and see if it is finding the call and if so, call
rtpengine_manage() to keep backhauling traffic on the Re-Invites
refrreshing the session.
Unfortunately, I found no way to check if rtpengine_query finds the
call. Did I miss something?
--
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
______________________________________________________
For immediate release:
ATLANTA, GA (1 April 2023)--The Federal Ministry for Economic Affairs and
Energy of Germany was forced to disclose today that it has been tasked with
assessing whether Germany will be able to operate its Kamailio through the next
winter.
This initiative comes amidst considerable uncertainty, shared in some other EU
member states, about whether the enormous fossil fuel energy footprint of
Kamailio is sustainable after the Russian invasion of Ukraine in early 2022.
Pioneering Atlanta energy market analysts Evariste Systems were tapped to
assist with forecasting whether German strategic natural gas reserves and
liquefied natural gas (LNG) imports could keep Kamailio's enormous turbines
spinning under a variety of stress-test scenarios outlined by regulators,
including SIPP and SIPVicious.
Alex Balashov, Evariste's principal, said in a news conference earlier this
week:
"Simply put, the political leadership wanted a dispassionate, technocratic kind
of analysis, data-driven and the rest, free of the inflection of ideological
bias and tendentious policy angles in charged German domestic
politics. Whether it's the centre-right or the Greens, there are strong ideas
about what to do with energy-greedy megaprojects like Kamailio."
Florida-based energy turnaround vet Fred Posner, parachuted in to assist with
the fast-tracked study, agreed:
"It's well-understood that the German GDP is almost a perfectly linear function
of gross annual SIP packets routed. The Nord Stream 1 shut-off situation in
September only exposed Germany to further Kamailio-related energy
vulnerabilities."
At issue are the basic physics of SIP message routing in Kamailio. Due to a
fixed-size worker process pool, Kamailio routing consumes about 1500 BTUs per
packet-kilometre travelled. While 1500 BTUs/packet-kilometre is efficient in
distance terms as compared to a typical automobile, which consumes roughly 3800
BTUs of fossil fuel energy per passenger-kilometre travelled (at typical load
factors), the dizzying number of SIP packets routed through German territory in
a typical business day greatly outstrips passenger-kilometres travelled.
Balashov noted that sometimes, the activation energy requirement can be higher
than 1500 BTUs when INVITEs with large SDPs are launched toward the next hop,
though this varies with the altitude of the destination above mean sea level,
wind direction, weather and other factors involved in ballistics.
"It's a bit of a fool's errand to play these guessing games with averages. The
energy budget can vary enormously depending on whether there is DTLS, video
codecs, PASSporTs and other stuff. I find it helpful to think in kilowatt-hour
terms: sometimes it's less than half a kWh, so like US $0.20 if you're counting
the beans, and sometimes it's more like $0.38, we just don't know. The
Bundestag always wants these big, round numbers, but if you've ever looked at
the TM module, you know that's not how this works."
A milder-than-expected winter, a 9% year-over-year increase in US LNG exports
(to about 300 million cubic metres per day) in 2022, dependable imports from
Norway and the Netherlands, and other favourable factors gave German SIP
regulators a reprieve. Despite energy market volatility, premium LNG spot
prices, and occasional 408 Request Timed Out scenarios, the country dodged a
widely-feared Kamailio energy crisis. However, it is difficult to say whether
energy market conditions will be as propitious next year.
"Then there's the whole climate change goals thing. Nobody even wants to talk
about that, especially for the WebRTC gateway side," says Posner.
"There's a persistent fantasy that we can just power Kamailio with solar or
wind if we just had enough generating capacity. I think that's really missing
the forest for the trees. The worker processes stay running whether you need
them or not, it all depends on how many listeners you have set and what the
children config value is. Either way, I've got two words for you: base load.
Even if we completely ignore that the energy density is just not there per
hectare of solar or wind installation, how do you provide the constant power to
the child processes?"
Past feasibility studies published jointly by Balashov and Posner support this
assessment. One such study, initiated in 2018 and concluded during the COVID-19
global pandemic, found that an area equivalent to the size of the entire state
of North Rhine-Westphalia would need to be devoted to batteries, even using the
latest lithium ferrous phosphate (LFP) technology.
"But wait, there's more!" says Posner: "Show me the amperage."
"The packet forwarding mechanism is similar to a railgun, at least if you're
doing stateful. Where are you going to get the millions of amps? It's either
setting up huge banks of capacitors god-knows-where, or the pulsed power system
that's undergirded by the original OpenSER turbines. I think we already know
the answer to that."
Balashov noted that, even beyond the political and economic challenges that
Kamailio downtime would introduce, there are other tightropes to walk. As the
most economically dynamic, export-oriented EU member state, Germany is prone to
flirt with SIP proxy privatisation schemes in its national discourse, all while
messaging a stronger Euro to the ECB.
"There is a vocal minority," says Balashov, "who push for research into more
modular, regionally sited SIP gateways. They're always talking about sclerotic,
unresponsive federal regulations and listless, bumbling Brussels bureaucrats
and making it all smaller and leaner. Listen, I'm all for the Invisible Hand,
but setting the Request URI and adding custom headers requires a truly
integrated, national-scale infrastructure. It's the stuff of public-private
partnerships and megaprojects. Even if you're a market zealot who is not sold
on basic INVITEs as a public good, think about Presence or IMS. You really need
the full capacity of a nation-state on deck for that."
If devolution to smaller, more numerous SIP routing sites is not feasible--at
least, at the unit cost and reliability level demanded by advanced
economies--then excessive complexity offers a cautionary tale from the opposite
extreme.
In a particularly notorious example of technical and policy failure, the
Electric Reliability Council of Texas (ERCOT), following the guidance of
northern Californian advisors Unicorn & Moonshot, attempted to scale down
traditional Kamailio turbine blades into newer, so-called Kubernetes "Pod"
chasses to increase exhaust recapture. This made for a much more intricate
installation with an exponential growth of moving parts, telemetry and site
support skill requirements. This proved unmanageable, and the now-famous
explosion that followed the deterioration of the site led to unprecedented
casualties in US history. Furthermore, it also resulted in the long-term
humidification of large expanses of East Texas, Louisiana, Mississippi and
southern Alabama, rendering most of these areas uninhabitable. These events
discredited the Unicorn & Moonshot approach in the eyes of most industry
analysts.
While it will take some months for Evariste to reach a conclusion regarding the
resilience of the German Kamailio through the winter and beyond, and it will
take still longer to issue policy recommendations, one factor is universally
agreed upon already: this prolonged test of Germany's resilience is part of a
Russian strategic calculation.
A conservative MP from the CDU/CSU faction of the Bundestag, speaking on
condition of anonomity, offered this summary: "The Russians think they can wait
this out. They are waiting for us to fold and switch to an OpenSIPS reactor,
knowing full well this will keep us busy with troubleshooting and diminish our
ability to support Ukraine militarily."
--
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com
Tel: +1-706-510-6800
Hi all
For rtpengine to correctly distinguish branched calls, the top-most via
branch= parameter should be passed to it.
I have attempted to use $via0 but that does not yet exist in Kamailio
5.4
So I did try to read $hdr(Via) which I guess returns an array and then
access:
but this returns the inbound via, not the one generated on the branched
call.
How can this be accomplished with kamailio 5.4?
--
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 Kamailio users
How can I get a failure route to trigger in timeout-to-CANCEL in
a parallel forking scenario?
Parallel forking test scenario
1. one(the main - 0) branch picks up the call
2. 2nd branch sends CANCEL (expecting 487 etc) - but the callee does not
send any replies
Result:
No failure route handlers are called on timeout of this CANCEL - that is
kamailio attempts the CANCEL 4 times but neither
tm.t_on_failure_route, tm.t_on_branch_failure handlers are called.
Any suggestions on how to resolve this?
Regards
Shih-Ping
I'm looking for documentation//howto/advice/best practices for running
Kamailio under Kubernetes on AWS via Rancher. Specifically, how to manage
the public/Elastic IP. This is a load balancer (dispatcher) scenario with
rtpengine for receiving inbound calls from a DID provider, but a similar
configuration might be used for clients. I'm open to using an AWS load
balancer, and would like to scale with multiple Kamailio pods behind a
single public IP. I'd rather use Rancher-managed EC2 than pay extra for
EKS, unless EKS can cancel out its own cost. This sounds like it should be
a solved problem, just complex. I see blogs and videos out there, but it's
not always obvious if their content is current. Anyone want to help me peel
this onion?
-Calvin
Help is needed. I know I have seen a similar problem either via email or
google search but for the life of me I cannot find it now.
I am using:
Ubuntu:
5.4.0-144-generic #161-Ubuntu SMP Fri Feb 3 14:49:04 UTC 2023 x86_64 x86_64
x86_64 GNU/Linux
Kamailio:
version: kamailio 5.3.9 (x86_64/linux) -- This is a dev platform and I can
update kamailio if needed.
I am trying to query a mongodb collection for the phone number stored under
“did” as an integer and make a decision based on the returned result
(boolean is sufficient for this decision).
I don’t know what I am doing wrong here. Any help will be well appreciated
##### This is the insert statement into the telephone db from a linux script
db.c$coll.insertOne({"did":parseInt($(cut -d_ -f 1 <<< $1)),
"callDesc":$(cut -d_ -f 1 <<< $1)}))" >> $(cut -d_ -f 1 <<< $1).js
did is stored as an integer and the callDesc is stored as presented by $rU
{ "_id" : ObjectId("641580b4863678d0ba38d69a"), "did" : 1XXXXXXXXXX,
"callDesc" : 1XXXXXXXXXXXX }
> db.c234.find()
{ "_id" : ObjectId("641580b4863678d0ba38d69a"), "did" : 2XXXXXXXXXXXX,
"callDesc" : 2XXXXXXXXXXXX }
> db.c234.find()
{ "_id" : ObjectId("641580b4863678d0ba38d69a"), "did" : 3XXXXXXXXXXXX,
"callDesc" : 3XXXXXXXXXXXX }
>
Kamailio config:
.....
.....
# --- mongodb module loaded 202201082322
loadmodule "ndb_mongodb.so"
if (uri==myself)
{
sl_send_reply("100", "Trying to check if uri is myself $rU
$ru");
#return;
#Adding this to test connection to mongodb…. This worked
and the reply was sent to the endpoint
if(*mongodb_cmd_simple*("mongodbsrv1", "telephone", "cXXX”,
"{ \"collStats\": \"cXXX\” }", "mgr1"))
{
sl_send_reply("183", "I got inside this message
loop $rU found in mongodb");
xlog("response from mongodb is
[[$mongodb(mgr1=>value)]]\n");
}
# End of the test
#This is to run the actual db query to test if the phone number is in the
mongodb…. I am not successful at this query even when the number is known
to be in the database
if(*mongodb_find_one*("mongodbsrv1", "telephone", "cXXX”,
"{\"did\" : \"$rU\" }", "mongoResponse1"))
{
# Route to confirmed route here -- 202302212032
sl_send_reply("183", "I got inside this mongodb
message loop");
route(CONFIRMED_ROUTE);
xlog("response from mongodb is
[[$mongodb(mongoResponse1=>value)]]\n");
}
else
{
route(UNCONFIRMED_ROUTE);
}
}
#append_hf("P-hint: outbound\r\n");
route(RELAY);
#exit;
}
Please help.
--
-----
Ekunwe
Tel: 601.497.3932
Hi Kamailians!
A new CVE with a critical severity level was published recently for an almost three year old bug,
which was also fixed and released three years ago (CVE-2020-27507).
The issue was fixed in Kamailio 5.4.2 and is not present in newer releases.
The Kamailio project has unfortunately not been involved in the CVE process or
been informed about this old issue being published at this time.
We take vulnerability handling seriously and our process is documented at:
https://www.kamailio.org/wikidocs/security/policy/
The latest stable branch is 5.6, with v5.6.4 released out of it.
Reference:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-27507
Best regards and thanks for flying Kamailio!
The Kamailio dev team
through
/Olle