(Off-topic)
Hello,
In about two weeks I will be a few days in Vienna (12h - 14th July).
If you want to meet for a drink to chat about Kamailio and other topics, just contact me off-list.
Thanks, and regards,
Henning
Hello,
I hope somebody could help me.
This is my scheme.
User-agent is behind NAT1. Kamailio and pbx are behind NAT2
[Client ip-phone 192.168.89.213 without stun] - LAN1 - NAT1(46.0.0.30) -
(internet) - (51.0.0.60)NAT2 - Local2 - (10.130.0.23:5060)kamailio(
10.130.0.23:5070) - pbx
*Questions*:
*1*. The VIA header (with 10.130.0.23 and 51.0.0.60) wasn't included in SIP
packets. Why? For example 200OK reply. It came from pbx through kamailio.
Which setting could break it?
Session Initiation …
[View More]Protocol (200)
Status-Line: SIP/2.0 200 OK
Message Header
Via: SIP/2.0/UDP 192.168.89.213:5060
;rport=9570;received=46.0.0.30;branch=z9hG4bK2480172053
Record-Route: <sip:c172.19.19.111.8348.call.cgatepro;lr>
Record-Route: <sip:172.19.19.111:5060;lr>
Record-Route: <sip:10.130.0.23:5070
;r2=on;lr;ftag=4268683942;nat=yes>,<sip:51.0.0.60;r2=on;lr;ftag=4268683942;nat=yes>
From: "Aleksey" <sip:a.yakimkin@mail.domain.ru:5060>;tag=4268683942
To: <sip:2961@mail.domain.ru:5060
>;tag=A03E2397-404246-FA7543E4_jizmelr-582D
Call-ID: 6_1903330087(a)192.168.89.213
[Generated Call-ID: 6_1903330087(a)192.168.89.213]
CSeq: 2 INVITE
Contact: <sip:signode-404246-FA7543E4_jizmelr-582D@172.19.19.111
;alias=51.0.0.60~5060~1>
Supported: 100rel,timer,replaces,histinfo,precondition
Allow: INVITE,BYE,CANCEL,ACK,OPTIONS,INFO,MESSAGE,PRACK,UPDATE,REFER
Session-Expires: 1800;refresher=uas
Content-Type: application/sdp
Content-Length: 1170
Message Body
*2*. About Registrar, Path and $du.
Phone set Register with headers:
Via: SIP/2.0/UDP 192.168.89.213:5060;branch=z9hG4bK2691182696
From: "Aleksey" <sip:a.yakimkin@mail.domain.ru:5060>;tag=3926879477
To: "Aleksey" <sip:a.yakimkin@mail.domain.ru:5060>
Contact: <sip:a.yakimkin@192.168.89.213:5060>
Kamailio respond
Via: SIP/2.0/UDP 192.168.89.213:5060
;rport=9570;received=46.0.0.30;branch=z9hG4bK617463686
Path: <sip:10.130.0.23:5070
;lr;received=46.0.0.30~9570~1;r2=on>,<sip:51.0.0.60;lr;received=46.0.0.30~9570~1;r2=on>
From: "Aleksey" <sip:a.yakimkin@mail.domain.ru:5060>;tag=3926879477
To: "Aleksey" <sip:a.yakimkin@mail.domain.ru:5060>;tag=194ED16D
Contact: <sip:a.yakimkin@192.168.89.213:5060>;expires=360
Contact: <sip:2447@192.168.89.221:5060>;expires=247
Contact: <sip:2447@192.168.9.16:5060>;expires=2116
I try to make a call from pbx to ip phone.
pbx inserts in Invite header Route: <sip:10.130.0.23:5070
;lr;received=46.0.0.30~9570~1;r2=on>
But kamailio relayed Invite direct to 192.168.89.213. (There is network
connectivity between ip-phone and kamailio through vpn). The code below
helps me to solve my issue. I saw mail-list with similar trouble. But no
setting could get kamailio to relay Invite to "Route-received" ip.
$var(the_route) = $hdr(Route);
$var(route0) = $(var(the_route){s.select,0,,});
$var(new_host) = $(var(route0){param.value,received}{s.select,0,~});
$var(new_port) = $(var(route0){param.value,received}{s.select,1,~});
if (!strempty($var(new_host)) && !strempty($var(new_port)) ) {
$du = "sip:" + $var(new_host) + ":" + $var(new_port);
}
*Kamailio settings:*
I have such listeners
listen=udp:10.130.0.23:5070 # to local network
listen=udp:10.130.0.23:5060 advertise 51.0.0.60:5060 # to internet
#MODULE SETTING
#---
# ----- jsonrpcs params -----
modparam("jsonrpcs", "pretty_format", 1)
/* set the path to RPC fifo control file */
# modparam("jsonrpcs", "fifo_name", "/var/run/kamailio/kamailio_rpc.fifo")
/* set the path to RPC unix socket control file */
# modparam("jsonrpcs", "dgram_socket",
"/var/run/kamailio/kamailio_rpc.sock")
modparam("path", "use_received", 1)
modparam("path", "enable_r2", 1)
modparam("path", "received_format", 1)
# ----- ctl params -----
/* set the path to RPC unix socket control file */
# modparam("ctl", "binrpc", "unix:/var/run/kamailio/kamailio_ctl")
# ----- tm params -----
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3)
# default retransmission timeout: 30sec
modparam("tm", "fr_timer", 30000)
# default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 120000)
modparam("tm", "auto_inv_100_reason", "Trying")
# ----- rr params -----
# set next param to 1 to add value to ;lr param (helps with some UAs)
modparam("rr", "enable_full_lr", 0)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 1)
modparam("rr", "enable_double_rr", 2)
modparam("rr", "force_send_socket", 1)
# ----- registrar params -----
modparam("registrar", "method_filtering", 1)
/* uncomment the next line to disable parallel forking via location */
# modparam("registrar", "append_branches", 0)
/* uncomment the next line not to allow more than 10 contacts per AOR */
# modparam("registrar", "max_contacts", 10)
/* max value for expires of registrations */
modparam("registrar", "max_expires", 3600)
/* set it to 1 to enable GRUU */
modparam("registrar", "gruu_enabled", 0)
modparam("registrar", "use_path", 1)
modparam("registrar", "path_use_received", 1)
modparam("registrar", "path_mode", 0)
#---
For register I use this code
route[REGISTRAR] {
...
add_path_received();
set_send_socket("udp:10.130.0.23:5070");
route(DISPATCH);
...
}
route[RELAY] {
...
if ($Ru eq "sip:10.130.0.23:5070") {
$fs = "udp:10.130.0.23:5060";
} else {
$fs = "udp:10.130.0.23:5070";
}
...
}
route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return;
#send INVITE to IP:PROT from Route:...;received=
$var(the_route) = $hdr(Route);
$var(route0) = $(var(the_route){s.select,0,,});
$var(new_host) = $(var(route0){param.value,received}{s.select,0,~});
$var(new_port) = $(var(route0){param.value,received}{s.select,1,~});
if (!strempty($var(new_host)) && !strempty($var(new_port)) ) {
$du = "sip:" + $var(new_host) + ":" + $var(new_port);
}
if (client_nat_test("3")) {
if(nat_uac_test("18")) {
if ($Ru == "sip:10.130.0.23:5070") {
rtpproxy_manage("co", "51.0.0.60"); #
fix_nated_sdp
} else {
rtpproxy_manage("co");
}
if (is_method("REGISTER")) {
#if ($Ru == "sip:10.130.0.23:5070") {
# fix_nated_contact();
#} else {
# set_contact_alias();
#}
set_contact_alias();
} else {
if(is_first_hop()) {
set_contact_alias();
} else {
add_contact_alias("51.0.0.60",
"5060", "udp");
#fix_nated_contact();
}
}
} else {
if ($Ru == "sip:10.130.0.23:5070") {
rtpproxy_manage("cor", "51.0.0.60"); #
fix_nated_sdp
} else {
rtpproxy_manage("cor");
}
}
} else {
rtpproxy_manage("co");
}
if (is_request()) {
if (!has_totag()) {
if(t_is_branch_route()) {
add_rr_param(";nat=yes");
#fix_contact();
}
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
if(is_first_hop())
set_contact_alias();
#} else {
#fix_contact();
#}
}
}
#!endif
return;
}
Thank you.
--
Best regards,
Alex
[View Less]
Hello,
We are looking to implement a system with one Kamailio server and multiple
rtpengine servers. I see that the rtpengine module allows the server
configuration to be stored in a database table with multiple entries, which
is perfect.
My question is - how does Kamailio distribute load between multiple
rtpengine servers in the same set?
If one of the rtpengine servers goes offline then will Kamailio note this
and not send calls to that server until it comes back online? If not then
…
[View More]presumably calls could be delayed by whatever the timeout for accessing a
server is?
Thank you very much,
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
[View Less]
Hello,
Kamailio SIP Server v5.6.1 stable release is out.
This is a maintenance release of the latest stable branch, 5.6, that
includes fixes since the release of v5.6.0. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.6.x. Deployments running previous v5.6.x
versions are strongly recommended to be upgraded to v5.6.1.
For more details about version 5.6.1 (including links and guidelines to
download the tarball or …
[View More]from GIT repository), visit:
* https://www.kamailio.org/w/2022/07/kamailio-v5-6-1-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Adding a short note that the dates of next Kamailio World Conference -
Online have been set for September 7-8, 2022. Event website and more
details will be published soon!
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
[View Less]
im using dns failover with tm module.
i set parameter reparse_on_dns_failover to 0 so that branch_route is called .
but when trying next peer of dns failover initial transaction branch_route is not called.
do i missing something ?
for the first peer branch_route is called and the peer timeout
so kamailio tries next peer but branch_route is not called !.
do i need again to set branch_route in failure_route ?
Thanks for help.
Hey All,
I'm just trying to change the From user before I do a 301 Redirect within a
Failure Route. Here's the code snippet:
$fu = "+15555555555";
append_to_reply("Contact: sip:+1$var(redirect_did)@$si:$sp\r\n");
t_reply("302", "Redirect");
The From user is not changed and msg_apply_changes() isn't allowed. What
am I doing wrong?
Thanks
Hi,
I am trying STIR/SHAKEN using libstirshaken in Kamailio 5.5.
I used a self signed certificate as this is just a test in the local docker
environment. However, when I try to add identity with private key
(stirshaken_add_identity_with_key), I get "[error_code: 447] Buffer for key
from file /tmp/cert/private.pem too short (2000 <= 3247)"
I have tried using 2048 and 4096 size
root@5907e44bd056:/tmp/cert# openssl rsa -in private.pem -text -noout |
grep "Private-Key"
RSA Private-Key: (4096 …
[View More]bit, 2 primes)
Could you tell me what is wrong with the certificate?
Kamailio version:
root@5907e44bd056:/usr/local/kamailio/etc/kamailio# kamailio -v
version: kamailio 5.5.4 (x86_64/linux) 469465
Error:
0(404) ERROR: {1 30587 INVITE NzIhM1-2YABveZZ1mPvs3m3tw8K7meSq} stirshaken
[stirshaken_mod.c:761]: ki_stirshaken_add_identity_with_key(): Failed to
load private key
0(404) DEBUG: {1 30587 INVITE NzIhM1-2YABveZZ1mPvs3m3tw8K7meSq} stirshaken
[stirshaken_mod.c:117]: stirshaken_print_error_details(): failure details:
0(404) DEBUG: {1 30587 INVITE NzIhM1-2YABveZZ1mPvs3m3tw8K7meSq} stirshaken
[stirshaken_mod.c:118]: stirshaken_print_error_details(): failure reason
is: src/stir_shaken_ssl.c:2112: [error_code: 447] Buffer for key from file
/tmp/cert/private.pem too short (2000 <= 3247)
0(404) DEBUG: {1 30587 INVITE NzIhM1-2YABveZZ1mPvs3m3tw8K7meSq} stirshaken
[stirshaken_mod.c:119]: stirshaken_print_error_details(): failure error
code is: 447
0(404) ERROR: {1 30587 INVITE NzIhM1-2YABveZZ1mPvs3m3tw8K7meSq} <script>:
Failed
Regards
*Maharaja Azhagiah*
[View Less]