The connection registered by the client is normal, and the client can send messages and renew the registration normally, but the push message to the client using uac_req_send() from kamailio fails.
Location information after the client is registered:
]#kamcmd ul.lookup location test01
Received: sip:10.11.40.XX:57646;transport=tls
]#netstat -anp | grep 57646
"tcp 0 0 10.11.55.xx:5061 10.11.40.XX:57646 ESTABLISHED 3467/kamailio"
kamailio.lua
KSR.pv.sets("$uac_req(ouri)", rows.received)
In this way, most users can receive messages normally, but occasionally some users cannot receive messages but can renew their registration and send messages normally. Once this is the case for this user, the use of uac_req_send() will continue to fail until the client establishes a new connection.
If a problem occurs, the following logs are displayed on the server:
2024-02-20T10:01:25.329595+08:00 10.11.55.XX (72819) ERROR: <core> [core/tcp_main.c:4692]: tcpconn_main_timeout(): connect 10.11.40.XX:57646 failed (timeout)
The connection already exists and should be normal, why does "tcpconn_main_timeout(): connect 10.11.40.XX:57646 failed (timeout)" occur.
We have recently upgraded from 5.6.4 to 5.7.4.
No change in the KAMAILIO configuration.
On all upgraded servers we are now getting this message in the logs for
every destination when the dispatcher sends out OPTIONS to destinations
listed in the dispatcher list:
WARNING: <core> [core/tcp_main.c:1301]: find_listening_sock_info():
binding to source address X.X.X.X:YYYY failed: Address already in use [98]
The X.X.X.X being the servers IP address and YYYY being the servers
listening port for tcp and/or tls.
It's not consistent. For some servers it's every time OPTIONS is sent.
For others it's just now and then. udp destinations have no issues.
There are no other processes occupying these ports. Changing the
listening port on the KAMAILIO also results in the new port reported as
in use.
Dispatcher OPTIONS still seems to work for both tcp and tls.
Unsurprisingly using a dynamic, unprivileged port > 1023 and not the
server port as the source port, as it shouldn't. The packages are sendt
and a reply is registered. Inbound OPTIONS are processed as expected by
KAMAILIO on the listening port.
Have I missed something transitioning from 5.6 -> 5.7, or is this a bug?
Relevant config:
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_probing_threshold", 2)
modparam("dispatcher", "ds_ping_interval", 120)
modparam("dispatcher", "ds_ping_from", "sip:ping@xxxxxx.xxx")
modparam("dispatcher", "ds_ping_latency_stats", 1)
OS: Debian Bullseye
Kamailio installed from
https://deb.kamailio.org/kamailio57 bullseye
Best regards,
Jardar Leira
Hi,
I'm trying to forward the original username of the peer via Kamailio dispatcher to the Asterisk and I can't get it working.
The scenario looks like this:
Client Phone (username 1) -> Asterisk Client ---trunk(test-trunk)--> Kamailio Dispatcher/RTPEngine --trunk--> Asterisk Final
Client is dialing via Asterisk Client with a simple extension:
exten => _X.,1,Set(CALLERID(all)= 587555611 <587555611>)
exten => _X.,n,Dial(SIP/${EXTEN}@test-trunk)
Asterisk Client is registering to the Kamailio with its own credentials and Kamailio is registering in the Asterisk Final
The problem is that I can't find a way to extract the original trunk username (like test-trunk) in the outgoing connection to the Asterisk Final (via Kamailio):
Since i'm using the CALLERID on the Asterisk Client all I can see on the Asterisk Final is:
INVITE sip:587322591@192.168.20.74 SIP/2.0
Record-Route: <sip:587322591@192.168.20.74;lr;ftag=as52b874a1;nat=yes>
Via: SIP/2.0/UDP 192.168.20.74;branch=z9hG4bKc6e3.a77db1f002191ae3ee1a414b63d34a72.0
Via: SIP/2.0/UDP 192.168.21.228:5060;received=192.168.21.228;branch=z9hG4bK705ec94a;rport=5060
Max-Forwards: 69
From: "587555611" <sip:587555611@192.168.21.228>;tag=as52b874a1
To: <sip:587322591@192.168.20.74>
Contact: <sip:587555611@192.168.21.228:5060;alias=192.168.21.228~5060~1>
Call-ID: 433f9ff84cdb437f0d383797003c232f@192.168.21.228:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 16.29.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
P-Asserted-Identity: "587555611" <sip:587555611@192.168.21.228>
Content-Type: application/sdp
Content-Length: 268
There is no way I can forward the 'test-trunk' in the SIP header. I tried to add append_hf to ROUTE[relay] like append_hf("X-Trunk $au r\n");
but if the trunk is already registered then $au is null or the CALLERID value.
How to extract the original username (test-trunk) on the Asterisk Final? Do you have any ideas?
Thank you in advance ;)
Hello all,
I've noticed that there seems to be a regression with the topos module,
more specifically the redis flavour, but I'm assuming the storage backend
shouldn't make a difference.
I have confirmed this affects both 5.6.5 and 5.7-nightly, so I'm assuming
some backported commit is to blame. Kamailio 5.6.4 used previously, to the
best of my memory, was not affected.
Early dialog UPDATEs sent from the callee seem to be somehow malformed,
since the 200 OK the UAS produces goes directly to the UAC despite having
executed record_route() for the original INVITE. I can't imagine how this
is possible, I thought responses always honour the Via header and record
route shouldn't play a role in this case, right?
Simply turning topos off restores the intended behaviour, however, so I
can't help but think this is somehow related. Here's two call flows
demonstrating the behaviour:
* Topos on, 200 OK to UPDATE missing: https://pastebin.com/raw/J0zQeM5g
* Topos off, 200 OK to UPDATE routed correctly:
https://pastebin.com/raw/49yErezb
I was wondering if anyone is aware of any commits that might be responsible
for this. Additionally, is there an archive of debian packages with
previous point releases so that I can confirm this regression with the
latest versions?
Thank you!
Best regards,
George
Hello all,
Is there any way of actually rejecting (RST) NEW tcp connection attempts,
while allowing the ongoing ones to finish naturally?
I’m thinking maybe we can add this feature?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Hi!
I would like to add/remove/update entries in uacreg database.
The easiest way I found is to add data using mysql and then call
kamcmd uac.reg_reload. I end up reloading too often:
uac_reg_ht_shift(): shifting in-memory table is not possible in less than
150 secs
I would like to optimize it and I tried to use
sudo kamcmd uac.reg_add
Unfortunately, the data is not persistent and seems to be only in memory.
Does it means my only choice is to follow this procedure:
Add a user:
1/ sudo kamcmd uac.reg_add
2/ add the equivalent mysql entry
Remove a user
1/ sudo kamcmd uac.reg_remove
2/ remove the equivalent mysql entry
Let me know if an alternative exists!
Regards
Aymeric
--
Antisip - http://www.antisip.com
I all, I'm looking into Kamailio as a solution to replace our current Presence Server in our IMS Network, but feeling a bit overwhelmed by the feature size and complexity of Kamailio. I have a few questions (some might be dumb), if you guys could help me I would appreciate.
1. As I only need Kamailio as a Presence Server (with XCAP and SIP Interface), is there a way to install only the necessary components and/or modules? Our security team would probably raise some questions if we need to install unused code on the network. For what I could investigate, the modules i would need are:
* Presence
* Presence_XML
* Xcap_server
* xhttp
* RLS
* Pua
* database
* sl
* tm
Am I missing something?
2- As refered on point 1, our server will need a xcap and sip interface. Some presence updates will come through XCAP, others from SIP Publish. My question is, whenever a presence update is made through XCAP interface, will the kamailio server trigger the necessary SIP Notify to notify all Subscribed users ? I ask this because this was a problem with our current supplier.
3 - our client is a bit "peeky" with performance. I found here (https://www.kamailio.org/wikidocs/kemi/performance-tests/5.2.x/#results) some performance tests, but for what i can see the test primary goal was to test the response time. Is there any resource on "requests per second"?
Thanks in advance for all the help
David Salvador
Hi all,
While researching for Open Source IMS Services I’v found the presentation
“What’s up with IMS & VoLTE?” at KamailioWorld 2018.
There is a quote that raises a question:
“Things, you shouldn’t expect (at least initially):
● Seamless handover between LTE and Wifi, as this requires some integration
with the PGW of the LTE”
My question is: Has the VoLTE <-> VoWiFi Handover been implemented in the
meantime?
BR Christian
Hello. I am a new Kamailio user, and I have been following the
instructions for setting up a new IMS system. So far, I have a system
that is working with the default example configs, but I am am trying to
figure out the best way to expand on these default configurations.
Currently, from my reading, the pcscf and icscf have minimal
configuration/customization beyond the basic setting required to get
them working, and most of the configuration related to routing,
features, and other typical telecom customization should be done in the
scscf. Is this mostly correct? Additionally, is there a guide to the
features that are required in order to get the IMS systems working above
and beyond the minimal config to get Kamailio itself working, so that I
know what it's safe to modify and what should be left alone?
Thank you,
Enzo Damato
I encountered a behavior with DMQ using excessive CPU when running kamailio 5.8 on AWS Graviton processors (running in Docker on Amazon Linux 2023), even on an otherwise idle system. Finding the issue below pointed me towards using polling. I set the value for worker_usleep to 1000 as a test, and that seems to have resolved the CPU issue, but I have no idea of what a "good" value is for this setting, and 1000 was simply the example present in the documentation. My specific use case for DMQ is synchronizing USRLOC data for ~7,500 users, registering with expiration times of 60 - 300 seconds with 7 - 9 nodes on the DMQ bus. Any general recommendations on tuning values for this setting?
https://github.com/kamailio/kamailio/issues/822
Regards,
Kaufman
Hello, I wish to use RTJSON for routing inbound calls from Kamailio to external endpoint(s), based on JSON received from my API.
My rtjson setup is based on guide below, with my route(RELAY) sending Invite via t_relay();
https://wazo-platform.org/blog/kamailio-routing-with-rtjson-and-http-async-…
I am including rtjson_init_routes("$var(rtjson)");, rtjson_push_routes(); & rtjson_update_branch(); in my routes.
Also have defined: listen=tls:10.129.1.168:5061 advertise ${PUBLIC_IPV4}:5061
Routing from rtjson is working fine for TCP / UDP connections, however - once I try to forward an INVITE via rtjson using TLS, then the TLS connection is simply closed with Kamailio reporting "tcp_read_data(): EOF on connection".
Please see logs and setup below.
- tcp_reuse_port = yes, tcp_children = 8, tcp_accept_no_cl= yes & tcp_connection_lifetime=3605
- Also no success with tcp_reuse_port = no
- I have HOMER setup and see here that SIP headers from the RTJSON is being used (Outbound SIP Invites is being duplicated to HOMER before connection is released)
- I see no drop in traffic from my firewall
As you can see from logs below, Kamailio is reusing the socket (0x7fc3ebc65060) from the exsisting connection (not new socket 0x7fc3ef70aab0).
I am sending SIP Options toward the external endpoint (which is working fine), and my theory is that Kamailio is reusing the exisitng SIP OPTIONS tcp connection for the SIP INVITE and somehow close the connection when RTJSON is used (since routing without RTJSON is working fine).
Any idea how to solve this?
Thank you!
(x.x.x.x:5061 is external endpoint)
14(43) DEBUG: rtjson [rtjson_routing.c:364]: rtjson_init_serial(): rewrite dst-uri to: [sip:x.x.x.x:5061;transport=tls]
14(43) DEBUG: rtjson [rtjson_routing.c:388]: rtjson_init_serial(): trying to set send socket to: [tls:10.129.1.168:5061]
14(43) DEBUG: <core> [core/socket_info.c:726]: grep_sock_info(): checking if host==us: 12==12 && [10.129.1.168] == [10.129.1.168]
14(43) DEBUG: <core> [core/socket_info.c:730]: grep_sock_info(): checking if port 5061 (advertise 5061) matches port 5061
.........
14(43) DEBUG: tm [../../core/forward.h:276]: msg_send_buffer(): sending to: x.x.x.x:5061, force_socket=4, send_sock=0x7fc3ef70aab0
14(43) DEBUG: <core> [core/tcp_main.c:1741]: _tcpconn_find(): found connection by peer address (id: 9)
14(43) DEBUG: <core> [core/tcp_main.c:2627]: tcpconn_send_put(): tcp connection found (0x7fc3ebc65060), acquiring fd
14(43) DEBUG: <core> [core/tcp_main.c:2637]: tcpconn_send_put(): c=0x7fc3ebc65060, n=16
23(52) DEBUG: <core> [core/tcp_main.c:3982]: handle_ser_child(): read response= 7fc3ebc65060, 2, fd -1 from 14 (43)
14(43) DEBUG: <core> [core/tcp_main.c:2665]: tcpconn_send_put(): after receive_fd: c= 0x7fc3ebc65060 n=8 fd=20
14(43) DEBUG: <core> [core/tcp_main.c:2842]: tcpconn_do_send(): sending...
14(43) DEBUG: <core> [core/tcp_main.c:2878]: tcpconn_do_send(): after real write: c= 0x7fc3ebc65060 n=1372 fd=20
14(43) DEBUG: <core> [core/tcp_main.c:2879]: tcpconn_do_send(): buf=
.........
23(52) DEBUG: <core> [core/tcp_main.c:4671]: handle_tcpconn_ev(): sending to child, events 2001
23(52) DEBUG: <core> [core/tcp_main.c:4299]: send2child(): checking per-socket generic workers (48/19..-1828836960/21964) [tls:10.129.1.168:5061]
23(52) DEBUG: <core> [core/tcp_main.c:4326]: send2child(): WARNING: no free tcp receiver, connection passed to the least busy one (idx:0 busy:2)
23(52) DEBUG: <core> [core/tcp_main.c:4330]: send2child(): selected tcp worker idx:0 proc:19 pid:48 for activity on [tls:10.129.1.168:5061], 0x7fc3ebc65060
19(48) DEBUG: <core> [core/tcp_read.c:1782]: handle_io(): received n=8 con=0x7fc3ebc65060, fd=14
19(48) DEBUG: <core> [core/tcp_read.c:280]: tcp_read_data(): EOF on connection 0x7fc3ebc65060 (state: 0, flags: 118) - FD 14, bytes 0, rd-flags 10000 ([x.x.x.x]:5061 -> [x.x.x.x]:5061)19(48) DEBUG: <core> [core/tcp_read.c:1544]: tcp_read_req(): EOF
19(48) DEBUG: <core> [core/tcp_read.c:1702]: release_tcpconn(): releasing con 0x7fc3ebc65060, state -1, fd=14, id=9 ([x.x.x.x]:5061 -> [x.x.x.x]:5061)
19(48) DEBUG: <core> [core/tcp_read.c:1705]: release_tcpconn(): extra_data 0x7fc3ebc305b0
23(52) DEBUG: <core> [core/tcp_main.c:3744]: handle_tcp_child(): reader response= 7fc3ebc65060, -1 from 0
23(52) DEBUG: <core> [core/tcp_main.c:3668]: tcp_emit_closed_event(): TCP closed event creation triggered (reason: 0)
23(52) DEBUG: <core> [core/tcp_main.c:3676]: tcp_emit_closed_event(): no callback registering for handling TCP closed event
23(52) DEBUG: tls [tls_server.c:732]: tls_h_tcpconn_close_f(): Closing SSL connection 0x7fc3ebc305b0
Hello,
My plan is to reject new inbound requests if there is already a certain number of open connections on one Kamailio server. I could answer with a 503 and directly close the connection forcing the client to reconnect and the loadbalancer to send traffic to a different node on the next connect. It's just a last-resort measure to prevent Kamailio from running into the configured TCP connection limit (workarounding a poorly-implemented external load balancer).
Since I didn't find anything in the docs: Is there a pseudovariable containing the current number of open tcp/tls connections on this Kamailio? I can (and already do) query them via kamcmd or rpc, but can I access the variable from inside the routing script as well?
Regards,
Sebastian
Hello,
the formal notification that the development for the next major version
5.8.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.8 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.8.
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.8.
Once the branch 5.8 is created, new features can be pushed again to
master branch as usual. From that moment, the v5.8.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.8 is going to be built at:
* https://www.kamailio.org/wikidocs/features/new-in-5.8.x/
Upgrade guidelines will be collected at:
* https://www.kamailio.org/wikidocs/install/upgrade/5.7.x-to-5.8.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.7.x to 5.8.x.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
Hello everyone. I have setup Kamailio as an SBC for Microsoft Teams following the link provided in the documentation https://skalatan.de/en/blog/kamailio-sbc-teams and everything was working perfectly until recently. The problem I am having is that starting a few weeks back, Kamailio starting showing the errors below. These errors appear without the need to do anything, meaning without making any sort of call, even with Kamailio sitting idle. Since the problem started I looked around and found out that the issue seems to come from the fact that sometimes the SIP Options request being sent to microsoft is not being answered.
I have configured everything following the guide and I did not make any changes to Kamailio since then that might have caused this issue.
I am using kamailio with docker, version 5.7.2-bullseye.
Thank you very much.
31(37) ERROR: <core> [core/tcp_main.c:4675]: tcpconn_main_timeout(): connect 52.114.76.76:5061 failed (timeout)
9(15) ERROR: <core> [core/tcp_main.c:1321]: tcp_do_connect(): connect 52.114.76.76:5061 failed Cannot assign requested address
9(15) ERROR: <core> [core/tcp_main.c:1324]: tcp_do_connect(): connect 52.114.76.76:5061: (99) Cannot assign requested address
9(15) ERROR: <core> [core/tcp_main.c:1456]: tcpconn_finish_connect(): 52.114.76.76:5061: tcp_do_connect for 0x7f623d0e91a8 failed
9(15) ERROR: <core> [core/tcp_main.c:2112]: tcp_send(): 52.114.76.76:5061: tcpconn_finish_connect(0x7f623d0e91a8) failed
9(15) ERROR: tm [../../core/forward.h:292]: msg_send_buffer(): tcp_send failed
9(15) ERROR: tm [uac.c:688]: send_prepared_request_impl(): Attempt to send to precreated request failed
Hello,
I propose to aim freezing the development for 5.8.x series at the end of
the 1st of February 2024 (Thursday).
New features that one wants to get in this release series have to be
pushed to git repository or pull requests made for them. Afterwards
usually follows a 4-6 weeks of testing till the first release 5.8.0.
Unfreezing will happen earlier, after the first weeks of testing when
the 5.8 branch will be created.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
Hello all,
I'm using Kamailio as SIP redirect where I'm appending the contact header then send reply back using sl_send_reply("300","Multiple Choices").
But I'm getting "print_dset(): no r-uri or branches" as warning in the log and no packet is sent back from Kamailio to the original sender.
I'm using same Kamailio configuration in another setup and it's working correctly without facing this error.
I'm not able to detect the issue. Can you please assist?
Regards,
Hi
I was wondering what exactly happens with parallel branching in this
situation:
branch_route[BR_T]
{
if (condition)
{
# Stuff below not required
exit or return
}
do other stuff before relaying
}
Will this break, stop the processing of all branches with higher
index as the one being processed? From what I observe, I fear this is
the case.
Could I safely use return(1) (vs return which probably is return(0)
thus eq exit)? Or would the only safe option be to wrap the 'other
stuff' in an else statement?
Mit freundlichen Grüssen
-Benoît Panizzon-
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Hello guys,
i compiled kamailio and i want it installed on debian's deb location, i.e.:
/etc/kamailio
/usr/lib/x86_64-linux-gnu/kamailio/modules
etc..
I know if i do
make prefix=/ all
make prefix=/ install
the config will end up on /etc/kamailio, but then the modules will be on
/lib64...
i don't see a way of doing this, is there?
Thanks!
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Dear List,
We're load balancing MRCP requests using Kamailio dispatcher module's call load distribution algorithm.
We want to achieve the same maximum number of concurrent sessions on each MRCP backend but because the duration of each request varies, we’re unable to achieve this (at the moment we send the same number of requests to each backend but they all have different maximum concurrent requests).
Is there a way/module that will send requests to the backend with the least number of ongoing sessions? My guess is, this module needs to connect to the backends to know their status. Any pointers appreciated.
Thank you
With best wishes,
Unai Rodriguez
When I look at the debian repositories maintained by the project, there are instructions to import the public key of the repository for apt using this command:
wget -O http://deb.kamailio.org/kamailiodebkey.gpg | sudo apt-key add -
which results in:
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
gpg: no valid OpenPGP data found.
Is there an alternate method that can be posted in the repository that will get better results?
Thank you,
TL
Hello Kamailio list!
We have a scenario that makes use of the UAC-module to send SIP MESSAGE and
then in some cases the Kamailio process core dumps after some time after
processing messages. I have been able to gather a core dump which shows
this backtrace appended below. We are using Kamailio 5.6 retrieved from the
kamailio repository: http://deb.kamailio.org/kamailio56. We are running
Kamailio in a Docker container which runs on "5.10.0-25-cloud-amd64 #1 SMP
Debian 5.10.191-1 (2023-08-16) x86_64 GNU/Linux"
We have previously tried to use Kamailio 5.7 but it gave the same type of
crashes.
We have been using the uac module a lot but it is just in this scenario we
get a core dump. We have some kind of relation to a specific scenario but
it can take from several seconds from the last SIP message of this scenario
up to 50 minutes until the crash occurs. To me this sounds like some kind
of cleanup that is not handled properly. The back trace indicates that free
of shared memory could be the issue, but I don't know the code
unfortunately.
The last things we see in the log file is:
2024-01-23T13:18:08.828+01:00 Jan 23 12:18:08 /usr/sbin/kamailio[4789]:
INFO: <script>: Incoming SIP TCP request conid 21 call-id
un0rihsRLJLvP-grn6LO-A
2024-01-23T13:18:08.835+01:00 Jan 23 12:18:08 /usr/sbin/kamailio[4789]:
INFO: <script>: Incoming SIP TCP request conid 21 call-id
WQjhldpRJbxjZRYe7fWgbw
2024-01-23T13:18:08.860+01:00 Jan 23 12:18:08 /usr/sbin/kamailio[4795]:
CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 49
2024-01-23T13:18:09.486+01:00 Jan 23 12:18:09 /usr/sbin/kamailio[4751]:
ALERT: <core> [main.c:783]: handle_sigs(): child process 4777 exited by a
signal 11
2024-01-23T13:18:09.486+01:00 Jan 23 12:18:09 /usr/sbin/kamailio[4751]:
ALERT: <core> [main.c:787]: handle_sigs(): core was generated
2024-01-23T13:18:09.516+01:00 Jan 23 12:18:09 /usr/sbin/kamailio[4751]:
INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not
initialized
2024-01-23T13:18:09.570+01:00 Started /root/sipconfig/startkamailio.sh
2024-01-23T13:18:09.570+01:00 info: :-) Starting Kamailio
Just before all the crashes we see the "CRITICAL: <core>
[core/pass_fd.c:281]: receive_fd(): EOF on 49" log line.
Best regards,
Mattis Lind
# gdb /usr/sbin/kamailio /core
*GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git*
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/kamailio...
(No debugging symbols found in /usr/sbin/kamailio)
warning: Can't open file /dev/zero (deleted) during file-backed mapping
note processing
[New LWP 4777]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -DD -M 18 -m 192 -A
serverId=17173 -A sendTraceLocal="sip:10'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:77
77 ../sysdeps/x86_64/multiarch/strlen-evex.S: No such file or directory.
(gdb) bt full
#0 __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:77
No locals.
#1 0x00007f5425e34b78 in __vfprintf_internal (s=s@entry=0x55a06e969a60,
format=format@entry=0x55a06e558020 "%s: %.*s%s%s%sBUG: qm: fragm. %p
(address %p) beginning overwritten (%lx)! Memory allocator was called from
%s:%u. Fragment marked by %s:%lu. Exec from %s:%u.\n",
ap=ap@entry=0x7ffd6bebfb50, mode_flags=mode_flags@entry=0) at
vfprintf-internal.c:1647
len = <optimized out>
step0_jumps = {0, 1717, 1621, 3413, 3317, 3997, 2677, 2837, 3613,
1773, 4309, 4445, 3517, 4437, 4389, 2789, 4197, 3917, 3221, 2997, 1141,
1365, 1997, 1925, 1885, 733, 3709, 533, 533, 4101}
space = <optimized out>
is_short = <optimized out>
use_outdigits = 0
outc = <optimized out>
step1_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1773, 4309, 4445, 3517,
4437, 4389, 2789, 4197, 3917, 3221, 2997, 1141, 1365, 1997, 1925, 1885,
733, 3709, 533, 533, 0}
group = 0
prec = -1
step2_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4309, 4445, 3517,
4437, 4389, 2789, 4197, 3917, 3221, 2997, 1141, 1365, 1997, 1925, 1885,
733, 3709, 533, 533, 0}
string = 0x756d6f7266222c22 <error: Cannot access memory at address
0x756d6f7266222c22>
left = 0
is_long_double = <optimized out>
width = 0
signed_number = <optimized out>
step3a_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4213, 0, 0, 0, 4389,
2789, 4197, 3917, 3221, 0, 0, 0, 0, 1925, 0, 0, 0, 0, 0, 0}
alt = <optimized out>
showsign = 0
is_long = 0
is_char = <optimized out>
pad = <optimized out>
step3b_jumps = {0 <repeats 11 times>, 3517, 0, 0, 4389, 2789, 4197,
3917, 3221, 2997, 1141, 1365, 1997, 1925, 1885, 733, 3709, 0, 0, 0}
step4_jumps = {0 <repeats 14 times>, 4389, 2789, 4197, 3917, 3221,
2997, 1141, 1365, 1997, 1925, 1885, 733, 3709, 0, 0, 0}
args_value = <optimized out>
is_negative = <optimized out>
number = {longlong = <optimized out>, word = <optimized out>}
base = <optimized out>
the_arg = {pa_wchar = 4777 L'\x12a9', pa_int = 4777, pa_long_int =
4777, pa_long_long_int = 4777, pa_u_int = 4777, pa_u_long_int = 4777,
pa_u_long_long_int = 4777,
pa_double = 2.3601515901836347e-320, pa_long_double =
1.74131181638025811763e-4947, pa_float128 =
3.09319115455554459548860449034534676e-4962,
pa_string = 0x12a9 <error: Cannot access memory at address 0x12a9>,
pa_wstring = 0x12a9 <error: Cannot access memory at address 0x12a9>,
pa_pointer = 0x12a9, pa_user = 0x12a9}
spec = 115 's'
_buffer = {__routine = 0x4, __arg = 0xd, __canceltype = 1855363680,
__prev = 0xe0}
_avail = <optimized out>
thousands_sep = 0x0
grouping = 0xffffffffffffffff <error: Cannot access memory at
address 0xffffffffffffffff>
done = 238
f = 0x55a06e5580a7 "s:%lu. Exec from %s:%u.\n"
lead_str_end = 0x55a06e558020 "%s: %.*s%s%s%sBUG: qm: fragm. %p
(address %p) beginning overwritten (%lx)! Memory allocator was called from
%s:%u. Fragment marked by %s:%lu. Exec from %s:%u.\n"
end_of_spec = <optimized out>
work_buffer =
"h\r\000\000\000\000\000\000\000\000\000\000\060\000\000\000\000\000\000\000\375\177\000\000
\372\353k\375\177\000\000\237MSn\n\000\000\000\000\000\000\000\240U",
'\000' <repeats 18 times>,
"P\225Un\240U\000\000\000\000\000\000[\214A\323\f\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377\206\002",
'\000' <repeats 14 times>, "\004\000\000\000\000\000\000\000
\367\353k\375\177\000\000\301\225Un\240U\000\000\323\262\vn\240U\000\000\000\000\000\000\000\000\000\000s\374On\240U\000\000W\225Un\240U\000\000\350>\212\027T\177\000\000
\323\365$T\177\000\000\060\a\354k\375\177\000\00--Type <RET> for more, q to
quit, c to continue without paging--
0\220\371\227n\240U\000\000"...
workend = 0x7ffd6bebf9f8 ""
ap_save = {{gp_offset = 16, fp_offset = 48, overflow_arg_area =
0x7ffd6bebfc30, reg_save_area = 0x7ffd6bebfb70}}
nspecs_done = 10
save_errno = 4
readonly_format = 0
do_longlong_number = <optimized out>
__result = <optimized out>
#2 0x00007f5425ec079f in __vsyslog_internal (pri=<optimized out>,
fmt=0x55a06e558020 "%s: %.*s%s%s%sBUG: qm: fragm. %p (address %p)
beginning overwritten (%lx)! Memory allocator was called from %s:%u.
Fragment marked by %s:%lu. Exec from %s:%u.\n",
ap=0x7ffd6bebfb50, mode_flags=0) at ../misc/syslog.c:233
now_tm = {tm_sec = 8, tm_min = 18, tm_hour = 12, tm_mday = 23,
tm_mon = 0, tm_year = 124, tm_wday = 2, tm_yday = 22, tm_isdst = 0,
tm_gmtoff = 0, tm_zone = 0x55a06e94c5e0 "UTC"}
now = 1706012288
fd = <optimized out>
f = 0x55a06e969a60
buf = 0x0
bufsize = 0
msgoff = 21
saved_errno = <optimized out>
failbuf =
"`\232\226n\240U\000\000\000\204\201\247[\214A\323`\374\353k\375\177\000\000\300p\371%T"
clarg = {buf = <optimized out>, oldaction = <optimized out>}
#3 0x00007f5425ec0c46 in __syslog (pri=<optimized out>, fmt=<optimized
out>) at ../misc/syslog.c:117
ap = {{gp_offset = 48, fp_offset = 48, overflow_arg_area =
0x7ffd6bebfc70, reg_save_area = 0x7ffd6bebfb70}}
#4 0x000055a06e3b7839 in ?? ()
No symbol table info available.
#5 0x000055a06e3bc039 in qm_free ()
No symbol table info available.
#6 0x000055a06e3c7c28 in qm_shm_free ()
No symbol table info available.
#7 0x00007f542325fb8e in uac_send_tm_callback () from
/usr/lib/x86_64-linux-gnu/kamailio/modules/uac.so
No symbol table info available.
#8 0x00007f5424a2f002 in run_trans_callbacks_internal () from
/usr/lib/x86_64-linux-gnu/kamailio/modules/tm.so
No symbol table info available.
#9 0x00007f5424a2f179 in run_trans_callbacks () from
/usr/lib/x86_64-linux-gnu/kamailio/modules/tm.so
No symbol table info available.
#10 0x00007f54249d5e8c in free_cell_helper () from
/usr/lib/x86_64-linux-gnu/kamailio/modules/tm.so
No symbol table info available.
#11 0x00007f5424aa8f82 in wait_handler () from
/usr/lib/x86_64-linux-gnu/kamailio/modules/tm.so
No symbol table info available.
#12 0x000055a06e37a263 in ?? ()
No symbol table info available.
#13 0x000055a06e37a79d in ?? ()
No symbol table info available.
#14 0x000055a06e37acc6 in timer_main ()
No symbol table info available.
#15 0x000055a06e0a5f62 in main_loop ()
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#16 0x000055a06e0b120c in main ()
No symbol table info available.
When receiving to-tag and returning 180 ring without SDP body, how can it be converted into 183 with SDP and returned to from-tag. I want to realize that when I receive 180 no sdp, I will play an audio clip for the from-tag.:
INVITE (SDP)
──────────────────────────> │
100 Trying
<────────────────────────── │
│ INVITE (SDP)
│ ──────────────────────────>
100 Trying
│ <──────────────────────────
180 Ringing
│ <──────────────────────────
183 Session Progress (SDP) │
<────────────────────────── │
Hi
I have come across an issue with the usrloc database on kamailio 5.6 and 5.7
Jan 26 07:19:45 dev-cpereg01 kamailio[2708456]: ERROR: <core> [db_query.c:244]: db_do_insert_cmd(): error while submitting query
Jan 26 07:19:45 dev-cpereg01 kamailio[2708456]: ERROR: usrloc [ucontact.c:686]: db_insert_ucontact(): inserting contact in db failed somedudetp0216 (uloc-65b237f8-28983d-1)
Jan 26 07:19:45 dev-cpereg01 kamailio[2708456]: ERROR: usrloc [urecord.c:419]: wb_timer(): inserting contact into database failed (aor: somedudetp0216)
settings:
# ----- usrloc params -----
modparam("usrloc", "db_url", DBLOCAL)
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "ka_mode", 0)
modparam("usrloc", "ka_filter", 1)
modparam("usrloc", "timer_procs", 1)
modparam("usrloc", "ka_from", "sip:ping@sip.imp.ch")
modparam("usrloc", "server_id_filter", 1)
# Use DMQ to sync userloc
loadmodule "dmq_usrloc.so" # Replicate usrloc via dmq
# Enable userloc sync
modparam("dmq_usrloc", "enable", 1)
# Do a full sync on start
modparam("dmq_usrloc", "sync", 1)
I assume, when kamailio is being restartet there are some expired entries still present in the database which kamailio tries to insert on a new registration.
This leads to this duplicate key error.
Is there a way to tell kamailio to use 'replace into' instread of 'insert into'?
Solution for now, is to manually delete expired entries from the database.
--
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Hello Kamailio community,
After the January refactoring of OpenSSL integration, configurations that
initialise libssl in rank 0 (thread #1) are likely to trigger errors more
aggressively. This type of configuration has all along been broken due to
OpenSSL use of thread-local variables.
The first "victim" is https://github.com/kamailio/kamailio/issues/3727 —
the configuration has dispatcher + db_unixodbc (+ some driver) — this
configuration initialises libssl in rank 0(thread #1).
I have a couple of PRs in the queue for db_unixodbc, db_mysql (PostgreSQL
may need similar attention).
master and 5.7 branches are affected
Regards
Richard
Hello,
LCR module logic is :
When the function /load_gws()/ is called, matching gateways (that are
not currently designated as defunct) are ordered for forwarding purposes
as follows:
1.
according to longest Request-URI user part match
2.
according to tuple's priority
3.
according to tuple's randomized weight
or, if priority_ordering parameter is set to value 1, as follows:
1.
according to tuple's priority
2.
according to tuple's randomized weight
and Smaller priority value means higher priority (highest priority value
being 0 and lowest being 255). so I have 3 lcr_rule_target use the same
lcr_rule entry but 3 different Gateways and priority. So the order of
rules would be longest Request-URI (same) and the priority but the
result is:
added matched_gws[0]=[3, 5, 200, 2193562]
added matched_gws[1]=[1, 5, 2, 6888519]
added matched_gws[2]=[2, 5, 50, 2159388]
same prefix but first rule target with priority 200 and then 2 and then
50. I think the result would be priority 2,50 and 100.
¿Or not?
---
I'm SoCIaL, MayBe
Hi,
I'm trying a DMQ dialog sync up setup with 2 x Kamailios. I have this scenario:
1. Kamailio1 receives INVITE and sends KDQM to Kamailio2 to sync up dialog => OK
2. Kamailio2 receives 200OK
3. Kamailio2 does not send anything back to Kamailio1 to update dialog state => not OK, i expected a KDMQ to be send back to Kamailio1 to update dialog state
I was wondering if DMQ module supports the above? I am using 5.6 version of kamailio, and I am curios if this might be implemented in later branches?
Thank you,
Stefan
Hi
https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#branch_name_-…
"Assigning $null to uri attribute will drop the branch, for the rest of
attributes will just set the value to null."
Where do I need to assing $null to the brach URI to get it dropped? And
what happens to the index, is there a gap, or do the subsequent
branches get re-indexed so they don't match with the ulc indexes anymore?
Actual example, I have multiple contacts I would like to add to branches.
Two of the contacts are from the location database + an additional
contact.
# Basic Branch:
$ru = $(ulc(aor=>addr)[0]);
$du = $(ulc(aor=>received)[0]);
$fs = $(ulc(aor=>socket)[0]);
# Additional Branch:
append_branch($(ulc(aor=>addr)[1]));
$(branch(dst_uri)[-1]) = $(ulc(aor=>received)[1]);
$(branch(send_socket)[-1]) = $(ulc(aor=>socket)[1]);
and so on, actually a loop over all ulc contacts.
# Lasst Additional Branch, point to other registrar, not to a usrloc location.
append_branch($ru);
$(branch(dst_uri)[-1]) = "sip:other-registrar:5060;transport=udp";
$fsn = "LocalUDPv4";
$(branch(send_socket)[-1]) = $fs;
t_on_branch("BR_T");
branch_route[BR_T]
{
$var(socket) = $(ulc(aor=>socket)[$T_branch_idx]);
if ($var(socket) == 0) {
xlog("L_INFO", "$cfg(route): DROPPING BRANCH: $T_branch_idx No local socket on this registrar\n");
$(branch(uri)[$T_branch_idx]) = $null;
}
}
I don't get this right! Call is still sent to that contact.
--
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Hello,
using DEBUG with LCR module to see how the module apply the rules, I see
he use Gateway Index in the list. The Gateway Index could be different
to Gateway ID and maybe can confuse the correct interpretation about the
use of the rules.
Is it possible change the code:
matched_gws[gw_index].gw_index = t->gw_index;
matched_gws[gw_index].rule_id =
rule->rule_id;
matched_gws[gw_index].prefix_len =
pl->prefix_len;
matched_gws[gw_index].priority =
t->priority;
matched_gws[gw_index].weight =
t->weight * (kam_rand() >> 8);
matched_gws[gw_index].duplicate = 0;
LM_DBG("added matched_gws[%d]=[%u %u,
%u, %u, %u]\n", gw_index,
t->gw_index,
pl->prefix_len, t->priority,
matched_gws[gw_index].weight);
to use gateway ID and not gateway Index?
Thank you
Regards
--
---
I'm SoCIaL, MayBe
When receiving a call I get the following message:
INVITE sip:123456789@192.168.1.118:29363 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.118:65178;branch=z9hG4bK-d87543-4a4a6b6c49541b2c-1--d87543-;rport
Max-Forwards: 70
Contact: <sip:96341@192.168.1.118:65178>
To: "123456789"<sip:123456789@192.168.1.119:29363 >
From: "96341"<sip:96341@192.168.1.119:29363 >;tag=af3c7c31
Call-ID: OTFhN2M2YmRmNmU2N2I1ZmQxNmM4ODg4YzRiZmQyNTc.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: eyeBeam release 1011d stamp 40820
Content-Length: 339
v=0
o=- 3 2 IN IP4 192.168.1.118
s=CounterPath eyeBeam 1.5
c=IN IP4 192.168.1.118
t=0 0
m=audio 32170 RTP/AVP 0 8 18 101
a=alt:1 1 : +YhwgPgy ayLEx4wo 192.168.1.118 32170
a=fmtp:18 annexb=no
a=fmtp:101 0-15
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
How to print the media IP in SDP separately in the log? I didn't find the Pseudo-Variables..can you help me
Hi
There were two PUBLISH requests were sent by the Kamailio Proxy server to
the Kamailio Presence server.
Processing of the first PUBLISH request resulted in the presentity table
being updated - the "etag" changed from "a.1705053846.16611.21.1" to
"a.1705053846.16613.23.2"
Processing of the second PUBLISH failed because it also attempted to update
the etag in the presentity table but at this point in time there was no
match to the original etag value in the database
Logs in kamailio.log:
------
ps_db_update_presentity(): No E-Tag match a.1705053846.16611.21.1
DEBUG: tm [t_reply.c:637]: _reply_light(): reply sent out -
buf=0x7f81e5ca5fc0: SIP/2.0 412 Conditio... shmem=0x7f81de6da068:
SIP/2.0 412 Conditional request failed.
Will any one suggest how to resolve the issue of 412 conditional request
failed.
Dear List,
I’m trying to set up the dialog module and I keep getting the error "bad sip message or missing Contact hdr”:
---
Jan 23 11:34:17 server.example.com kamailio[2495]: 16(2511) ERROR: {1 78451036 INVITE 2ef1d082-3486-123d-0abc-02c8e9c6c24e} dialog [dlg_handlers.c:219]: populate_leg_info(): bad sip message or missing Contact hdr
Jan 23 11:34:17 server.example.com kamailio[2495]: 16(2511) ERROR: {1 78451036 INVITE 2ef1d082-3486-123d-0abc-02c8e9c6c24e} dialog [dlg_handlers.c:952]: dlg_new_dialog(): could not add further info to the dialog
---
This is for MRCP traffic and the SIP INVITEs do not contain the Contact header. They look like this:
----
INVITE sip:some.mrcp.server.example.com:8060 SIP/2.0
Via: SIP/2.0/TCP 10.10.10.10:5099;branch=z9hG4bK5Kpey3r13SBNQ
Max-Forwards: 70
From: <sip:10.10.10.10:5099>;tag=134a3eKD2a8Ua
To: <sip:some.mrcp.server.example.com:8060>
Call-ID: 051df0ff-3541-123d-f090-02f373ff014c
CSeq: 78491159 INVITE
User-Agent: google_stt
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE
Supported: timer, 100rel
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 329
v=0
o=FreeSWITCH 2474358185109188492 5282339568667506935 IN IP4 10.10.10.10
s=-
c=IN IP4 10.10.10.10
t=0 0
m=application 9 TCP/MRCPv2 1
a=setup:active
a=connection:new
a=resource:speechrecog
a=cmid:1
m=audio 12034 RTP/AVP 0 8 96
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 L16/8000
a=sendonly
a=mid:1
----
According to the RFC, the Contact header is not mandatory (https://datatracker.ietf.org/doc/html/rfc3261#section-8.1.1) and I don’t have an easy way of adding the Contact header to the INVITEs. Is there a way to configure Kamailio’s dialog module to do without the Contact header? Any pointers appreciated.
Thank you so much
With best wishes,
Unai Rodriguez
Hi List
Via sql_xquery I get a stacked xavp aka array.
I would like to store that stacked xavp into a hash table for later usage in other transactions. Is this
possible?
Via xarp_parameters explode or implode does not work as that would stringy the same key multiple times.
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 Gang
I would like to set a variable specific to the branch. Is there a way?
append_branch($var(aor1));
$(branch(dst_uri)[-1]) = $var($dst1)
$(branch(want_plus)[-1]) = 1;
append_branch($var(aor2));
$(branch(dst_uri)[-1]) = $var($dst2)
$(branch(want_plus)[-1]) = 0;
t_on_branch("BR_T");
branch_route[BR_T]
{
if ($branch(want_plus))
{
$rU = "+" + $rU;
}
}
Or would there be a way to query the index of the added branch so I
could stack an avp with that index to access in the branch route?
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
______________________________________________________
Hey everyone,
I've set it up so that when the invite comes into Kamailio I suspend the
transaction (save the transaction info in sht) and use dispatcher to send a
request to our NSS server. On the reply from NSS I throw the identity
header into a sht and continue the original transaction. Does that seem
like the right way to do it?
The next things I need to look at are:
* if first NSS server doesn't respond quickly, try the second (change some
timeouts and use dispatcher to try the backup)
* if both NSS servers aren't working, I still want to resume the original
call and let it through. Maybe I can keep track of the failures in a
sht and if I have two failures, resume the original invite without the
identity header.
Sound like an ok plan?
--
Anthony Wittig
Mango Voice Developer
>
> ---------- Forwarded message ----------
> From: Anthony Wittig <awittig(a)mangovoice.com>
> To: sr-users(a)lists.kamailio.org, david.villasmil.work(a)gmail.com
> Cc:
> Bcc:
> Date: Tue, 23 Jan 2024 20:39:09 -0700
> Subject: [SR-Users] STIR/SHAKEN
> Thanks!
>
> This is what I've got so far:
>
> 1. Kamailio invite -> NSS
> 2. NSS 302 -> Kamailio
> 3. Kamailio ack -> NSS
>
> I can see the identity header on the 302 response in my onreply_route. How
> can I replay the same invite from step #1 with the identity header I get
> back in step #2? Should I be doing something with a transaction on step #1,
> maybe start a branch that goes out to NSS and when it comes back resume the
> transaction (these are all words I've heard smart people say, but I don't
> fully understand them...).
>
> Any pointers would be greatly appreciated, thanks!
> --
> Anthony Wittig
> Mango Voice Developer
>
> ---------- Forwarded message ----------
> From: David Villasmil <david.villasmil.work(a)gmail.com>
> To: "Kamailio (SER) - Users Mailing List" <sr-users(a)lists.kamailio.org>
> Cc:
> Bcc:
> Date: Tue, 23 Jan 2024 14:56:52 +0100
> Subject: [SR-Users] Re: STIR/SHAKEN
> Ditto, i do first approach.
>
> Regards,
>
> David Villasmil
> email: david.villasmil.work(a)gmail.com
> phone: +34669448337
>
>
> On Tue, Jan 23, 2024 at 2:38 PM Alex Balashov via sr-users <
> sr-users(a)lists.kamailio.org> wrote:
>
>> These are all valid approaches, depending on preference. Catching 302s
>> and extracting exactly the desired info might be easier with Kamailio, so I
>> suppose, ceteris paribus, I'd recommend the first one.
>>
>> Dispatcher is a great approach!
>>
>> > On 23 Jan 2024, at 00:01, Anthony Wittig via sr-users <
>> sr-users(a)lists.kamailio.org> wrote:
>> >
>> > Hello,
>> >
>> > We're attempting to add identities to our invites. I believe we want to
>> send our invites to the NSS, and it'll reply with a 302'd invite with an
>> identity header. We currently use FreeSWITCH for dialplans and media and
>> Kamailio as our SBC.
>> >
>> > Should we be trying for something like: FreeSWITCH -> Kamailio -> NSS
>> (302) -> Kamailio -> PSTN
>> >
>> > or would it make more sense to do: FreeSWITCH -> NSS (302) ->
>> FreeSWITCH -> Kamailio -> PSTN
>> >
>> > Assuming we wanted Kamailio -> NSS, is using dispatcher the right
>> approach? We currently use it for our two Kamailios and our FreeSWITCHs.
>> We're going to have two NSS servers, one for failover.
>> >
>> > Any thoughts would be greatly appreciated, thanks!
>> >
>> > --
>> > Anthony Wittig
>> > Mango Voice Developer
>> > __________________________________________________________
>> > 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:
>>
>> --
>> Alex Balashov
>> Principal Consultant
>> Evariste Systems LLC
>> Web: https://evaristesys.com
>> Tel: +1-706-510-6800
>>
>
Thanks!
This is what I've got so far:
1. Kamailio invite -> NSS
2. NSS 302 -> Kamailio
3. Kamailio ack -> NSS
I can see the identity header on the 302 response in my onreply_route. How
can I replay the same invite from step #1 with the identity header I get
back in step #2? Should I be doing something with a transaction on step #1,
maybe start a branch that goes out to NSS and when it comes back resume the
transaction (these are all words I've heard smart people say, but I don't
fully understand them...).
Any pointers would be greatly appreciated, thanks!
--
Anthony Wittig
Mango Voice Developer
---------- Forwarded message ----------
From: David Villasmil <david.villasmil.work(a)gmail.com>
To: "Kamailio (SER) - Users Mailing List" <sr-users(a)lists.kamailio.org>
Cc:
Bcc:
Date: Tue, 23 Jan 2024 14:56:52 +0100
Subject: [SR-Users] Re: STIR/SHAKEN
Ditto, i do first approach.
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
On Tue, Jan 23, 2024 at 2:38 PM Alex Balashov via sr-users <
sr-users(a)lists.kamailio.org> wrote:
> These are all valid approaches, depending on preference. Catching 302s and
> extracting exactly the desired info might be easier with Kamailio, so I
> suppose, ceteris paribus, I'd recommend the first one.
>
> Dispatcher is a great approach!
>
> > On 23 Jan 2024, at 00:01, Anthony Wittig via sr-users <
> sr-users(a)lists.kamailio.org> wrote:
> >
> > Hello,
> >
> > We're attempting to add identities to our invites. I believe we want to
> send our invites to the NSS, and it'll reply with a 302'd invite with an
> identity header. We currently use FreeSWITCH for dialplans and media and
> Kamailio as our SBC.
> >
> > Should we be trying for something like: FreeSWITCH -> Kamailio -> NSS
> (302) -> Kamailio -> PSTN
> >
> > or would it make more sense to do: FreeSWITCH -> NSS (302) -> FreeSWITCH
> -> Kamailio -> PSTN
> >
> > Assuming we wanted Kamailio -> NSS, is using dispatcher the right
> approach? We currently use it for our two Kamailios and our FreeSWITCHs.
> We're going to have two NSS servers, one for failover.
> >
> > Any thoughts would be greatly appreciated, thanks!
> >
> > --
> > Anthony Wittig
> > Mango Voice Developer
> > __________________________________________________________
> > 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:
>
> --
> Alex Balashov
> Principal Consultant
> Evariste Systems LLC
> Web: https://evaristesys.com
> Tel: +1-706-510-6800
>
> __________________________________________________________
> 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,
We're attempting to add identities to our invites. I believe we want to
send our invites to the NSS, and it'll reply with a 302'd invite with an
identity header. We currently use FreeSWITCH for dialplans and media and
Kamailio as our SBC.
Should we be trying for something like: FreeSWITCH -> Kamailio -> NSS (302)
-> Kamailio -> PSTN
or would it make more sense to do: FreeSWITCH -> NSS (302) -> FreeSWITCH ->
Kamailio -> PSTN
Assuming we wanted Kamailio -> NSS, is using dispatcher the right approach?
We currently use it for our two Kamailios and our FreeSWITCHs. We're going
to have two NSS servers, one for failover.
Any thoughts would be greatly appreciated, thanks!
--
Anthony Wittig
Mango Voice Developer
Hi gang
location database contains multiple contacts for an AOR
The invite therefore is parallel branched to those multiple contacts.
Each reply from each branch is handled by MANAGE_REPLY.
rtpengine_manage() is called in MANAGE_REPLY to stop rtpengine
processing a failed call.
Unfortunately, if any of the contacts replies with an error
rtpengine_manage() will stop RTP processing.
Is there a way I could check if there are branches with a pending reply
from within MANAGE_REPLY so I could call rtpengine_manage() only when
the last reply (no pending replies) are present?
Hmm, realizing, if I process the last pending error reply and a prior
one got a positive reply, this would still kill media.
=> How do I solve this?
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,
a short note to inform that the Call For Presentations is now open for
Kamailio World 2024. Everyone is welcome to submit proposal for
presentations to share the knowledge about Kamailio or Real Time
Communication services, security, high availability, scalability, etc.
Submission form and more details are available at:
- https://www.kamailioworld.com/k2024/call-for-speakers/
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
Hello.
I have installed Kamailio version devel on Ubuntu 22.04 and use the mysql database on the same machine.
when i run
systemctl status kamailio.service
● kamailio.service - LSB: Start the Kamailio SIP proxy server
Loaded: loaded (/etc/init.d/kamailio; generated)
Active: active (exited) since Sat 2024-01-20 11:35:09 +0330; 21min ago
Docs: man:systemd-sysv-generator(8)
CPU: 48ms
/usr/local/sbin/kamailio[173481]: ERROR: usrloc [dlist.c:846]: register_udomain(): failed to open database connection
/usr/local/sbin/kamailio[173481]: ERROR: registrar [registrar.c:767]: domain_fixup(): failed to register domain
/usr/local/sbin/kamailio[173481]: ERROR: [core/route.c:1193]: fix_actions(): fixing failed (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg:717
/usr/local/sbin/kamailio[173481]: ERROR: [core/rvalue.c:3818]: fix_rval_expr(): failure in cfg at line: 717 col: 22
/usr/local/sbin/kamailio[173481]: ERROR: [core/rvalue.c:3818]: fix_rval_expr(): failure in cfg at line: 717 col: 22
/usr/local/sbin/kamailio[173481]: ERROR: [core/route.c:1193]: fix_actions(): fixing failed (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg:720
/usr/local/sbin/kamailio[173481]: INFO: [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
kamailio[173463]: * already running
kamailio[173463]: ...done.
systemd[1]: Started LSB: Start the Kamailio SIP proxy server.
In /usr/local/etc/kamailio/kamctlrc, I uncomment these lines:
SIP_DOMAIN=ims.mnc55.mcc999.farazNET.org
DBENGINE=MYSQL
DBHOST=localhost
in /usr/local/etc/kamailio/kamailio.cfg i apply this changes:
auto_aliases=no
alias="ims.mnc55.mcc999.farazNET.org"
listen=udp:192.168.75.185:5060
listen=tcp:192.168.75.185:5060
how can i solved it?
Hi
I'm having an issue with the double rr for mst direct routing.
I'm using subdomains like 23234.mydomain.com with a wildcard certificate and I
set corex modparam alias_subdomains to mydomain.com
But loose_route doesn't seem to detect the rr as myself
I get the message:
rr [loose.c:804]: rr_do_force_send_socket(): no socket found to match second RR
(sip:20141.mydomain.com:5063;transport=tls;ftag=as7107d0fe;lr;r2=on;vsf=AAAAAAAAAAADCQMaABhMS1NYRh0cRllbR0RRQG91cC5lcw--;nat=yes;pet=mst)
Regarding my setup is more or less like this:
kamailio.local.cfg:
#!substdef "!MSTDOMAIN!mydomain.com!g"
kamailio.cfg:
modparam("corex", "alias_subdomains", "MSTDOMAIN")
But in the cli:
kamctl rpc corex.list_aliases
{
"jsonrpc": "2.0",
"result": [
],
"id": 1319303
}
I don't remember to have this issue when I was developing the mst integration.
Either I missed it or can it be a regression? kamailio version is 5.6.4 at the
moment.
Any ideas?
cheers
Jon
--
PekePBX, the multitenant PBX solution
https://pekepbx.com
Hello!
Thanks in advance for any help you can provide.
I have a simple setup here and am struggling a bit with getting a final
working solution.
This is just a single direction flow from a SIP provider inbound to servers
running HMPelements with CTI integration (sip endpoint). Essentially a
different DN / dial number would go to a different backend server. There
is no registration involved.
The kamailio server therefore needs to sit between the SIP provider and the
backend servers, it will be a NAT situation where private RFC1918 addresses
will be used on the backend after the server receives it with public IP
information.
So that's it. What is the simplest way to accomplish this?
If it would help - here's what ive done so far:
For the Kamailio server, I have an AWS EC2 instance with a public IP
bound/assigned to the main private IP. During troubleshooting, I've added
another private IP to the NIC so that I could throw up another listener.
I was thinking I'd need to accept the SIP on the first listener with the
"advertise" directive. The second listener would not have an advertise
directive so perhaps could be used to talk to the backends.
I defined the WITH NAT and rtp proxy settings (pointing to the first
listener below). The RTP Proxy daemon also knows about the y.y.y.y public
address below.
In the kamailio.cfg, I have a listener setup :
listen=udp:172.24.40.28:5060 advertise y.y.y.y:5060
listen=udp:172.24.40.26:5060
then threw in a route(CMS) in the request route and created the following
route block:
route[CMS] {
#check URI matches phone xxxxxxxxxx
if (uri=~"^sip:\+1xxxxxxxxxx@") {
rewritehostport("10.12.18.193:5060");
forward(uri:host, uri:port);
exit;
};
}
I get the SIP delivered to the backend host! but the INVITE headers are
stil pointing to public IPs and the SDP info is not adjusted to be a
private IP as well - as follows:
z.z.z.z = sip provider , y.y.y.y = public ip (aws ec2 ip). xxxxxxxxx =
calling phone, ######## = called phone (matches routeCMS above)
INVITE sip:+1##########@10.12.18.193:5060 SIP/2.0
Record-Route: <sip:y.y.y.y;lr>
Via: SIP/2.0/UDP
y.y.y.y:5060;branch=z9hG4bK28b7.56b42fdeec9f10cd13030b3711b16f4d.0
Via: SIP/2.0/UDP
z.z.z.z:11000;received=z.z.z.z;rport=11000;branch=z9hG4bKQ2yQKgv7NtKQF
Max-Forwards: 48
From: "" <sip:+1xxxxxxxxxx@z.z.z.z;isup-oli=0>;tag=tUF15gaNg6N6j
To: <sip:+1##########@y.y.y.y>
Call-ID: 9ee7e073-c7fc-46ac-a839-f3c77eaed903
CSeq: 78244364 INVITE
Contact: <sip:mod_sofia@z.z.z.z:11000>
User-Agent: 2600Hz
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REFER,
NOTIFY
Supported: path, replaces
Allow-Events: talk, hold, conference, refer
Privacy: none
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 278
X-FS-Core-UUID: 4e0b2928-d913-42c4-9809-f77a36d281be
X-FS-Support: update_display,send_info
P-Asserted-Identity: "" <sip:+1xxxxxxxxx@z.z.z.z>
v=0
o=FreeSWITCH 1705572686 1705572687 IN IP4 z.z.z.z
Thanks much!
Hi,
Yes I've tried using append_to_reply() in several routes
(tm:branch-failure, sl:local-response, tm:local-response, onreply_route,
failure_route) but it was not applied.
It works fine if a response is received or if it is generated by the
configuration script but not if this response is locally generated by a
kamailio module.
Regards,
Frédéric Gaisnon
> Custom headers to the reply can be added using append_to_reply() function
from textops module. Have you tried that?
>
> Regards,
>
> Fred Posner
> p: +1 (352) 664-3733
> > On Jan 18, 2024, at 2:07 AM, frédéric Gaisnon via sr-users <
sr-users(a)lists.kamailio.org> wrote:
> >
> > Hello,
> > I want to add a SIP custom header on a SIP response generated locally
(on the 408 generated when fr_inv_timeout is expired for example)
> > I've tried functions append_hf and append_to_reply in
event_route[tm:branch-failure:XXX] or event_route [tm:local-response]
without any success.
> > Do you have any suggestions to accomplish this ?
> > Regards,
> > Frédéric Gaisnon
Hi List
Imagine the following situation:
Two Kamailio registrar proxies handling the same domain. Location
Information synced via DMQ.
So if a device registers we don't know on which of the two registrar
proxies.
Core proxy is dispatching calls to either one of those registrars.
Core also performs AOR database lookup and adds an X- header telling
which AOR the call is destined to.
Registrar performs lookup of that AOR in the location database and
routes the call to destination.
Problem: The call could be routed to the the registrar which does
not hold the active socket to that client.
Solution: reg_fetch_contacts, cycle the contacts and append_branch if
the contact has a local socket.
Next Problem: I use a failure_route to sent the call to voicemail, if
not registered, busy etc. This would trigger, if we have no
local socket for the registration which is on the other
registrar. So I have to find a way to send the call to the
other registrar.
I guess I can append_branch a branch pointing to the URI of the
other registrar. This would then succeed in reaching the
device. Also using the failure_route would work this way if
we get a remote error from behind the other registrar or no
registration at all.
Next Problem: I use a branch trigger to remove undesired header I do
not want to send to the customer. Now imagine that AOR has two
contacts, one on registered on each registrar proxy.
So I end up with two destinations added with append_branch to
the destination set.
One points to the device of the locally registered customer
device, the other one points to the other registrar where to
find the other device.
I use a branch route trigger to remove the X- Headers towards
the customer.
But I need to X- Header containing the destination AOR to still
be sent to the other registrar.
Is there a way to trigger a branch route for only some of the
destinations added with append_branch? Or to trigger different
branch routes for different destinations in one set added with
append_branch?
Or am I doing this completely wrong and there is an easier way? ;-)
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
______________________________________________________
Sup guyz! On debian 12 i have kamailio 5.6.3 and when I try to use db_mysql module I always get an error: kamailio[2842268]: ERROR: db_mysql [km_my_con.c:163]: db_mysql_new_connection(): driver error: Can't connect to local server through socket '/run/mysqld/mysqld.sock'
I have no idea where it finds this socket cuz I don’t have it and don’t want to. Where I can change it?
Hello,
I want to add a SIP custom header on a SIP response generated locally (on
the 408 generated when fr_inv_timeout is expired for example)
I've tried functions append_hf and append_to_reply in
event_route[tm:branch-failure:XXX] or event_route [tm:local-response]
without any success.
Do you have any suggestions to accomplish this ?
Regards,
Frédéric Gaisnon
Hello,
Kamailio SIP Server v5.7.4 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.3. 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.4.
For more details about version 5.7.4 (including links and guidelines to
download the tarball or from GIT repository), visit:
* https://www.kamailio.org/w/2024/01/kamailio-v5-7-4-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, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
Hello,
I am considering to release Kamailio v5.7.4 (out of branch 5.7) on
Thursday, Jan 18, 2024. 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, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com