<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1415023523311_25653" dir="ltr">thank you Richard,that was it, at least 1 side is working, the other side I think is having issues with the Record-Route having the private IP in it.</div><div id="yui_3_16_0_1_1415023523311_25654" dir="ltr">I know it is out of context , but do you know how to make Kamailio to use the Public IP instead?</div><div id="yui_3_16_0_1_1415023523311_25655" dir="ltr">txs a lot!</div><div id="yui_3_16_0_1_1415023523311_25656" dir="ltr">jp<br></div><div id="yui_3_16_0_1_1415023523311_25651"><span></span></div> <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 9:17 AM, Juan Perez <juan_perez_2014@yahoo.com> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><div id="yiv1716699362"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;"><span id="yiv1716699362yui_3_16_0_1_1415023523311_3290">thank you Richard, yes the IP is local to the machine:<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">./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 class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">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 class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">But the Private one it is configured on the eth0:<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">[root@ip-10-0-2-68]# ifconfig<br class="yiv1716699362" style="" clear="none">eth0      Link encap:Ethernet  HWaddr 12:23:49:EF:3A:53<br class="yiv1716699362" style="" clear="none">          inet addr:10.0.2.68  Bcast:10.0.2.255  Mask:255.255.255.0<br class="yiv1716699362" style="" clear="none">          inet6 addr: fe80::1023:49ff:feef:3a53/64 Scope:Link<br class="yiv1716699362" style="" clear="none">          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1<br class="yiv1716699362" style="" clear="none">          RX packets:161973 errors:0 dropped:0 overruns:0 frame:0<br class="yiv1716699362" style="" clear="none">          TX packets:102009 errors:0 dropped:0 overruns:0 carrier:0<br class="yiv1716699362" style="" clear="none">          collisions:0 txqueuelen:1000<br class="yiv1716699362" style="" clear="none">          RX bytes:117022408 (111.6 MiB)  TX bytes:20614133 (19.6 MiB)<br class="yiv1716699362" style="" clear="none">          Interrupt:247<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">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 class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">:<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none"># ----- rtpengine params -----<br class="yiv1716699362" style="" clear="none">modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:7722")<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">This is the line I have on the Route section to forward the INVITE to the Asterisk:<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none"> rtpengine_offer("direction=pub direction=pub replace-origin replace-session-connection");<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">The whole Route section is this:<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">route[TO_FS] {<br class="yiv1716699362" style="" clear="none">        # here we load the Asterisk GWs that will be used to send the calls out.<br class="yiv1716699362" style="" clear="none">        t_on_reply("TO_FS");<br class="yiv1716699362" style="" clear="none">        t_on_failure("TO_FS");<br class="yiv1716699362" style="" clear="none">        $var(result) = load_gws(10);      <br class="yiv1716699362" style="" clear="none">        rtpengine_offer("direction=pub direction=pub replace-origin replace-session-connection");<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">        xlog("L_INFO","mylog: TO_FS: Call received. Loading LCR_GRP 10\n");<br class="yiv1716699362" style="" clear="none">        if (!load_gws(10)) {<br class="yiv1716699362" style="" clear="none">                xlog("L_INFO","mylog: TO_FS: After, GW_URI_AVP: $avp(i:709).\n");<br class="yiv1716699362" style="" clear="none">                sl_send_reply("503", "Unable to load destination gateways");<br class="yiv1716699362" style="" clear="none">                xlog("L_INFO","mylog: TO_FS: Destination GWs load section failed!. Load_GW function.\n");<br class="yiv1716699362" style="" clear="none">                exit;<br class="yiv1716699362" style="" clear="none">        }<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">        if(!next_gw()){<br class="yiv1716699362" style="" clear="none">                xlog("L_INFO","mylog: TO_FS: After, GW_URI_AVP: $avp(i:709).\n");<br class="yiv1716699362" style="" clear="none">                xlog("L_INFO","mylog: TO_FS: Destination GWs load section failed!. Next_GW function.\n");<br class="yiv1716699362" style="" clear="none">                sl_send_reply("503", "Unable to find a gateway");<br class="yiv1716699362" style="" clear="none">                exit;<br class="yiv1716699362" style="" clear="none">        }<br class="yiv1716699362" style="" clear="none">        xlog("L_INFO","mylog: TO_FS: Destination GWs load section OK.\n");<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">        if (!t_relay()) {<br class="yiv1716699362" style="" clear="none">                xlog("L_INFO","mylog: TO_FS. T_Relay failed. Method [$rm].\n");<br class="yiv1716699362" style="" clear="none">                sl_reply_error();<br class="yiv1716699362" style="" clear="none">        }<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">        exit;<br class="yiv1716699362" style="" clear="none">}<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">And this is the line I setup when I manage the Reply from the Asterisk:<br class="yiv1716699362" style="" clear="none"><br class="yiv1716699362" style="" clear="none">onreply_route[TO_FS] {<br class="yiv1716699362" style="" clear="none">        xlog("L_INFO","mylog: OnReply Route TO_FS.\n");<br class="yiv1716699362" style="" clear="none">        if (has_body("application/sdp")) {<br class="yiv1716699362" style="" clear="none">                xlog("L_INFO","mylog: Starting rtpengine session. Answer\n");<br class="yiv1716699362" style="" clear="none">                rtpengine_answer("direction=pub direction=pub replace-origin replace-session-connection");<br class="yiv1716699362" style="" clear="none">        }<br class="yiv1716699362" style="" clear="none">        exit;<br class="yiv1716699362" style="" clear="none">}<br class="yiv1716699362" style="" clear="none"></span> <div class="yiv1716699362qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv1716699362yqt7425259084" id="yiv1716699362yqt47097"><div class="yiv1716699362yahoo_quoted" style="display:block;"> <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 clear="none"> </font> </div>  <br clear="none"><br clear="none"> <div class="yiv1716699362y_msg_container">On 11/01/14 15:39, Juan Perez wrote:<div class="yiv1716699362yqt9396319795" id="yiv1716699362yqtfd14902"><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 rel="nofollow" shape="rect" ymailto="mailto:sr-users@lists.sip-router.org" target="_blank" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><div class="yiv1716699362yqt9396319795" id="yiv1716699362yqtfd51901"><br clear="none"></div><br clear="none"><br clear="none"></div>  </div> </div>  </div></div> </div></div></div><br><br></div>  </div> </div>  </div> </div></body></html>