Hi community,
I'm not sure if anyone has ever tried that before, but I'm trying to run Kamailio in AWS with RTPengine. I successfully installed both Kamailio and RTPengine on my EC2 instance and I'm able to make my devices register to it. However, when I make a call from one of my devices, the call is muted. As I analyze my kamailio.cfg file, I see that the "route[NATMANAGE]" is likely the cause of the mute call.
I think that none of the conditions below are met, therefore, the flags are not set. Because of that, the last condition is met, thus triggering the "return" and exiting from the route[NATMANAGE] prematurely without even reaching the section where I define the RTPengine modifications. Not only that, but if I remove/comment out the "return", then the RTPengine is triggered, but there call doesn't connect. I wonder why this is happening and if there's any known workaround.
# RTP relaying management and signaling updates for NAT traversal route[NATMANAGE] { xlog("L_INFO", "NATMANAGE path was followed\n"); #!ifdef WITH_NAT xlog("L_INFO", "WITH_NAT Triggered\n"); if (is_request()) { xlog("L_INFO", "is_request path was followed\n"); if (has_totag()) { xlog("L_INFO", "has_totag path was followed\n"); if (check_route_param("nat=yes")) { xlog("L_INFO", "nat=yes param detected, setting FLB_NATB\n"); setbflag(FLB_NATB); } }
if (nat_uac_test("3")) { xlog("L_INFO", "nat_uac_test(3) matched, setting FLT_NATS + FLB_NATB\n"); setflag(FLT_NATS); setbflag(FLB_NATB); } }
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) { xlog("L_INFO", "No NAT flags set, skipping NAT handling\n"); return; }
#!ifdef WITH_RTPENGINE xlog("L_INFO", "WITH_RTPENGINE Path followed\n"); if (has_body("application/sdp")) { if (is_method("INVITE")) { xlog("L_INFO", "IS_METHOD_INVITE Path Followed\n"); rtpengine_manage("replace-origin replace-session-connection trust-address direction=internal"); } else if (is_reply()) { xlog("L_INFO", "IS_Reply Path Followed\n"); rtpengine_manage("replace-origin replace-session-connection trust-address direction=internal"); } } #!else if(nat_uac_test("8")) { rtpproxy_manage("co"); } else { rtpproxy_manage("cor"); } #!endif
if (is_request()) { if (!has_totag()) { if(t_is_branch_route()) { add_rr_param(";nat=yes"); } } } if (is_reply()) { if(isbflagset(FLB_NATB)) { if(is_first_hop()) set_contact_alias(); } }
if(isbflagset(FLB_NATB)) { # no connect message in a dialog involving NAT traversal if (is_request()) { if(has_totag()) { set_forward_no_connect(); } } } #!endif return; }
Hello, I tried commenting it out, but if I do that, then the "MANAGE_REPLY" is never reached, so I think that the call doesn't even reach the terminating side.
Regards, Gui
MANAGE_REPLY is called from there:
route[RELAY] {
if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) { if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH"); } *if (is_method("INVITE|SUBSCRIBE|UPDATE")) { if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY"); }* if (is_method("INVITE")) { if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE"); }
if (!t_relay()) { sl_reply_error(); } exit; }
so...
--- I'm SoCIaL, MayBe
El 5/06/2025 a las 10:55 a. m., Guilherme via sr-users escribió:
Hello, I tried commenting it out, but if I do that, then the "MANAGE_REPLY" is never reached, so I think that the call doesn't even reach the terminating side.
Regards, Gui __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions --sr-users@lists.kamailio.org To unsubscribe send an email tosr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!