Hi,
I have been doing some load testing with Kamailio and having some issues.
I have been trying with 100 CPS and at the beginning, everything is working
well but after some time (it can be 10 minutes or for example 40 minutes,
is just random but normally happens more in the first 10 minutes) Kamailio
stop replying to all SIP messages but still processing HTTP requests, some
commands, etc.
If I use "kamcmd dlg.list" no output happens and after that, all kamcmd
commands just keep loading with no output.
Kamailio is sharing Dialogs and htables using DMQ with other Kamailio that
is the failover, if I shut down the failover one (so no DMQ replication),
the test works well with the 100 CPS.
Also tried with modparam("dmq", "worker_usleep", 1000) but the behavior is
the same, it will stop processing traffic.
This is some of configuration used:
# ----------------- setting module-specific parameters ---------------
modparam("dmq", "server_address", "sip:INTERNAL_INSTANCE_IP:5060")
modparam("dmq", "notification_address", "DMQ_NOTIFICATION_ADDRESS")
modparam("dmq", "multi_notify", 1)
modparam("dmq", "ping_interval", 10)
modparam("dmq", "num_workers",4)
modparam("htable", "enable_dmq", 1)
modparam("htable", "dmq_init_sync", 1)
# ----- dialog params -----
modparam("dialog", "dlg_flag", FLD_DLG)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "db_url", DBURL_RW)
modparam("dialog", "db_mode", 0)
modparam("dialog", "enable_dmq", 1)
modparam("dialog", "db_update_period", 10)
modparam("dialog", "h_id_start", H_ID_START)
modparam("dialog", "h_id_step", H_ID_STEP)
Memory:
Shared: 4096
Private: 512
kamailio -v
version: kamailio 5.5.3 (x86_64/linux) 473cef
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: 473cef
compiled on 09:34:57 Dec 20 2021 with gcc 10.2.1
In attach is the trap collected after the issue happens.
Any more logs or configurations that can help identify or solve the issue?
Thanks for the help,
Regards,
Tiago
Hello
I’m new in siremis as web interface of kamailio and I immediately need
your help,I installed kamailio and siremis and login in siremis web
interface,I can work with it but now I have a problem.
I want to change menu language there is an option
in(setting->translate->manage languages) add my desired language and
click save and i see this error:
Error message: #2, count(): Parameter must be an array or an object
that implements Countable
Script name and line number of error:
[/var/www/siremis-5.3.x/siremis/modules/translation/lib/LangPackCreator.php
I needed to change the language and thanks for your the help to me.
Another challenging year is getting close to its end, pressuring even
more everyone! Let's hope things will go back to a more usual life (as
it used to be) in the near future!
Kamailio project continued to develop, bringing out a new major release,
preparing for the next one in a few months, relying on an amazing
community of developers and users. We also trust it continued to help
people and companies world wide to connect with the dear ones and build
a better way of living.
The season holidays are ahead, time to relax, spend time with family and
friends! I take again this chance to express my thanks and greetings to
all the friends, developers, supporting companies and community members
that made 2021 another great year for Kamailio project.
Enjoy the holidays! Merry Christmas!
Daniel
* Santa is flying Kamailio! *
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Hi Everyone,
I have Kamailio acting as a registrar, using DMQ to replicate usrloc between nodes. I’m relaying INVITEs to the home registrar, but skipping this if (uri == myself) is true.
In my lab I just setup my SBCs in an active/active mode, similar to the link below. So I have 2x VIPs and both SBCs listen on both, but the first VIP is only master on SBC01 and the second VIP is only master on SBC02.
https://docs.nginx.com/nginx/admin-guide/high-availability/ha-keepalived-no…
My issue is that now “myself” will always return true even if the virtual IP is actually not active on this node at the moment, so the invite is never relayed properly if it’s on another node. I guess “myself” is just blindly looking at the list of Ips that are configured with either listen= or alias= and doesn’t care if the IP actually exists on the server at the time, or not?
I am thinking I may have to ditch relying on “myself” entirely and come up with some other way of checking for local requests, but I am wondering if there’s a good way of approaching this? I was thinking of perhaps triggering an add/remove of listen directives (or something) when a failover of a VIP happens, though this seems kind of heavy handed. Hoping there is a better way.
Has anyone else tried doing active/active Kamailio instances like this?
Thanks!
Rhys Hanrahan | Chief Information Officer
e: rhys(a)nexusone.com.au<mailto:rhys@nexusone.com.au>
[www.nexusone.com.au]<http://www.nexusone.com.au/> [signature_132622389] <http://www.fusiontech.com.au/>
NEXUS ONE | FUSION TECHNOLOGY SOLUTIONS
p: 1800 NEXUS1 (1800 639 871) or 1800 565 845 | a: Suite 12.03 Level 12, 227 Elizabeth Street, Sydney NSW 2000
www.nexusone.com.au<http://www.nexusone.com.au/> | www.fusiontech.com.au<http://www.fusiontech.com.au/>
The information in this email and any accompanying attachments may contain; a. Confidential information of Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties; b. Legally privileged information of Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties; and or c. Copyright material Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties. If you have received this email in error, please notify the sender immediately and delete this message. Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd does not accept any responsibility for loss or damage arising from the use or distribution of this email.
Please consider the environment before printing this email.
Hello,
Why in SEMS, some changes (in transparent SBC profile) in sip headers do
not apply. For example i want to change CSeq or Contact header like this:
# transparent SBC profile
# defaults: transparent
RURI=$r
From=$f
To=$t
Call-ID=$ci_leg2
CSeq=$H(CSeq)
Contact=$H(Contact)
When I run SEMS, CSeq and Contact do not change, while other headers change.
[#7fc688d7b1c0/9379] [onLoad, SBC.cpp:189] INFO: loading SBC call profiles
from '/usr/local/etc/sems/etc/'
[#7fc688d7b1c0/9379] [readFromConfiguration, SBCCallProfile.cpp:418] INFO:
SBC: loaded SBC profile 'mo' - MD5: d6a2c29084043edde1357231f6866737
[#7fc688d7b1c0/9379] [readFromConfiguration, SBCCallProfile.cpp:423] INFO:
SBC: RURI = '$r'
[#7fc688d7b1c0/9379] [readFromConfiguration, SBCCallProfile.cpp:424] INFO:
SBC: RURI-host = ''
[#7fc688d7b1c0/9379] [readFromConfiguration, SBCCallProfile.cpp:425] INFO:
SBC: From = '$f'
[#7fc688d7b1c0/9379] [readFromConfiguration, SBCCallProfile.cpp:426] INFO:
SBC: To = '$t'
[#7fc688d7b1c0/9379] [readFromConfiguration, SBCCallProfile.cpp:431] INFO:
SBC: Call-ID = '$ci_leg2222'
[#7fc688d7b1c0/9379] [readFromConfiguration, SBCCallProfile.cpp:434] INFO:
SBC: force outbound proxy: yes
This issue caused the Asterisk could not pass the Authentication process
in "match_req_to_dialog" function because the CSeq is the same as the
dialogs. So the Asterisk thought this message was a LOOP message.
Has anybody encountered this issue in SEMS? How did you solve this? I know
there are some ways for doing this with Kamailio, But i focused on issues
in SEMS
With Best Regards
*-- Mojtaba Esfandiari.S*
*-- PhD student and Research Affiliate, *
*-- Technical Manager at IP-PBX Laboratory, Ferdowsi University of Mashhad,
Iran.*
-- Address: IP-PBX Lab., Engineering Faculty, Ferdowsi University Main
Campus, Mashhad, Iran.
-- Tel: +98-51-38763635
-- Mobile: +98-915-117-6713
Hello all,
we want to use the "remote registrations feature" of the uac module to let kamailio register with other sip providers. As far as I see the module works only with a database backend. As our kamailio script should be independent from a database, a solution could be to load the configuration on startup (and refresh it periodically) from a database view into a htable and then trigger the remote registrations based on the expiration of the htable columns.
Could something like this be implemented by using the uac module or by an other workaround ? Or does it require some enhancements in the uac module ?
Thanks and regards
Markus
I'm trying to use the kamcmd tml.tc_uac_start command to send raw SIP
messages in Kamailio 5.5, but I always get a error: 400 - Invalid
headers. I've also tried sending OPTIONS messages with the same
result. I've looked for examples of sending SIP messages via kamcmd,
but can't find any.
kamcmd help tm.t_uac_start specifies the following:
kamcmd> help tm.t_uac_start
starts a tm uac using a list of string parameters: method, ruri,
dst_uri, send_sock, headers (CRLF separated) and body (optional)
Essentially my problem is I don't really know how to properly encode
these headers. How do I send special characters? Do I need to use
double quotes, single quotes, etc around the whole header? Which
characters are special? How do I encode the CRLF? I tried \r\n, but I
still get this error. It says only From: and To: are required. It's a
bit hard trying to make progress when all I ever get is one error
message. The kamailio logs are a little more helpful, and largely point
me down the road that it doesn't understand the CRLF encoding, and says
my From: header includes the To: line, so it's not separating them.
For example, I'm trying things like this:
kamcmd -v tm.t_uac_start OPTIONS sip:200@exampleserver.com:5060 . .
"From:
<sip:example@192.168.0.1>;tag=d27ca05e-1789-4774-a698-dcfe91dec9b4\r\nTo:
<sip:example@192.168.0.2>"\r\nExpires: 1200\r\nContent-Length: 0"
Nothing seems to work, so whatever the syntax I'm using must be wrong.
Just providing an example of sending SIP via kamcmd tm.t_uac_start
would likely help a huge amount.
Thanks!
--
Hi,
for having a maintenance mode, I need to implement some sort of draining functionality. All our clients register via TLS. So I thought, I just answer the next REGISTER of a client with a 503 and kill the tcp connection afterwards, so they need to open up a new connection to the loadbalancer in front and end up on a different server.
This is my code:
510 if msg.is_method("REGISTER"):
1 if KSR.pv.get("$shv(MAINTENANCE_MODE)") == 1:
2 KSR.info("In maintenance mode, rejecting registration")
3 KSR.hdr.append_to_reply("Retry-After: 2\r\n")
4 KSR.sl.sl_send_reply(503, "Draining")
5 if KSR.tcpops.tcp_set_connection_lifetime(1) > 0:
6 KSR.info("Set Connection lifetime to 1")
7 return False
(Side note: msg is some internal class, this is obviously KEMI with python)
So now when I set the MAINTENANCE_MODE var to 1, Kamailio rejects the REGISTER requests, logs both lines and sends out a 503.
Debug log tells me this:
Dec 10 15:32:10 ifens5 /usr/sbin/kamailio[3851]: DEBUG: tcpops [tcpops.c:229]: tcpops_set_connection_lifetime(): new connection lifetime for conid=1: 908866403
Dec 10 15:32:21 ifens5 /usr/sbin/kamailio[3855]: DEBUG: <core> [core/tcp_main.c:4554]: tcpconn_main_timeout(): entering timer for 0x7f759cb26218 (ticks=908866499, timeout=908866499 (0 s), wr_timeout=0 (211631299 s)), write queue: 0 bytes
In tcpdump I can see that the connection does not get closed immediately.
Is there some timer in the tcp stack which cleans up expired connections from time to time? Can I manipulate how often this timer runs? I couldn't find anything, and clearly even though I tell Kamailio to close the connection after 1 second, it doesn't do it.
Thanks for any input.
Regards,
Sebastian