Hey guys and girls,
I'm trying to configure Kamailio so that I can communicate over it using WebRTC and SIP.
Client 1 is a softphone based on SIPJS. Client 2 is a Yealink phone.
Both are registered with the Kamailio. Behind the Kamailio there is another Asterisk. The Kamailio acts as a proxy here.
So far everything works. Only if I accept the call, which is made from Client 1 to Client 2 or vice versa, then I get this error in Client 1:
Called with SDP without DTLS fingerprint. I can see that the fingerprint is present in the INVITE from Client 1 to Client 2. However, it is missing in the OK.
The lower part contains my NATMANAGE config. This could probably be optimized a lot, but for now it should work.
Unfortunately I have only recently started with Kamailio. I hope you can help me there. I can also send you the SIP-Log if you want to.
Many thanks in advance.
Greetings Benny
route[NATMANAGE] {
if (is_request()) {
if(has_totag()) {
if (check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
if (check_route_param("rtp=bridge")) {
setbflag(FLB_BRIDGE);
}
if (check_route_param("rtp=ws")) {
setbflag(FLB_RTPWS);
}
}
}
if (!isbflagset(FLB_BRIDGE)) {
return;
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB) || isbflagset(FLB_RTPWS))) {
return;
}
$xavp(r=>$T_branch_idx) = "replace-origin replace-session-connection";
if (!nat_uac_test("8")) {
xlog("IS TRUSTED");
$xavp(r=>$T_branch_idx) = $xavp(r=>$T_branch_idx) + " trust-address";
}
if (is_request()) {
if (!has_totag()) {
if (!t_is_failure_route()) {
$avp(extra_id) = @via[1].branch + $T_branch_idx;
$xavp(r=>$T_branch_idx) = $xavp(r=>$T_branch_idx) + " via-branch=extra";
xlog("BRANCH: $T_branch_idx");
}
}
}
if (is_reply()) {
$avp(extra_id) = @via[2].branch + $T_branch_idx;
$xavp(r=>$T_branch_idx) = $xavp(r=>$T_branch_idx) + " via-branch=extra";
xlog("BRANCH: $T_branch_idx");
}
if(isbflagset(FLB_RTPWS)){
xlog("IS WS");
if(is_request()){
xlog("IS REQUEST");
if ($proto =~ "ws") {
xlog("WEB --> SIP");
$xavp(r=>$T_branch_idx) = $xavp(r=>$T_branch_idx) + " rtcp-mux-demux DTLS=off SDES-off ICE=remove RTP/AVP";
rtpengine_manage($xavp(r=>$T_branch_idx));
if (route(FROMASTERISK)) {
xlog("FROM INTERNAL");
} else {
xlog("FROM EXTERNAL");
rtpengine_manage(" direction=external direction=internal ICE=remove loop-protect");
}
} else {
xlog("SIP --> WEB");
$xavp(r=>$T_branch_idx) = $xavp(r=>$T_branch_idx) + " rtcp-mux-offer generate-mid DTLS=passive SDES-off ICE=force RTP/SAVPF direction=internal direction=external loop-protect";
}
} else {
xlog("IS RESPONSE");
if ($proto =~ "ws") {
xlog("WEB --> SIP");
$xavp(r=>$T_branch_idx) = $xavp(r=>$T_branch_idx) + " rtcp-mux-demux DTLS=off SDES-off ICE=remove RTP/AVP direction=external direction=internal loop-protect";
} else {
xlog("SIP --> WEB");
$xavp(r=>$T_branch_idx) = $xavp(r=>$T_branch_idx) + " rtcp-mux-offer generate-mid DTLS=passive SDES-off ICE=force RTP/SAVPF direction=internal direction=external loop-protect";
}
rtpengine_manage($xavp(r=>$T_branch_idx));
}
} else {
xlog("SIP --> SIP");
if (route(FROMASTERISK)) {
xlog("FROM INTERNAL");
rtpengine_manage(" direction=internal direction=external ICE=remove loop-protect");
} else {
xlog("FROM EXTERNAL");
rtpengine_manage(" direction=external direction=internal ICE=remove loop-protect");
}
}
xlog("NATMANAGE branch_id:$T_branch_idx ruri: $ru, method:$rm, status:$rs, extra_id: $avp(extra_id), rtpengine_manage: $xavp(r=>$T_branch_idx)\n");
if (is_request()) {
if (!has_totag()) {
if (t_is_branch_route()) {
if (isbflagset(FLB_NATB)) {
add_rr_param(";nat=yes");
}
if (isbflagset(FLB_BRIDGE)) {
add_rr_param(";rtp=bridge");
}
if (isbflagset(FLB_RTPWS)) {
add_rr_param(";rtp=ws");
}
}
}
}
if (is_reply()) {
if (isbflagset(FLB_NATB)) {
if (is_first_hop()) {
if (af == INET) {
set_contact_alias();
}
}
}
}
return;
}
Hi,
How to install Diameter server module (IMS_DIAMETER_SERVER) using apt-get
package. I need to have DRA in my application. Can anybody please help on
this on how to install and how to use it.
Kindly help.
Thanks,
Pavithra
Dear Community,
Call scenario:
Calling number 33825462354
Called number 44656646820
UAC (IP=1.1.1.1) => Kamailio (IP=2.2.2.2) => SIP proxy (IP=3.3.3.3)
I stocked on strange issue with module TOPOS_REDIS and PRACK message
(IP=2.2.2.2 kamailio version 5.2.3).
Configuration with module TOPOS works, but because of a lot of calls we
would like to use TOPOS_REDIS (avoid mysql).
I already check this:
https://lists.kamailio.org/pipermail/sr-users/2018-May/101641.html and I
already have fixed version of module.
In attach you can find traces (pcap file and kamailio log with debug=4)
Your help will be greatly appreciated
Kind Regards
Ernest Mavrel
Hello,
Is there any way to use Regex or 'OR/AND' operators in the switch/case
statements?
I've tried the following syntax but it's not working, are there any other
ways to do this?
switch($dlg_var(ISP)) {
case "TRUNK1|TRUNK2":
}
Thank you.
Hey guys,
Is this the right place to ask about rtpengine (ngcp) related issues with
kernel packet forwarding?
Thanks.
--
Andy Chen
Sr. Telephony Lead Engineer
achen@ <achen(a)thinkingphones.com>fuze.com
--
*Confidentiality Notice: The information contained in this e-mail and any
attachments may be confidential. If you are not an intended recipient, you
are hereby notified that any dissemination, distribution or copying of this
e-mail is strictly prohibited. If you have received this e-mail in error,
please notify the sender and permanently delete the e-mail and any
attachments immediately. You should not retain, copy or use this e-mail or
any attachment for any purpose, nor disclose all or any part of the
contents to any other person. Thank you.*
Hi,
I am working with kamailio IMS 5.3.5. I am trying to connect kamailio IMS
with 5g core. Did anybody come across this scenario. If so, Please help me
how Rx interface works with 5g and how UDM and HSS can be an converged
application incase of 5g.
Kindly help as it is an urgent requirement.
Thanks,
Pavithra
Hello,
I am a new user and i am trying to use kamailio as remote sip server for
clients (softphones particularly)
The error message is "SIP: SIP/2.0 403 Not relaying"
The kamailio listens with one public ip address in a datacenter ( linux
debian).
root@vmdeb1:~# kamctl version
/usr/sbin/kamctl 5.2.0
The xlog shows that the register message arrives in kamailio.
I am sure that the user 410 exists.
I have added the remote public address to address via kamctl.
I have added the location via ul add command.
I am not sure about kamailio.cfg because most of it except the tls is the
default.
I would appreciate your help.
Alexandros
Hello ,
I am using the usrloc module to store registrations. I could not find any
way to remove stale registrations before expires time. Most of the
registrations are mobile app so they wont run in background to save battery
of phone hence we end up having lots of registrations in usrloc which were
not removed because app was killed in background by OS without letting it
send unregister request.
Is there any way to remove stale registrations before expires time from
usrloc ?
--
Thanks,
Sagar
Hi,
I checked rtpengine's documentation, and I wonder what happens if I use
SRTP-DTLS with rtpengine? My connection will be hop by hop encrypted with
rtpengine, or like TURN my connection will remain end-to-end encrypted??
Thx a lot