Hi Bogdan,<br><br> Thanks a lot for your suggestion and sorry for the delay in getting back with this...I tried the following configuration as you have suggested for the Load Balancer and the Proxy: <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 load balancing<br><br> load_balance("1","sc");<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>Proxy<br>______<br><br>route{<br><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><br>However, I am still getting the same error - basically the ACK and the BYE messages are skipping the Proxy and the response to the BYE is sent to the Proxy. Here are the sample ACK and BYE for the following setup I am using:<br>
<br> X.X.X.23:5080 --> X.X.X.206:5060 --> X.X.X.8:5060 --> X.X.X.5:5070<br>(sipp UAC) --> (Load Balancer) --> (Proxy) --> (sipp UAS)<br><br>#<br>U 2012/11/01 11:19:22.901990 X.X.X.206:5060 -> X.X.X.5:5070<br>
ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.<br>Record-Route: <sip:X.X.X.206;lr;ftag=31168SIPpTag005;did=9d.087b203>,<sip:X.X.X.8;lr>.<br>Via: SIP/2.0/UDP X.X.X.206;branch=z9hG4bK0112.20fe162.2.<br>Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-5-5.<br>
From: sipp <sip:sipp@X.X.X.23:5080>;tag=31168SIPpTag005.<br>To: sut <sip:service@X.X.X.5:5070>;tag=30500SIPpTag015.<br>Call-ID: 5-31168@X.X.X.23.<br>CSeq: 1 ACK.<br>Contact: sip:sipp@X.X.X.23:5080.<br>Max-Forwards: 69.<br>
Subject: Performance Test.<br>Content-Length: 0.<br>.<br><br>#<br>U 2012/11/01 11:19:22.934118 X.X.X.23:5080 -> X.X.X.206:5060<br>BYE sip:X.X.X.5:5070;transport=UDP SIP/2.0.<br>Record-Route: <sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a>,<sip:X.X.X.8;lr>.<br>
Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-7.<br>From: sipp <sip:sipp@X.X.X.23:5080>;tag=31168SIPpTag001.<br>To: sut <sip:service@X.X.X.5:5070>;tag=30500SIPpTag011.<br>Call-ID: 1-31168@X.X.X.23.<br>
CSeq: 2 BYE.<br>Contact: sip:sipp@X.X.X.23:5080.<br>Max-Forwards: 70.<br>Subject: Performance Test.<br>Content-Length: 0.<br>.<br><br>Looks like the loose routing for the messages after the initial requests is not happening properly according to the Record-Route header. Not sure, if I am doing things right in the client side while introducing the Record-Route header - hence attaching the modified sipp uac and uas I am using. <br>
<br>Would greatly appreciate your time and help if you could please throw some light into this matter. <br><br>Thanks,<br>Nil. <br><br><br><div class="gmail_quote">On Thu, Oct 25, 2012 at 7:30 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div 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{<div class="im"><br>
if (!has_totag()) {<br>
# initial request<br>
record_route();<br>
} else {<br>
# sequential request -> obey Route indication<br>
loose_route();<br>
}<br>
<br></div><div class="im">
if (!t_relay()) {<br>
# xlog("L_ERR","sl_reply_error\n");<br>
sl_reply_error();<br>
}<br>
}<br>
<br>
</div><div class="im"><tt><br>
Regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<br></div><div><div class="h5">
On 10/22/2012 02:25 PM, Nilanjan Banerjee wrote:
<blockquote 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 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 href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<div>
<div> <br>
On 10/21/2012 10:09 AM, Nilanjan Banerjee wrote: </div>
</div>
<blockquote type="cite">
<div>
<div>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 href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a 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>
</div></div></div>
</blockquote></div><br>