[OpenSIPS-Users] mediaproxy/rtpproxy problem with reinvites

Jeff Pyle jpyle at fidelityvoice.com
Mon Nov 3 20:21:34 CET 2008


Iñaki,

I've implemented your suggestions.  The scenario has changed, but not improved.

Here's the current situation.  I place a call from the NATed device through the proxy to a user behind Asterisk.  Asterisk sends back a 183 during ringing.  I hear this correctly on the NATed phone.  The Asterisk user answers, the call goes 200, Asterisk reinvites, 200 again.  At this point any RTP I send from the NATed phone to rtpproxy gets sent right back to me at the NATed phone.  In other words, rtpproxy is functioning as an echo-test.  Meanwhile, the Asterisk-side user hears nothing.

I've inserted a bunch of xlogs to see what's happening.  Everything appears to be triggering at the proper time.  There are no errors or warnings.  But, RTP obviously isn't flowing where it should.

Is there some way I can see what Opensips is telling rtpproxy?  Do you have another suggestions how I might troubleshoot this?


- Jeff


-----Original Message-----
From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Iñaki Baz Castillo
Sent: Friday, October 31, 2008 9:11 AM
Cc: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] mediaproxy/rtpproxy problem with reinvites

2008/10/31 Jeff Pyle <jpyle at fidelityvoice.com>:
> How *should* rtpproxy/mediaproxy handle reinvites?  I only got this 
> far by using unforce_rtp_proxy, then force_rtp_proxy on a loose-routed 
> INVITE w/ SDP (in other words a reinvite).  Should that be necessary?  Might the "s"
> swap flag be helpful in this scenario somewhere?

I do the following:

In in-dialog section (loose-route) I run force_rtp_proxy("l"). In case the initial INVITE used RtpProxy then this command re-enables it and $rc = 1. In case the initial INVITE didn't use RtpProxy then this command return other value (false) and no SDP modification is performed.
In the first case, I set a flag that I check in onreply_route since the 180/183/200 responses also need to run "force_rtp_proxy":


# in-dialog:
          t_on_reply("1");
          force_rtp_proxy("l");
                      if ($rc == 1) {
                                setbflag(9);  # Enable RtpProxy in the reply.
                        }


onreply_route[1] {

        if (status =~ "(180)|(183)|2[0-9][0-9]") {
                if (isbflagset(6) || nat_uac_test("1"))
                        fix_nated_contact();
                if (isbflagset(9) && has_body("application/sdp") && $cl != 0) {
                        force_rtp_proxy("l");
                }
        }

}

--
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the Users mailing list