<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi Nil,<br>
<br>
Seems the problem is in the proxy, where you do not do RR at all.<br>
<br>
Try <br>
<br>
</tt>____________<br>
<br>
Proxy:<br>
____________<br>
<br>
route{<br>
if (!has_totag()) {<br>
# initial request<br>
record_route();<br>
} else {<br>
# sequential request -> obey Route indication<br>
loose_route();<br>
}<br>
<br>
if (!t_relay()) {<br>
# xlog("L_ERR","sl_reply_error\n");<br>
sl_reply_error();<br>
}<br>
}<br>
<br>
<tt><br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<br>
On 10/22/2012 02:25 PM, Nilanjan Banerjee wrote:
<blockquote
cite="mid:CAFbWgu2sn72HhmJ4c5mV1VAHC6mZgDxtxXivie8VAOPpHcosmw@mail.gmail.com"
type="cite">Thanks Bogdan for taking time to respond to my post. I
think you have guessed it right, I am using the sample routing
script given in the Load Balancer (LB) tutorial and that is most
likely sending the ACK and BYE messages directly to Client 2
bypassing the Proxy. The routing code snippets I am using at the
LB and the Proxy are shown below. Could you please tell me what's
going wrong over here? I am using record route support at both the
clients. Alternatively if you could please tell me what should go
in the routing blocks of the LB and the Proxy so that all the
messages go through the LB and the Proxy then that will be of
immense help too. <br>
<br>
Regards,<br>
Nil. <br>
<br>
____________<br>
<br>
Load Balancer:<br>
____________<br>
<br>
route{<br>
if (!mf_process_maxfwd_header("3")) {<br>
sl_send_reply("483","looping");<br>
exit;<br>
}<br>
<br>
if (!has_totag()) {<br>
# initial request<br>
record_route();<br>
} else {<br>
# sequential request -> obey Route indication<br>
loose_route();<br>
t_relay();<br>
exit;<br>
}<br>
<br>
# detect resources and do balancing<br>
<br>
load_balance("1","sc");<br>
<br>
<br>
# LB function returns negative if no suitable destination
(for requested resources) is found,<br>
# or if all destinations are full<br>
if ($retcode<0) {<br>
sl_send_reply("500","Service full");<br>
exit;<br>
}<br>
<br>
xlog("Selected destination is: $du\n");<br>
<br>
# send it out<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
}<br>
}<br>
<br>
____________<br>
<br>
Proxy:<br>
____________<br>
<br>
route{<br>
record_route();<br>
if (!t_relay()) {<br>
# xlog("L_ERR","sl_reply_error\n");<br>
sl_reply_error();<br>
}<br>
}<br>
<br>
<br>
<div class="gmail_quote">On Sun, Oct 21, 2012 at 7:39 PM,
Bogdan-Andrei Iancu <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:bogdan@opensips.org"
target="_blank">bogdan@opensips.org</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;">
<div bgcolor="#ffffff" text="#000000"> <tt>Hi Nil,<br>
<br>
I wild guess is you are not correctly do "loose_route" on
the LB, so instead of following the Route (to OpenSIPS
Proxy), it goes directly to end destination in RURI
(Client 2).<br>
<br>
Of course, I assume that all parties (LB + Proxy) do
record_route() for the call, right ?<br>
<br>
Regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<div>
<div class="h5"> <br>
On 10/21/2012 10:09 AM, Nilanjan Banerjee wrote: </div>
</div>
<blockquote type="cite">
<div>
<div class="h5">Hello,<br>
<br>
I am trying to build the following setup using
OpenSIPS load balancer and the proxy functionality: <br>
<br>
Client 1 (sipp) <----> OpenSIPS Load Balancer
<----> OpenSIPS Proxy <----> Client 2
(sipp)<br>
<br>
At the client ends I am using the following commands:<br>
<br>
Client 1: sipp -sn uac -rsa [Load Balancer Address]
[Client 2 Address]<br>
<br>
Client 2: sipp -sn uas <br>
<br>
The Load Balancer is configured with a destination as
the OpenSIPS Proxy and the Proxy is configured to
simply forward the SIP messages based on IP address
(using only forward(); in the routing block). <br>
<br>
Now everything (INVITE, OK and ACK messages) works
fine except the BYE messages that are getting
forwarded by the Load Balancer directly to Client 2
unlike the INVITE, OK and ACK messages that traverse
the Proxy. Client 2 however, sends the OK to the BYE
to the OpenSIPS Proxy. Since the BYE messages do not
traverse the Proxy, the OK to the BYE messages are
getting retransmitted repeatedly by Client 2 and the
sessions are not getting terminated properly. How do I
make the BYE messages to go through the Proxy or the
OK message sent directly to the Load Balancer so that
the retransmissions do not happen and the sessions get
terminated properly?<br>
<br>
[NB: When the Load Balancer is taken out of the loop
and the Proxy configuration is kept the same, all the
SIP messages traverses the Proxy and everything works
fine i.e., the BYE and the OKs to the BYEs are handled
properly and sessions get terminated properly.]<br>
<br>
Would greatly appreciate any help in this matter.
Thanks in advance. <br>
<br>
Nil. </div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<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>
</pre>
</blockquote>
</div>
</blockquote>
</div>
<br>
</blockquote>
</body>
</html>