<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><span id="yui_3_16_0_1_1415023523311_3290">thank you Richard, yes the IP is local to the machine:<br style="" class=""><br style="" class="">./rtpengine --interface=pub/<PUBLIC_IP> --interface=priv/10.0.2.68 --listen-ng=127.0.0.1:7722--timeout=30 --port-min=35000 --port-max=65000 --log-level=7 --log-facility=daemon<br style="" class=""><br style="" class="">The PUBLIC_IP is a NAT that the machine has, it is a virtual machine (Amazon), so it is not configured on any interface in that machine.<br style="" class=""><br style="" class="">But the Private one it is configured on the eth0:<br style="" class=""><br style="" class="">[root@ip-10-0-2-68]# ifconfig<br style="" class="">eth0      Link encap:Ethernet  HWaddr 12:23:49:EF:3A:53<br style="" class="">          inet addr:10.0.2.68  Bcast:10.0.2.255  Mask:255.255.255.0<br style="" class="">          inet6 addr: fe80::1023:49ff:feef:3a53/64 Scope:Link<br style="" class="">          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1<br style="" class="">          RX packets:161973 errors:0 dropped:0 overruns:0 frame:0<br style="" class="">          TX packets:102009 errors:0 dropped:0 overruns:0 carrier:0<br style="" class="">          collisions:0 txqueuelen:1000<br style="" class="">          RX bytes:117022408 (111.6 MiB)  TX bytes:20614133 (19.6 MiB)<br style="" class="">          Interrupt:247<br style="" class=""><br style="" class="">This is how kamailio is setup to communicate with rtpengine and it is the only line I have manually configured for that module in the kamailio config file, everything else is by default<br style="" class=""><br style="" class="">:<br style="" class=""><br style="" class=""># ----- rtpengine params -----<br style="" class="">modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:7722")<br style="" class=""><br style="" class="">This is the line I have on the Route section to forward the INVITE to the Asterisk:<br style="" class=""><br style="" class=""> rtpengine_offer("direction=pub direction=pub replace-origin replace-session-connection");<br style="" class=""><br style="" class="">The whole Route section is this:<br style="" class=""><br style="" class="">route[TO_FS] {<br style="" class="">        # here we load the Asterisk GWs that will be used to send the calls out.<br style="" class="">        t_on_reply("TO_FS");<br style="" class="">        t_on_failure("TO_FS");<br style="" class="">        $var(result) = load_gws(10);      <br style="" class="">        rtpengine_offer("direction=pub direction=pub replace-origin replace-session-connection");<br style="" class=""><br style="" class="">        xlog("L_INFO","mylog: TO_FS: Call received. Loading LCR_GRP 10\n");<br style="" class="">        if (!load_gws(10)) {<br style="" class="">                xlog("L_INFO","mylog: TO_FS: After, GW_URI_AVP: $avp(i:709).\n");<br style="" class="">                sl_send_reply("503", "Unable to load destination gateways");<br style="" class="">                xlog("L_INFO","mylog: TO_FS: Destination GWs load section failed!. Load_GW function.\n");<br style="" class="">                exit;<br style="" class="">        }<br style="" class=""><br style="" class="">        if(!next_gw()){<br style="" class="">                xlog("L_INFO","mylog: TO_FS: After, GW_URI_AVP: $avp(i:709).\n");<br style="" class="">                xlog("L_INFO","mylog: TO_FS: Destination GWs load section failed!. Next_GW function.\n");<br style="" class="">                sl_send_reply("503", "Unable to find a gateway");<br style="" class="">                exit;<br style="" class="">        }<br style="" class="">        xlog("L_INFO","mylog: TO_FS: Destination GWs load section OK.\n");<br style="" class=""><br style="" class="">        if (!t_relay()) {<br style="" class="">                xlog("L_INFO","mylog: TO_FS. T_Relay failed. Method [$rm].\n");<br style="" class="">                sl_reply_error();<br style="" class="">        }<br style="" class=""><br style="" class="">        exit;<br style="" class="">}<br style="" class=""><br style="" class="">And this is the line I setup when I manage the Reply from the Asterisk:<br style="" class=""><br style="" class="">onreply_route[TO_FS] {<br style="" class="">        xlog("L_INFO","mylog: OnReply Route TO_FS.\n");<br style="" class="">        if (has_body("application/sdp")) {<br style="" class="">                xlog("L_INFO","mylog: Starting rtpengine session. Answer\n");<br style="" class="">                rtpengine_answer("direction=pub direction=pub replace-origin replace-session-connection");<br style="" class="">        }<br style="" class="">        exit;<br style="" class="">}<br style="" class=""></span> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font face="Arial" size="2"> On Monday, November 3, 2014 8:59 AM, Richard Fuchs <rfuchs@sipwise.com> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container">On 11/01/14 15:39, Juan Perez wrote:<div class="yqt9396319795" id="yqtfd14902"><br clear="none">> Hi, I have kamilio-4.2 and rtpengine running on the same machine.<br clear="none">> I have this scenario:<br clear="none">> <br clear="none">> softphone --> Kamailio with Rtpengine --> Asterisk<br clear="none">> The softphone initiates the call, it is sent to the Asterisk. I can see<br clear="none">> the SDPs being re-written with the new IP/Ports provided by rtpengine:<br clear="none">> <br clear="none">> Invite from Kamailio to Asterisk<br clear="none">> 200 Ok from Kamailio to Softphone<br clear="none">> <br clear="none">> However,  I take a signaling/media capture on the server where the<br clear="none">> kamailio/rtpengine are running and see the RTP coming from both<br clear="none">> endpoints (softphone and asterisk) to the correct ports but there is no<br clear="none">> packets coming out from the proxy to either direction.<br clear="none">> <br clear="none">> I see these 2 lines on the rtpengine log and make me think that<br clear="none">> something prevents the rtpengine to stream out to the 2 endpoints:<br clear="none">> <br clear="none">> Nov  1 18:59:26 ip-10-0-2-68 rtpengine[27764]:<br clear="none">> [0866b358-dc9c-1232-1399-3767db69b8dd port 35038] Write error on RTP socket</div><br clear="none"><br clear="none">Seeing as you're using the "direction" options, can you double check<br clear="none">that the local IP addresses that you've configured at the command line<br clear="none">are actually addresses bound to local interfaces on the machine?<br clear="none"><br clear="none">cheers<br clear="none"><br clear="none">_______________________________________________<br clear="none">SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br clear="none"><a shape="rect" ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br clear="none"><a shape="rect" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><div class="yqt9396319795" id="yqtfd51901"><br clear="none"></div><br><br></div>  </div> </div>  </div> </div></body></html>