thank you Richard, yes the IP is local to the machine:

./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

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.

But the Private one it is configured on the eth0:

[root@ip-10-0-2-68]# ifconfig
eth0      Link encap:Ethernet  HWaddr 12:23:49:EF:3A:53
          inet addr:10.0.2.68  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::1023:49ff:feef:3a53/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
          RX packets:161973 errors:0 dropped:0 overruns:0 frame:0
          TX packets:102009 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:117022408 (111.6 MiB)  TX bytes:20614133 (19.6 MiB)
          Interrupt:247

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

:

# ----- rtpengine params -----
modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:7722")

This is the line I have on the Route section to forward the INVITE to the Asterisk:

 rtpengine_offer("direction=pub direction=pub replace-origin replace-session-connection");

The whole Route section is this:

route[TO_FS] {
        # here we load the Asterisk GWs that will be used to send the calls out.
        t_on_reply("TO_FS");
        t_on_failure("TO_FS");
        $var(result) = load_gws(10);     
        rtpengine_offer("direction=pub direction=pub replace-origin replace-session-connection");

        xlog("L_INFO","mylog: TO_FS: Call received. Loading LCR_GRP 10\n");
        if (!load_gws(10)) {
                xlog("L_INFO","mylog: TO_FS: After, GW_URI_AVP: $avp(i:709).\n");
                sl_send_reply("503", "Unable to load destination gateways");
                xlog("L_INFO","mylog: TO_FS: Destination GWs load section failed!. Load_GW function.\n");
                exit;
        }

        if(!next_gw()){
                xlog("L_INFO","mylog: TO_FS: After, GW_URI_AVP: $avp(i:709).\n");
                xlog("L_INFO","mylog: TO_FS: Destination GWs load section failed!. Next_GW function.\n");
                sl_send_reply("503", "Unable to find a gateway");
                exit;
        }
        xlog("L_INFO","mylog: TO_FS: Destination GWs load section OK.\n");

        if (!t_relay()) {
                xlog("L_INFO","mylog: TO_FS. T_Relay failed. Method [$rm].\n");
                sl_reply_error();
        }

        exit;
}

And this is the line I setup when I manage the Reply from the Asterisk:

onreply_route[TO_FS] {
        xlog("L_INFO","mylog: OnReply Route TO_FS.\n");
        if (has_body("application/sdp")) {
                xlog("L_INFO","mylog: Starting rtpengine session. Answer\n");
                rtpengine_answer("direction=pub direction=pub replace-origin replace-session-connection");
        }
        exit;
}


On Monday, November 3, 2014 8:59 AM, Richard Fuchs <rfuchs@sipwise.com> wrote:


On 11/01/14 15:39, Juan Perez wrote:

> Hi, I have kamilio-4.2 and rtpengine running on the same machine.
> I have this scenario:
>
> softphone --> Kamailio with Rtpengine --> Asterisk
> The softphone initiates the call, it is sent to the Asterisk. I can see
> the SDPs being re-written with the new IP/Ports provided by rtpengine:
>
> Invite from Kamailio to Asterisk
> 200 Ok from Kamailio to Softphone
>
> However,  I take a signaling/media capture on the server where the
> kamailio/rtpengine are running and see the RTP coming from both
> endpoints (softphone and asterisk) to the correct ports but there is no
> packets coming out from the proxy to either direction.
>
> I see these 2 lines on the rtpengine log and make me think that
> something prevents the rtpengine to stream out to the 2 endpoints:
>
> Nov  1 18:59:26 ip-10-0-2-68 rtpengine[27764]:
> [0866b358-dc9c-1232-1399-3767db69b8dd port 35038] Write error on RTP socket


Seeing as you're using the "direction" options, can you double check
that the local IP addresses that you've configured at the command line
are actually addresses bound to local interfaces on the machine?

cheers

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users