Hey All,
I always have issues with substituting out header values. I’ve tried subst and subst_hf.
Here is the value that I want to change out:
Contact: <sip:52.41.52.34:5060;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC <sip:52.41.52.34:5060;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC>>
And this is what I want it to be
Contact: <sip:1313717555@jump.dsiprouter.net <sip:1313717555@jump.dsiprouter.net>;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC>
I’m using this
subst('/^Contact: <sip:(.*);(.*)>$/Contact: <sip:1313717555@jump.dsiprouter.net;\2 <sip:1313717555@jump.dsiprouter.net;\2>>\r/ig’);
And it doesn’t work, but putting into a online regular expression tester it looks good as shown below. Any ideas?
Hi,
I have configured p-cscf ,icscf, scscf , hss in different vms and I am able
to get the registration successful. I am using zoiper client and kamailio
version 5.3.3.
After the registration , when I try to make a call, it is showing
403 , Domain not served
In my scscf TCP dump .
What is this error and how to solve this .
Kindly help me asap since I am facing this issue for a week and struggling
to resolve it .
Thanks.
Hey All,
I always have issues with substituting out header values. I’ve tried subst and subst_hf.
Here is the value that I want to change out:
Contact: <sip:52.41.52.34:5060;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC>
And this is what I want it to be
Contact: <sip:1313717555@jump.dsiprouter.net <sip:1313717555@jump.dsiprouter.net>;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC>
I’m using this
subst('/^Contact: <sip:(.*);(.*)>$/Contact: <sip:1313717555@jump.dsiprouter.net;\2>\r/ig’);
And it doesn’t work, but putting into a online regular expression tester it looks good as shown below. Any ideas?
Hi. Well issue already described there :
https://github.com/kamailio/kamailio/issues/2271
I will be really happy if somebody point me what exactly i have to do to
route 404 answer from Registar to UA.
If i understand right, in moment when registrar generate 404 i have to
see in log message which generated inside onreply_route[REPLYROUTE]
but in current moment i not see it and 404 not transmitted to UA. And it
just silently ignored by Kamailio.
In case if i am right and this is a bug in Kamailio please point me what
words i have to use to prove that this is really bug.
In current moment routing config looks like :
request_route
{
# per request initial checks
route(REQINIT);
route(CATCH_CANCEL);
route(RR_PARSE);
route(REGISTRATION);
xlog("L_INFO", "Initial relay packet\n");
$du = "sip:10.34.64.2:5060";
route(FORWARD);
# update $du to set the destination address for proxying
exit;
}
route[CATCH_CANCEL]
{
if (is_method("CANCEL") == true)
{
if (t_check_trans() == true)
{
route(FORWARD);
}
sl_reply("500", "Internal Server Error");
drop;
}
}
route[RR_PARSE]
{
if(loose_route() == true )
{
xlog("L_INFO", "RR-enforced\n");
append_hf("P-hint: rr-enforced\r\n");
route(FORWARD);
} else
{
xlog("L_INFO", "RR simple\n");
record_route();
}
}
route[REGISTRATION]
{
if(is_method("REGISTER") == true)
{
add_path_received();
append_hf("Supported: path\r\n");
xlog("L_INFO", "GOT REGISTER\n");
}
}
# Per SIP request initial checks
route[REQINIT]
{
if($ua =~ "friendly-scanner|sipcli|VaxSIPUserAgent") {
# silent drop for scanners - uncomment next line if
want to reply
# sl_send_reply("200", "OK");
exit;
}
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}
if(is_method("OPTIONS") && uri==myself && $rU==$null) {
sl_send_reply("200","Keepalive");
exit;
}
if(!sanity_check("1511", "7")) {
xlog("Malformed SIP message from $si:$sp\n");
exit;
}
}
route[FORWARD]
{
t_on_failure("FAILROUTE");
t_on_reply("REPLYROUTE");
if(t_relay() <= 0)
{
sl_reply_error();
}
drop;
}
onreply_route[REPLYROUTE]
{
xlog("Reply SIP message from $si:$sp\n");
if (t_check_trans() == false)
{
drop;
}
}
failure_route[FAILROUTE]
{
xlog("Reply Fail SIP message from $si:$sp\n");
}
Hi
I have a kamailio 5.1.2 as load balancer and registration offloading,
but I have a problem with the max tcp connections that it can handle.
I suspect that is a linux limit, but I don't find the reason or config.
When that limit arrives, I can't connect to kamailio and I receive
"Connection reset by peer", but I can't view any error message in the
logs.
If I check the connections in kamailio, I view that it have "free" connections:
# kamctl kamcmd core.tcp_info
{
readers: 8
max_connections: 4096
max_tls_connections: 2048
opened_connections: 2655
opened_tls_connections: 0
write_queued_bytes: 0
}
I have this configs in kamailio.conf (related to tcp)
disable_tcp=no
tcp_connection_lifetime=3610
tcp_connect_timeout=5
tcp_crlf_ping=yes
tcp_accept_aliases=no
tcp_keepalive=yes
tcp_keepidle=5
tcp_rd_buf_size=65536
tcp_conn_wq_max=131072
mlock_pages=yes
shm_force_alloc=yes
tcp_max_connections=4096
The shm memory to 256 and the pkg memory to 32.
And, following this doc:
https://github.com/kamailio/kamailio/blob/master/doc/tutorials/tcp_tunning.…
I have setted this values:
net.ipv4.ip_local_port_range = 1024 65535
net.core.somaxconn = 65535
net.core.netdev_max_backlog = 182757
Also, I had checked the limits for the main process pid:
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes unlimited unlimited processes
Max open files 1048576 1048576 files
Max locked memory 16777216 16777216 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 386297 386297 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
The service is running inside a lxc container, without any resource
limit, connected to the outside word throught macvlan interface.
Where can I find problem source?
Best regards
Hello,
I'm using RTPproxy for the first time in bridged mode and I can't get kamailio/rtpproxy to rewrite the c parameter to the correct public ip address of kamailio.
The setup is as following:
Carrier ------[fiber]------ Kamailio ---------[lan]--------- Freeswitch
Kamailio is listening on two interfaces:
1) Private: 172.0.0.1
2) Public: 192.168.0.1 (since we have a dedicated fiber with our carrier, this is its public address)
Freeswitch is listening on:
1) 172.0.0.2
Carrier is on:
1) 10.0.0.1
I've started an rtpproxy instance on the Kamailio box using:
rtpproxy -s udp:127.0.0.1:7721 -u rtpproxy rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -l 192.168.0.1 172.0.0.1
I've played around with rtpproxy_manage() and the various flags (ie, ei), but I can't get kamailio to set the correct public IP when the 200 OK has to be sent back to the carrier.
It always sets it to its private address, instead of its public address.
I'm using Kamailio 4.2 with sippy/rtpproxy 2.0.
Could someone please point me into the right direction?
Thanks!
Grant
hi, i'm also having the same issue, same setup, but instead of private IP i have real IP on my WAN interface. and regardless that i've used rtpproxy_manage("coeir")and rtpproxy_manage("coier")kamailio is still replying with my internal (sip+rtp) ip in the outgoing to WAN SDP.
Can you please help to understand how do i need to manager rtp proxy to send WAN IP in SDP? when my WAN IP is private IP and my carrier is also having private IP from same network, the issue is not seen.
Thanks in advance,
Hey,
This is my first post here, so I wanted a bit of help. Appreciating that in advance.
i have following setup:
carrier(asterisk with sip ip=rtp ip=real IP) <==> kamailio+rtpproxy(ext real ip, internal ip) <==> internal asterisk(sip ip != rtp ip, both internal ips).
rtprpoxy setup/usr/local/bin/rtpproxy -p /var/run/rtpproxy.pid -u rtpproxy -F -s udp:127.0.0.1 7722 -l kam_int_ip kam_ext_ip -m 10000 -M 20000 -L 30000 -d DBUG LOG
kamailio listens on both external and internal ipsdispatcher list:
0 towards carrier SOCKET: udp:external_ip2 towards internal asterisk SOCKET: udp:internal_ip
calls being routed with if(src_ip==carrier's real ip) sent to route "from_carrier" and if(src_ip==int_ast_sip_ip) sent to route "to_carrier" in the routes calls are dispatched with if(!ds_select_dst("0", "4")) and if(!ds_select_dst("2", "4"))
rtpproxy_manage is done in "NATMANAGE" route:
#checking if call is from carrier or to carrier:if(src_ip!=carrier_ext_ip) { if(nat_uac_test("8")) { rtpproxy_manage("coier"); } else { rtpproxy_manage("cor"); }}else { rtpproxy_manage("coeir");}
so, this setup works, when i setup private IP addresses(from same network) on both carrier side(10.0.1.1) and external interface of kamailio(10.0.1.2) (accordingly changing the dispatcher file, rtpproxy and the kamailio.cfg). as per below:
carrier(asterisk with sip ip=rtp ip=10.0.1.1) <==> kamailio+rtpproxy(ext ip=10.0.1.2, internal ip=10.0.2.1) <==> internal asterisk(sip ip != rtp ip, both internal ips).
rtprpoxy setup/usr/local/bin/rtpproxy -p /var/run/rtpproxy.pid -u rtpproxy -F -s udp:127.0.0.1 7722 -l 10.0.2.1 10.0.1.2 -m 10000 -M 20000 -L 30000 -d DBUG LOG
kamailio listens on both external and internal ipsdispatcher list:
0 towards carrier SOCKET: udp:10.0.1.22 towards internal asterisk SOCKET: udp:10.0.2.1
calls being routed with if(src_ip==10.0.1.1) sent to route "from_carrier" and if(src_ip==172.16.21.21) sent to route "to_carrier" in the routes calls are dispatched with if(!ds_select_dst("0", "4")) and if(!ds_select_dst("2", "4"))
rtpproxy_manage is done in "NATMANAGE" route:
#checking if call is from carrier or to carrier:if(src_ip!=10.0.1.1) { if(nat_uac_test("8")) { rtpproxy_manage("coier"); } else { rtpproxy_manage("cor"); }}else { rtpproxy_manage("coeir");}
once i replace the IP addresses of carrier and kamailio with real IPs, kamailio is starting to forward internal asterisk's sip and rtp IP addresses to carrier and carrier's sip/rtp IPs in the SDP and breaking the SIP flow. that is is not the case while private IPs are setup for both external and internal interfaces. in the later case it normally does the bridging and sends correct info in SDP messages.
can someone help me please to understand why/how it is working correctly for private IPs and "misbehaving" in case of real IPs.
thanks,Art