Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#329 rtpproxy_offer("L") returns wrong port on re-invite

trunk
closed-accepted
modules (454)
5
2011-01-19
2010-12-08
Ruslan Bukin
No

I call rtpproxy_offer("fr") on invite request and rtpproxy_answer("fr") on invite reply. Request and reply comes with sdp and client rtp media successfully served by rtpproxy.

In loose_route section I call rtpproxy_offer with force-lookup flag ("Lfr") which returns status 0 on re-invite, but returns wrong rtpproxy port!
(re-invites sent by sippy b2bua in case of keep-alives).

I have switched tags like below. I am sure it is not correct coding, but it resolved my problem, at least for a request.

--- opensips-trunk/modules/nathelper/nathelper.c (revision 7462)
+++ opensips-trunk/modules/nathelper/nathelper.c (working copy)
@@ -3315,6 +3315,13 @@
FORCE_RTP_PROXY_RET (-1);
}
create = 0;
+
+ if (msg->first_line.type==SIP_REQUEST && args->offer!=0) {
+ tmp = from_tag;
+ from_tag = to_tag;
+ to_tag = tmp;
+ }
+
} else if ((msg->first_line.type==SIP_REPLY && args->offer!=0)||
(msg->first_line.type == SIP_REQUEST && args->offer == 0) ) {
if (to_tag.len == 0) {

Discussion

  • Ruslan Bukin
    Ruslan Bukin
    2010-12-08

    • summary: rtpproxy_offer("L") return wrong port on re-invite --> rtpproxy_offer("L") returns wrong port on re-invite
     
  • why do you use the L flag in rtpproxy_offer() ? L "lookup" is specific for reply processing....

    Regards,
    Bogdan

     
  • I see...Please send me (privately if necessary) a complete SIP trace of such a call. I suspect a problem in a different place....but I need to see the flow.

    Regards,
    Bogdan

     
    • assigned_to: nobody --> bogdan_iancu
     
  • I have sent SIP trace privately to you

     
    • assigned_to: bogdan_iancu --> razvancrainea
    • status: open --> open-accepted
     
  • Razvan Crainea
    Razvan Crainea
    2011-01-19

    • status: open-accepted --> closed-accepted
     
  • Razvan Crainea
    Razvan Crainea
    2011-01-19

    Hello Ruslan,

    You were right, rtpproxy returns the wrong port because the tag order is wrong. I applied your fix in revision # 7665.

    Regards,
    Razvan