Hi,
we run multiple rtpengine servers to share the load. Whenever we need
to take an rtpengine server offline, we used to just block the control
port via iptables, then no new calls ended up on this instance of
rtpengine. This worked pretty well in Kamailio 4.4.5.
However, since Kamailio 5.0, and the problem persists with 5.1.4,
Kamailio hangs almost immediately after we block the control port
traffic. In the log file there are almost no packets processed except
every few seconds, which looks like a timeout thing.
Did we configure anything wrong there? Or is the "dead rtpengine
detection" just broken?
Our configuration:
loadmodule "rtpengine.so"
modparam("rtpengine", "rtpengine_disable_tout", 120)
modparam("rtpengine", "setid_avp", "$avp(rtpsetid)")
modparam("rtpengine", "rtpengine_sock", "0 == udp:1.2.3.4:9001=2
udp:1.2.3.5:9001=2 udp:1.2.3.6:9001=2")
modparam("rtpengine", "rtpengine_sock", "1 == udp:2.3.4.5:9001=2")
Any help appreciated.
Regards,
Sebastian
Hi,
I run Kamailio 5.0.1 with MariaDB database.
There is no issue at the initialization, meaning the db is opened by
kamailio and the hash tables loaded from the db tables.
Example:
# kamcmd htable.dump propertiesHash
{
entry: 1
size: 1
slot: {
item: {
name: cfg.env
But the htable.reload command fails:
error: 500 - Failed to open htable db connection
The Kamailio log reports that it can't connect the db :
DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG:
io_watch_add(0x7f68c74ab300, 10, 3, 0xdc9410), fd_no=1
DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read:
new connection (1) on /var/run/kamailio//kamailio_ctl
DEBUG: <core> [core/sr_module.c:694]: find_mod_export_record():
find_export_record: found <db_bind_api> in module db_mysql
[/usr/lib64/kamailio/modules/db_mysql.so]
DEBUG: <core> [db.c:209]: db_bind_mod(): using db bind api for db_mysql
DEBUG: <core> [db.c:314]: db_do_init2(): connection 0x7f68cc354c10 not found
in pool
DEBUG: db_mysql [km_my_con.c:98]: db_mysql_new_connection(): opening
connection: mysql://xxxx:xxxx@/siprouter
ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection(): driver error:
Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2 "No such file or directory")
ERROR: <core> [db.c:318]: db_do_init2(): could not add connection to the
pool
ERROR: htable [ht_db.c:92]: ht_db_open_con(): failed to connect to the
database
My local db is located at /myqdata/mysiprdb/data where is the mysiprdb.sock
file. But the log shows that Kamailio is looking for
/var/lib/mysql/mysql.sock.
Does this error make sense to you ?
Is it possible to fix this problem by configuration in Kamailio ?
My kamailio.cfg script contains :
# ----- htable
modparam("htable", "db_url", "mysql://[kamailio]/siprouter")
modparam("htable", "fetch_rows", 1000)
modparam("htable", "htable", "mbxrangeHash=>size=4;dbtable=mbxrange;")
modparam("htable", "htable", "abpqHash=>size=12;dbtable=abpq;")
modparam("htable", "htable", "zabpqHash=>size=12;dbtable=zabpq;")
modparam("htable", "htable", "propertiesHash=>size=4;dbtable=properties;")
In the /myqdata/mysiprdb/data/my.cnf, I added the following entries for
Kamailio:
[kamailio]
socket = /myqdata/mysiprdb/data/mysiprdb.sock
user = siprouter
password = ##########
default-character-set = utf8
Thanks all for help.
Cordialement.
Patrick GINHOUX
One my server with perl external script time to time is stopping processing
SIP messages. Perl script make calls to kamailio database on mysql.
I have found this in logs
DEBUG: <core> [core/io_wait.h:380]: io_watch_add(): DBG:
io_watch_add(0x56427eb40c40, 495, 2, 0x7f1a9f9ba408), fd_no=33
DEBUG: <core> [core/io_wait.h:602]: io_watch_del(): DBG: io_watch_del
(0x56427eb40c40, 495, -1, 0x0) fd_no=34 called
DEBUG: <core> [core/tcp_main.c:4196]: handle_tcpconn_ev(): sending to
child, events 1
DEBUG: <core> [core/tcp_main.c:3871]: send2child(): WARNING: no free tcp
receiver, connection passed to the least busy one (56)
DEBUG: <core> [core/tcp_main.c:3875]: send2child(): selected tcp worker 4
20(24) for activity on [tcp:0.0.0.0:81], 0x7f1a9f9ba408
And no next messages.
How get info what is load on "tcp receiver". This host in dev mode and
handles not more 5 devices.
Sergey
Hello Henning,
thanks a lot for your response and explanation. strutils.[c,h] and
strcommon.[c,h] are almost the same. So I modified my included header from
stcommon[] to strutils as you mentioned.
Unfortunately, I surfed sequentially Kamailio version upgrades. Even
though, i did not found such hints about this modification. So I have some
doubts the called headers and codes from our own module. Hence, I am asking
for yor advice.
What I am trying to do now is compiliing our module separately under it is
own directory so I gain the Shared Object file (.so). Somehow our Module is
requring cds, presence and xcap libraries. But the strange thing is that
headers from these libraries are #including other headers assuming these
included header files are under the same library's directory (but in fact
most of the header files are under ../src/core/). For example :
Making in cds
CC (gcc) [L libser_cds.so.0.1] cds.o
In file included from cds.c:2:
/Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/memory.h:125:21:
warning: mem/mem.h: No such file or directory
/Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/memory.h:126:25:
warning: mem/shm_mem.h: No such file or directory
In file included from cds.c:3:
/Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/sync.h:30:22:
warning: locking.h: No such file or directory
In file included from cds.c:4:
/Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/logger.h:42:20:
error: dprint.h: No such file or directory
make[2]: *** [cds.o] Error 1
make[1]: [cds] Error 2 (ignored)
Those libraries are delivered with version 5.1.4 itself so i do not think
it is a good idea to modify the paths of the included header files to
compile my module. because most probably these libraries are needed by
standard default modules of kamailio.
I hope this is not too much for you to inspect.
Note: The attached has the log files ( resulting from make all and install
) .
Your kind response is highly appreciated
BR
Abdulaziz
On Thu, Aug 9, 2018 at 11:31 AM, Abdulaziz Alghosh <aziz647(a)gmail.com>
wrote:
> Hello Henning,
>
> thanks a lot for your response and explanation. strutils.[c,h] and
> strcommon.[c,h] are almost the same. So I modified my included header from
> stcommon[] to strutils as you mentioned.
> Unfortunately, I surfed sequentially Kamailio version upgrades. Even
> though, i did not found such hints about this modification. So I have some
> doubts the called headers and codes from our own module. Hence, I am asking
> for yor advice.
>
> What I am trying to do now is compiliing our module separately under it is
> own directory so I gain the Shared Object file (.so). Somehow our Module is
> requring cds, presence and xcap libraries. But the strange thing is that
> headers from these libraries are #including other headers assuming these
> included header files are under the same library's directory (but in fact
> most of the header files are under ../src/core/). For example :
>
> Making in cds
> CC (gcc) [L libser_cds.so.0.1] cds.o
> In file included from cds.c:2:
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/memory.h:125:21:
> warning: mem/mem.h: No such file or directory
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/memory.h:126:25:
> warning: mem/shm_mem.h: No such file or directory
> In file included from cds.c:3:
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/sync.h:30:22:
> warning: locking.h: No such file or directory
> In file included from cds.c:4:
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/logger.h:42:20:
> error: dprint.h: No such file or directory
> make[2]: *** [cds.o] Error 1
> make[1]: [cds] Error 2 (ignored)
>
>
> Those libraries are delivered with version 5.1.4 itself so i do not think
> it is a good idea to modify the paths of the included header files to
> compile my module. because most probably these libraries are needed by
> standard default modules of kamailio.
>
> I hope this is not too much for you to inspect.
> Note: The attached has the log files ( resulting from make all and install
> ) .
>
> Your kind response is highly appreciated
> Abdulaziz
>
>
> On Thu, Aug 9, 2018 at 8:11 AM, Henning Westerholt <hw(a)kamailio.org>
> wrote:
>
>> Am Mittwoch, 8. August 2018, 17:47:07 CEST schrieb Abdulaziz Alghosh:
>> > i am somehow newbie with Kamailio and trying to migrate from kamailio
>> > version 3.0.3 to 5.1.4. Former fellows had developed own modules which
>> > needed "strcommon.h" and "strcommon.c".
>> >
>> > These last two files are not delievered with version 5.1.4. but I copied
>> > them under ../src/core/ thinking it would be beneficial. Unfortunately,
>> > after make prefix / (and including our own module) all, it seem that
>> > several dependencies exist. Especially from header files under
>> > ..src/lib/xcap/ and ../src/lib/presence
>> >
>> > Can somebody tell me how "strcommon.h" and "strcommon.c" where
>> replaced in
>> > version 5.1.4 ?
>>
>> Hello Abdul,
>>
>> the functions in strcommon.[c,h] were moved into src/core/strutils.[c,h]
>> in
>> releases starting from 5.0. I'd suggest to have a look to the file to
>> verify
>> if there are no other changes.
>>
>> Best regards,
>>
>> Henning
>> --
>> Henning Westerholt
>> https://skalatan.de/blog/
>>
>
>
Greetings,
i am somehow newbie with Kamailio and trying to migrate from kamailio
version 3.0.3 to 5.1.4. Former fellows had developed own modules which
needed "strcommon.h" and "strcommon.c".
These last two files are not delievered with version 5.1.4. but I copied
them under ../src/core/ thinking it would be beneficial. Unfortunately,
after make prefix / (and including our own module) all, it seem that
several dependencies exist. Especially from header files under
..src/lib/xcap/ and ../src/lib/presence
Can somebody tell me how "strcommon.h" and "strcommon.c" where replaced in
version 5.1.4 ?
Best regards
Abdul Aziz
Hi,
Following a problem with the kamcmd htable.reload with Kamailio 5.0.1 (see
related thread for this), I have upgraded to the 5.0.7 level (with some
difficulties due to my specific environment).
My server runs the RHEL 7.4 distribution.
Now the upgrade is complete, I notice that that are changes not really
documented:
- The kamailio-perl-5.0.7-1.el7.x86_64.rpm requires to install the
mod_perl module that doesn't exist anymore in RHEL 7. It needs to be
installed from the EPEL repository
- The init script for kamailio has been changed from the old method
to the fully compliant method for system unit for RHEL 7 for example:
With the 5.0.1 level we have the "/etc/rc.d/init.d/kamailio"
With the 5.0.7 level we have now the
"/usr/lib/systemd/system/kamailio.service"
So my questions/comments are :
- Why the mod_perl module is required between 5.0.1 and 5.0.7
(question posted in the attached message) ?
- In the previous kamailo init script, I added a condition to start
MySQL before kamailio by adding this entry in the script : # Required-Start:
$syslog $network $mysqld
The new script contains the After command :
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
After=network.target
Should I change the After line with this : After=network.target mysql.target
to have the same condition?
In all the cases, some documentation must be changed to provide more
details.
Thanks in advance for the answers.
Cordialement.
Patrick GINHOUX
Hi,
We have an RTPEngine that occasionally finds itself in this state of CPU
usage:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25476 root 20 0 2929600 80820 1900 S 156.2 0.1 259:05.54 rtpengine
The journal is a dizzying stream of:
Aug 06 20:58:47 gw1 rtpengine[25476]: ERR: [1074537188_44545952 port 61666]: Too many packets in UDP receive queue (more than 50), aborting loop. Dropped packets possible
It eventually leads to increasing CPU usage and a degeneration of audio
quality until RTPEngine is restarted.
It would be appreciated if someone could shed some light on the nature
of this queue and what we can do about this problem. Is this referring
to a netfilter packet forwarding queue, or is it a receive queue of the
RTPengine user space control process? Can its size be increased or
tweaked with kernel parameters?
Thanks,
-- Alex
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Hello
i don't know if the question is related to this list, but as far as i'm
using Kamailio i though i should ask here
i'm using Kamailio and sems as media server, the audio is passing through
fine but when it comes to Video, SEMS block it, in the outgoing SDP m=video
is removed with it's codec
my question is does sems support Video ? or is there any tuning for sems to
allow Video media streams ?
Cheers
Amar
Hello Guys,
We are having a Meetup for Telecommunication Geeks. We are talking around
Opensource Technology for building telecommunication solution.
Here's the agenda for our first meetup. We do have one slot open. Please
contact us or drop a comment if you want to present. Hoping that everyone
would have fun geeking out on telecom and voip tech.
10:00 - 10:25 - How VOIP is changing the Communication landscape - Rajat
Dwivedi
10:30 - 10:55 - Generic VoIP Solutions on the cloud - Chandra Prakash Singh
10:55 - 11:10 - Break
11:10 - 11:35 - Developing VoIP solutions using Open Source Tech - Surendra
Tiwari
11:40 - 12:05 - WebRTC: Telephony in your browser - Altanai Bisht
12:05 - 12:30 - Open Slot (looking for speakers)
12:30 - 1:30 - Lunch + Networking
13:30 - 14:15 - Birds of a Feather Session (BoF)
Please RSVP.
With Regards,
Surendra Tiwari
VoIP Application Developer,
Plivo Comm
+91-9967609476
I am using Kamailio (5.0.1) and MSILO module for offline messages but I have a problem with users behind NAT.
According to module overview, MSILO is forwarding the offline messages to contact address provided in REGISTER request.
Is there any way to overcome this and send the messages to the external client IP?
Thanks,
Michalis Michael