<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
fix_route_dialog() uses the information from the Contact of the 200
OK. So if that is ok, you can use fix_route_dialog() to fix the
bogus BYE messages.<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer</pre>
<br>
On 11/12/2011 06:22 PM, Matt Stockton wrote:
<blockquote
cite="mid:CAHMdK5=O4YqzQSs+YO=BuYg-YNzUnkbnr=M1vXzrA4b=x33Z_A@mail.gmail.com"
type="cite">After doing some reading, thinking that I may be able
to solve my problem using the dialog module and
fix_route_dialog(). Since the Contact Header is being re-written
by the Provider, will fix_route_dialog() change it on the way in
to the appropriate value in the dialog, causing the message to be
forwarded correctly? The code for what I'm thinking is below.
Unfortunately, the issue is so intermittent that I have not been
able to re-produce the case of the Provider re-writing the Contact
Header since I started trying this modification. Does anyone know
if this strategy will work?
<div>
<br>
</div>
<div>
<div> if (!has_totag()) {</div>
<div> create_dialog();</div>
<div> # initial request</div>
<div> record_route();</div>
<div> }</div>
<div> else {</div>
<div> # sequential request - obey the indicated
route</div>
<div> loose_route();</div>
<div><br>
</div>
<div> if ($DLG_status!=NULL) {</div>
<div> if (!validate_dialog()) {</div>
<div> fix_route_dialog();</div>
<div> }</div>
<div> }</div>
<div><br>
</div>
<div> t_relay();</div>
<div> exit;</div>
<div> }</div>
<div><br>
</div>
<br>
<div class="gmail_quote">On Fri, Nov 11, 2011 at 9:23 AM, Matt
Stockton <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:mstockton@harqen.com">mstockton@harqen.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
I added the following to my config:
<div><br>
</div>
<div>
<div>onreply_route[pstn_outgoing] {</div>
<div class="im">
<div> setflag(1);</div>
<div> if(t_check_status("200")) {</div>
<div> if(search("Content-type: application/sdp")) {</div>
<div> fix_nated_sdp("8", "x.x.x.x");</div>
<div> }</div>
<div> }</div>
<div>}</div>
</div>
</div>
<div><br>
</div>
<div>And the only thing that seemed to have changed in the
SIP signalling is, when my provider sends SIP 200 OK to
OpenSips, OpenSips is just re-writing the OK Content
before sending onto Freeswitch. It doesn't look like any
messages have changed that are going from OpenSips to the
provider, and the provider is still sending the BYE
message with the Contact Header intermittently to the
different IPs as I described. Any more thoughts on this? </div>
<div><br>
</div>
<div>My end goal is to simply have the same OpenSips act as
both an inbound proxy and outbound proxy, with no
registration requirements. If there is an easier way to do
this with OpenSips, please let me know. I've looked around
and checked out all the referenced tutorials on the site
w/r/t load balancing and routing</div>
<div><br>
</div>
<div>
<div><span style="white-space: pre-wrap;"> </span>v=0</div>
<div><span style="white-space: pre-wrap;"> </span>o=Sonus_UAC
14270 3732 IN IP4 x.x.x.x</div>
<div><span style="white-space: pre-wrap;"> </span>s=SIP
Media Capabilities</div>
<div><span style="white-space: pre-wrap;"> </span>c=IN
IP4 67.231.0.110</div>
<div><span style="white-space: pre-wrap;"> </span>t=0 0</div>
<div><span style="white-space: pre-wrap;"> </span>m=audio
25620 RTP/AVP 0 101</div>
<div><span style="white-space: pre-wrap;"> </span>a=rtpmap:0
PCMU/8000</div>
<div><span style="white-space: pre-wrap;"> </span>a=rtpmap:101
telephone-event/8000</div>
<div><span style="white-space: pre-wrap;"> </span>a=fmtp:101
0-15</div>
<div><span style="white-space: pre-wrap;"> </span>a=sendrecv</div>
<div><span style="white-space: pre-wrap;"> </span>a=maxptime:20</div>
<div><span style="white-space: pre-wrap;"> </span>a=oldmediaip:ACTUAL_IP</div>
</div>
<div class="HOEnZb">
<div class="h5">
<div><br>
</div>
<div><br>
<br>
<div class="gmail_quote">On Thu, Nov 10, 2011 at 7:17
PM, ddgiants <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:ddgiants@gmail.com" target="_blank">ddgiants@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt
0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">
Matt,<br>
Sounds like you may not be topology hiding the
200OKs. Some/most SIP<br>
devices/SBC's etc will send a BYE to the ip
address in the o(owner) line of<br>
the SDP of the 200OK. Some devices do not and send
BYE to the initator/proxy<br>
they are configured for. The 200OK will have o and
c. O is the owner,<br>
meaning signaling owner and C is the connection IP
as in where to send the<br>
actual RTP. I use the below to change the o
portion of the SDP in 200 OKs<br>
and works for me. Give it a try and let me know.<br>
<br>
onreply_route[1] {<br>
setflag(1);<br>
if(t_check_status("200")) {<br>
if(search("Content-type: application/sdp")) {<br>
fix_nated_sdp("8", "x.x.x.x");<br>
}<br>
}<br>
}<br>
<br>
DD<br>
<span><font color="#888888"><br>
--<br>
View this message in context: <a
moz-do-not-send="true"
href="http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSips-as-an-inbound-loadbalancer-and-outbound-proxy-issue-with-routing-BYES-tp6984017p6984067.html"
target="_blank">http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSips-as-an-inbound-loadbalancer-and-outbound-proxy-issue-with-routing-BYES-tp6984017p6984067.html</a><br>
Sent from the OpenSIPS - Users mailing list
archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Users@lists.opensips.org"
target="_blank">Users@lists.opensips.org</a><br>
<a moz-do-not-send="true"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>