Hi All,
I'm trying to configured kamailio as TLS server with below configuration
(tls.cfg) and TLS server is started successfully.
[server:default]
method = TLSv1+
verify_certificate = yes
require_certificate = yes
private_key = ./sip/server.key
certificate = ./sip/server.crt
ca_list = ./bundle.crt
crl = ./sip_crl.pem
verify_depth = 9
[client:default]
verify_certificate = no
require_certificate = no
TLS connection works fine.
Later i have updated the sip_crl.pem with server certificate revoked
details and performed tls.reload command to load the latest update.
After this I expect any TLS client trying to establish TLS connection
should fail, as the client and server certificates are signed by same
authority and server certificate is revoked. But the clients are able to
establish TLS connection without any errors.
I'm not getting any traces to confirm CRL validation has been performed
before accepting the TLS connection.
Any advice would be help to proceed with evaluating CRL functionality.
-Amar
Hi folks,
Trying to implement CPS throttling based on this
<https://lists.kamailio.org/pipermail/sr-users/2013-September/079713.html>article,
having some trouble.
modparam("htable", "htable", "rhs=>size=32;initval=0;autoexpire=300;"
modparam("htable", "htable", "rhm=>size=32;initval=0;autoexpire=1800;")
route[CPS] {
$var(rateHashSec) = $si+":sec:"+$timef(%Y/%m/%d_%H_%M_%S);
$var(rateHashMin) = $si+":min:"+$timef(%Y/%m/%d_%H_%M_00);
xlog("L_INFO", "var(rateHashSec)=$var(rateHashSec);
var(rateHashMin)=$var(rateHashMin)\n");
$var(ratePerSec) = $shtinc(rhs=>$var(rateHashSec));
$var(ratePerMin) = $shtinc(rhm=>$var(rateHashMin));
xlog("L_INFO", "var(ratePerSec)=$var(ratePerSec);
var(ratePerMin)=$var(ratePerMin)\n");
$var(limitPerSec) = 1;
$var(limitPerMin) = 1;
if ($var(ratePerSec) > $var(limitPerSec) || $var(ratePerMin) >
$var(limitPerMin)) {
xlog("L_INFO", "CPS Limit on IP $si\n");
send_reply("503", "CPS Limit on IP $si");
exit;
}
}
Logs show hashes are created but *$var(ratePerSec/Min)* won't increment no
matter how many calls I place per second or minute:
Jul 9 14:35:52 proxy /usr/local/sbin/kamailio[1484]: INFO: <script>:
var(rateHashSec)=65.39.XX.XX:sec:2018/07/09_14_35_52;
var(rateHashMin)=65.39.XX.XX:min:2018/07/09_14_35_00
Jul 9 14:35:52 proxy /usr/local/sbin/kamailio[1484]: INFO: <script>:
var(ratePerSec)=0; var(ratePerMin)=0
Much obliged.
--Sergiu
Hi All,
When we are using the kamailio to handle around 70 INVITE's per second, kamailio is sending 100 Trying with the delay of around 3-4sec for few INVITE's.
How can I reduce the delay in 100 Trying?
Also, I tried increasing the number of threads for SIP routing processes. This doesnt seem to help.
Also tried "modparam("tm", "auto_inv_100", 0)" . This is not working.
Please help.
Thank you,
Vivek.
Hello,
In RTPEngine recording-daemon, I enabled "forward-to" option to
unix_socket. All things work right, I got metadata at first, then
media packets (RTP-UDP-IP).
The metadata for each calls is received just at first packet, but i
want to know, if i have more than one concurrent active call in
RTPEngine, How can i distinct which media packet was from which call?
Thanks with Regards.
--Mojtaba Esfandiari.S
Dear all,
I have kamailio 5.0.6 and I have an issue to add permanent location
When I add a location with :
kamcmd ul.add location_ch demo(a)peoplefone.ch sip: demo@95.128.80.122:5060 0 0.0 . 0 128 6111 . udp:95.128.80.3:5060
then I get the following insertion:
kamcmd ul.lookup location_ch demo@
{
AoR: demo
Contacts: {
Contact: {
Address: sip:demo@95.128.80.122:5060
Expires: permanent
Q: 0.000000
Call-ID: dfjrewr12386fd6-343(a)kamailio.mi
CSeq: 1
User-Agent: SIP Router MI Server
Received: [not set]
Path: .
State: CS_SYNC
Flags: 0
CFlags: 128
Socket: [not set]
Methods: 6111
Ruid: ulcx-5b243cb5-67c6-31
Instance: [not set]
Reg-Id: 0
Server-Id: 0
Tcpconn-Id: 0
Keepalive: 0
Last-Keepalive: 0
Last-Modified: 0
}
}
As you can see the Path value is set to "." But it must be set to [not set]
The Socket is also not set.
Any idea ?
BR
Laurent
Hello,
starting here a discussion about an issue with the database API and
signed/unsigned number type to see how to address it.
So far, the database API supported only signed types for numbers,
respectively DB1_INT (int in c) and DB1_BIGINT (long long in c).
However, many database table columns are defined as UNSIGNED INT or
UNSIGNED BIGINT. The database connector modules are mapping UNSIGED
values retrieved from database over signed fields in DB API structure.
The other way around is done as well: signed values are the inserted in
the unsigned columns.
There is no issue if the value in C is a positive number, however, if
the value goes over MAX_UINT/2 (over 2147483647), it becomes negative
and inserting the value in database results in an exception and 0 being
stored instead.
So far, I guess the issue was rarely exposed, if at all, because no
report on it, even these data types for DB1 are since the SER project
was started in 2001. As I looked at database definition schema, most of
unsigned columns are for internal flags or ids (e.g., lcr_id), where I
guess no large values were used or needed so far.
However, it can bite at any time and needs to be addressed. So far, two
solutions come in mind:
1) drop using UNSIGNED INT for those db columns, use only INT and do
unsigned cast in the C code when reading and cast to int when writing.
2) update the db connector modules to support unsigned types -- I added
support for them in DB API, but each db_* module has to be updated. The
also each module that uses UNSIGNED DB columns must be updated
1) should be simpler, 2) more work but better in long term
Any other ideas? Which of the options you prefer to go for?
Not to forget: somehow related, probably we have to switch from int to
long for PV number values, otherwise timestamp variables can go negative
once unix timestamp approaches MAX_UINT/2 (still plenty of time, but
should not be delayed for long ...).
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com
Hi, I'm encountering an issue where calling keep_codecs_by_name does not
modify the SDP on the INVITE unless I call the "evil function"
msg_apply_changes
Any help is welcome,
Thanks,
Enrico.
Greetings list.
This might not be related to Kamailio but I thought someone would be able
to give a hand in resolving dependency during the installation of rtpengine
on Debian 8 Jessie.
It is complaining about below dependencies.
root@debian-769mb-miami-01:/usr/src/rtpengine# dpkg-buildpackage
dpkg-buildpackage: source package ngcp-rtpengine
dpkg-buildpackage: source version 6.3.0.0+0~mr6.3.0.0
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Sipwise Jenkins Builder <
jenkins(a)sipwise.com>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build rtpengine
dpkg-source: info: using options from rtpengine/debian/source/options:
--extend-diff-ignore=.gitreview
dpkg-checkbuilddeps: *Unmet build dependencies: debhelper (>= 10~)
libbcg729-dev*
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied;
aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
I tried to install debhelper from deb but complained from dh-autoreconf and
that itself complained abount debhelpler. So, no one is being installed.
Also, If someone can help me how to resolve dependency for libbcg729-dev
too.
Any pointer or hint or link to some installation guide would be more than
welcome.
Br, Aqs.
Hi all,
I installed RTPEngine (Version: 6.4.0.0+0~mr6.4.0.0
git-master-4eb80da) in my VM machine (Debian GNU/Linux 8 (jessie), i
also installed kamailio 5.1.
In kamailio routes, i have:
route {
...
#rtpengine_manage("record-call")
rtpengine_manage();
start_recording();
...
}
Here is all other configuration files:
In /etc/default/ngcp-rtpengine-daemon file:
RUN_RTPENGINE=yes
CONFIG_FILE=/etc/rtpengine/rtpengine.conf
CONFIG_SECTION=rtpengine
PIDFILE=/var/run/ngcp-rtpengine-daemon.pid
MANAGE_IPTABLES=yes
TABLE=0
In /etc/default/ngcp-rtpengine-recording-daemon file:
RUN_RTPENGINE_RECORDING=yes
CONFIG_FILE=/etc/rtpengine/rtpengine-recording.conf
CONFIG_SECTION=rtpengine-recording
PIDFILE=/var/run/ngcp-rtpengine-recording-daemon.pid
MUST_NFS=no
NFS_HOST=192.168.1.1
NFS_REMOTE_PATH=/var/recordings
NFS_LOCAL_MOUNT=/var/lib/rtpengine-recording # must match output-dir if used
NFS_OPTIONS=hard,intr,tcp
In /etc/rtpengine/rtpengine.conf file:
[rtpengine]
table = 0
interface = 192.168.122.200
listen-ng = 127.0.0.1:2223
recording-dir = /var/spool/rtpengine/
recording-method = proc
In
[rtpengine-recording]
table = 0
# output-storage = db (use default)
# output-format = mp3 (use default)
# output-mixed = 1
spool-dir = /var/spool/rtpengine/metadata
output-dir = /var/spool/rtpengine/recording
But the recording is not work, I have these issues in syslog:
[1530178531.860171] INFO:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Received command
'start recording' from 127.0.0.1:38654
[1530178531.860191] NOTICE:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Turning on call
recording.
[1530178531.860239] WARNING:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Call recording through
/proc interface requested, but kernel table not open
[1530178531.860262] ERR:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Failed to open
recording metadata file '(null)' for writing: Bad address
[1530178531.860269] ERR:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Failed to open
recording metadata file '(null)' for writing: Bad address
[1530178531.860275] ERR:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Failed to open
recording metadata file '(null)' for writing: Bad address
[1530178531.860281] ERR:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Failed to open
recording metadata file '(null)' for writing: Bad address
[1530178531.860287] ERR:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Failed to open
recording metadata file '(null)' for writing: Bad address
[1530178531.860292] ERR:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Failed to open
recording metadata file '(null)' for writing: Bad address
[1530178531.860303] INFO:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Replying to 'start
recording' from 127.0.0.1:38654 (elapsed time 0.000112 sec)
[1530178531.969040] INFO:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Received command
'start recording' from 127.0.0.1:39374
[1530178531.969069] INFO:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Replying to 'start
recording' from 127.0.0.1:39374 (elapsed time 0.000004 sec)
[1530178537.176906] INFO:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Received command
'delete' from 127.0.0.1:40258
[1530178537.177003] INFO:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Scheduling deletion of
call branch '9052b05a' (via-branch '') in 30 seconds
[1530178537.177026] INFO:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Replying to 'delete'
from 127.0.0.1:40258 (elapsed time 0.000084 sec)
[1530178537.178368] INFO:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Received command
'start recording' from 127.0.0.1:40258
[1530178537.178392] INFO:
[MWFhMWM4MmVhYjFmYjY3MzVlZDlmZWMyYjNmNGVhNmY.]: Replying to 'start
recording' from 127.0.0.1:40258 (elapsed time 0.000004 sec)
^C[1530178543.752740] INFO: Version 6.4.0.0+0~mr6.4.0.0
git-master-4eb80da shutting down
Also when i start RTPEngine, I have FATAL error about module
xt_RTPENGINEer in syslog:
Jun 28 05:44:58 debian8 systemd[1]: Starting NGCP RTP/media Proxy Daemon...
Jun 28 05:44:58 debian8 ngcp-rtpengine-iptables-setup[10203]:
modprobe: FATAL: Module xt_RTPENGINE not found.
Jun 28 05:44:58 debian8 ngcp-rtpengine-iptables-setup[10203]:
iptables: No chain/target/match by that name.
Jun 28 05:44:58 debian8 ngcp-rtpengine-iptables-setup[10203]:
ip6tables: No chain/target/match by that name.
Jun 28 05:44:58 debian8 systemd[1]: Started NGCP RTP/media Proxy Daemon.
Jun 28 05:44:58 debian8 rtpengine[10219]: [1530179098.989322] INFO:
Generating new DTLS certificate
Jun 28 05:44:59 debian8 rtpengine[10219]: [1530179099.033499] ERR:
FAILED TO CREATE KERNEL TABLE 0 (No such file or directory), KERNEL
FORWARDING DISABLED
J
Let me know what is the problem and how can i solve it?
--
--Mojtaba Esfandiari.S
Hi,
I would like to setup up my SIP server / PBX for my business, now we have
some candidates:
1. Open source solution:
- Asterisk PBX,
- Freeswitch PBX
- Kamailio
- OpenSIPS
2. Business solution:
- Brekeke PBX(https://www.brekeke.com
- Vodia PBX(https://www.vodia.com)
- 3CX PBX(https://www.3cx.com)
- PortSIP PBX(https://www.portsip.com/portsip-pbx)
*Below features are mandatory for our project:*
- Video call recording (For the finance industry, the video recording is
necessary)
- Push notifications for mobile app
- Multi-tenant support
- Both Linux and Windows support (at 1st stage, we would like to run it
on Windows server and migrate it to Linux server in the future if users
increased), the Linux support is required, the Windows support is preferred.
We have some questions:
1. Does the the Kamailio can works as a PBX ?
2. If yes, does the Kamailio support push notifications and video
recording ?
3. Does the Kamailio can works for Multi-tenant ?
4. Does Kamailio support Windows ?
So far according to our research, with the business solution:
- The Vodia PBX, PortSIP PBX and brrekeke all are support Multi-tenant,
the 3CX is not.
- The 3CX and PortSIP support push notifications,
- The PortSIP also provide client SDK, with 3CX we only see the 3CX
provide client apps, does 3CX has client SDK provided ?
- It's seems all these PBX are support video recording ?
- The PortSIP PBX and 3CX both support Linux.
Please help me to make the decision, base on your experiences, which one
(open source or business solution) is good to us ? I'm really new to
VoIP...
Thanks in advance.
Best regards,