<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:10pt"><div><span>HI Saul,</span></div><div><br><span></span></div><div><span>Thanks for confirming. :)<br></span></div><div><br><span></span></div><div><span>So Shall I use </span> fix_nated_sdp("1"); or comment out use of fix_nated_sdp("3"); to fix the problem.</div><div><br></div><div>This wont affect anything I guess since it's a incorrect configuration .</div><div><br></div><div>Thanks<br></div><div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 10pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Saúl Ibarra Corretgé <saul@ag-projects.com><br><b><span style="font-weight: bold;">To:</span></b> Pasan Meemaduma <pasandev@ymail.com><br><b><span
style="font-weight: bold;">Cc:</span></b> OpenSIPS users mailling list <users@lists.opensips.org><br><b><span style="font-weight: bold;">Sent:</span></b> Thursday, July 21, 2011 12:29 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [OpenSIPS-Users] media-proxy invalid IP in sdp<br></font><br>Hi,<br><br>On Jul 21, 2011, at 8:50 AM, Pasan Meemaduma wrote:<br><br>> HI Saul,<br>> <br>> Further I have below in my config , Is this cause the problem ?<br>> <br>> <br>> if (loose_route()) {<br>> if(!has_totag()) {<br>> sl_send_reply("403", "Initial loose-routing rejected");<br>> exit;<br>> }<br>> <br>> if(nat_uac_test("19") || search("^Route:.*;nat=yes")) {<br>>
if(!search("^Content-Length:[ ]*0")) {<br>> fix_nated_sdp("3");<br>> setbflag(2);<br>> }<br>> }<br>> append_hf("P-hint: rr-enforced\r\n");<br>> route(1);<br>> }<br>> <br>> Is fix_nated_sdp() cause source address being append to sdp and media proxy ip 58.96.1.2 is append by use_media_proxy() ?<br>> <br><br>Yes, indeed. Using both fix_nated_sdp and use_media_proxy will modify the same SDP field and because of how modifications are applied to messages by OpenSIPS, you'll end up with a mess.<br><br>When a function modifies a message it doesn't really apply the modification right away, it appends a 'lump', imagine its a modification marker, and later, when the message is about to
be sent out, all modifications are applied. Because you are calling fix_nated_sdp *and* use_media_proxy, two lumps will be added and both modify the c line in the SDP -> bad thing.<br><br>> If this is the case how can I fix the config. Will commenting out fix_nated_sdp("3"); fix the problem.<br>> <br><br>If you use MediaProxy stick to the functions provided by the MediaProxy module, when it comes to modifying the SDP. You may also use the engage_mediaproxy function, which uses the dialog module to internally call use_media_proxy and end_media_session so you don't need to call them manually.<br><br><br>Regards,<br><br>--<br>Saúl Ibarra Corretgé<br>AG Projects<br><br><br><br><br><br></div></div></div></body></html>