<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hello,<br>
<br>
If you want to do dispatching between multiple setids,
ds_select_dst() allows that. See the docs at [1] , you can provide
a comma separated list of setids - so your $avp(zone) can contain
'1,2' and OpenSIPS will try to first send to the servers in setid
1, and then, if those fail, to the servers in setid 2.<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.11.x/dispatcher#id294368">http://www.opensips.org/html/docs/modules/1.11.x/dispatcher#id294368</a><br>
<br>
Best Regards,<br>
<pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a> </pre>
On 19.03.2015 06:17, Satish Patel wrote:<br>
</div>
<blockquote
cite="mid:CAPgF-frTC6eUnVeQgEDTA_tmw0cVFsF3WU3Xg1N6M99TTkP2=A@mail.gmail.com"
type="cite">
<div dir="ltr">I have add extra "zone" column in subscriber table,
<br>
<div><br>
+--------------+---------+<br>
| username | zone |<br>
+--------------+---------+<br>
| 1001 | 1 |<br>
| 1002 | 2 |<br>
+--------------+---------+<br>
<br>
<br>
</div>
<div>In dispatcher table I have following two Freeswitch in two
groups. <br>
</div>
<div><br>
+-------+-----------------------------+--------------------+<br>
| setid | destination | description |<br>
+-------+------------------------------+-------------------+<br>
| 1 | sip:<a moz-do-not-send="true"
href="http://fs1.example.com">fs1.example.com</a> |
Freeswitch-1 |<br>
| 2 | sip:<a moz-do-not-send="true"
href="http://fs2.example.com">fs2.example.com</a> |
Freeswitch-2 |<br>
+-------+------------------------------+-------------------+<br>
<br>
<br>
</div>
<div>in opensips.cfg script i am query subscriber table base on
incoming username and storing zone in avp(zone) variable, and
calling same variable in following code<br>
<br>
if ( !ds_select_dst("$avp(zone)", "4", "FM10"))<br>
<br>
</div>
<div>Question: now either user belongs to zone 1 or 2, so it is
*NOT* going to do load-balancing between two. But if I want to
allow some user to do load-balancing then how it will be
possible in above scenario? <br>
<br>
</div>
<div>Can i set "setid" on fly so i can pass request along with
user request and set same group for both switch and user call
load-balance on both switch? <br>
<br>
</div>
<div>Any other idea? <br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
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>
<br>
</body>
</html>