<div dir="ltr">Thanks for the response.<br><br>I think i got the required action.<br><br>following is the DBG messages<br><br>Aug 18 14:53:10 [23018] DBG:dispatcher:ds_select_dst: set [2]<br>Aug 18 14:53:10 [23018] DBG:dispatcher:ds_select_dst: alg hash [0]<br>
Aug 18 14:53:10 [23018] DBG:dispatcher:ds_select_dst: selected [4-2/0] <sip:*.*.*.137:5080><br>.<br>.<br>.<br>Aug 18 14:53:11 [23018] DBG:dispatcher:ds_select_dst: set [2]<br>Aug 18 14:53:11 [23018] DBG:dispatcher:ds_select_dst: alg hash [1]<br>
Aug 18 14:53:11 [23018] DBG:dispatcher:ds_select_dst: selected [4-2/1] <sip:*.*.*.59:5080><br>.<br>.<br>.<br>.<br>Aug 18 14:53:12 [23018] DBG:dispatcher:ds_select_dst: set [2]<br>Aug 18 14:53:12 [23018] DBG:dispatcher:ds_select_dst: alg hash [0]<br>
Aug 18 14:53:12 [23018] DBG:dispatcher:ds_select_dst: selected [4-2/0] <sip:*.*.*.137:5080><br>..<br>.<br>.<br>.<br>.<br>.<br>Aug 18 14:53:14 [23018] DBG:dispatcher:ds_select_dst: set [2]<br>Aug 18 14:53:14 [23018] DBG:dispatcher:ds_select_dst: alg hash [1]<br>
Aug 18 14:53:14 [23018] DBG:dispatcher:ds_select_dst: selected [4-2/1] <sip:*.*.*.59:5080><br>.<br>.<br>.<br>.<br>.<br>.<br>Aug 18 14:53:18 [23018] DBG:dispatcher:ds_select_dst: set [2]<br>Aug 18 14:53:18 [23018] DBG:dispatcher:ds_select_dst: alg hash [0]<br>
Aug 18 14:53:18 [23018] DBG:dispatcher:ds_select_dst: selected [4-2/0] <sip:*.*.*.137:5080><br>.<br>.<br>.<br>.<br>Aug 18 14:53:26 [23018] DBG:dispatcher:ds_select_dst: set [2]<br>Aug 18 14:53:26 [23018] DBG:dispatcher:ds_select_dst: alg hash [1]<br>
Aug 18 14:53:26 [23018] DBG:dispatcher:ds_select_dst: selected [4-2/1] <sip:*.*.*.59:5080><br>.<br>.<br>.<br><br><br>Few concerns / doubts are.<br><br>1) If i use the "0" (hash on callid) instead of "4" (round robin) , does this mean that there is no gaurenty that all the messages of one UA will be going to same server.<br>
<br>2) If i use the "0" does this also take care of load balancing. In round robin i observed it is like 1:1 forwarding to the servers , what would be in the "0" case ?<br><br>3) In general what would be the best option to use with the dispatcher in load balancing for the half a million users.<br>
<br><br>thanks ..<br><div class="gmail_quote">On Mon, Aug 18, 2008 at 1:56 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi David,<br>
<br>
This should not be an issue - normally you should do dispatching only on<br>
the original requests and use record_route/loose_route for the<br>
sequential requests (with no dispatching). CANCEL are automatically<br>
routed to the same destination as INVITE by TM, so again, you do not<br>
need to do dispatching on them.<br>
<br>
Regards<br>
<font color="#888888">Bogdan<br>
</font><div><div></div><div class="Wj3C7c"><br>
David Villasmil wrote:<br>
> Hello,<br>
><br>
> You can't simply do a round-robin on all messages, you must do it<br>
> with hash on call id. At least in my experience. That's because if you<br>
> send an invite to server 1 and receive a CANCEL and your simply doing<br>
> rr it is not guarateed to go to the same server you sent the original<br>
> INVITE to.... But if you use hash over call-id you can be sure all<br>
> subsequent messages are delivered to the correct server.<br>
><br>
><br>
> David<br>
><br>
> On Sun, Aug 17, 2008 at 8:12 PM, Bogdan-Andrei Iancu<br>
> <<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>> wrote:<br>
><br>
>> Hi there,<br>
>><br>
>> do you get any error into the logs?<br>
>><br>
>> have you tried to use a different algorithm like 0 (hash over the<br>
>> callid) - second param, to see if there is any difference?<br>
>><br>
>> Regards,<br>
>> Bogdan<br>
>><br>
>> technocrat voip wrote:<br>
>><br>
>>> I am have openser installed and my expectation with the below<br>
>>> configuration is open ser will forward the request it gets to the<br>
>>> other servers ( dispatch.cfg ) in round robin fashion .<br>
>>><br>
>>> I mean first will goto the first serer and second to the second server<br>
>>> and third again to first server like that..<br>
>>><br>
>>> My configs are like below<br>
>>><br>
>>> openser.cfg<br>
>>><br>
>>><br>
>>> children=4<br>
>>><br>
>>> /* uncomment the following lines to enable debugging */<br>
>>> debug=9<br>
>>> fork=no<br>
>>> log_stderror=yes<br>
>>> port=5060<br>
>>><br>
>>> /* uncomment and configure the following line if you want openser to<br>
>>> bind on a specific interface/port/proto (default bind on all<br>
>>> available) */<br>
>>> listen=udp:xxx.xxx.xxx.204:5060<br>
>>><br>
>>><br>
>>> ####### Modules Section ########<br>
>>><br>
>>> #set module path<br>
>>> mpath="/usr/local/lib/openser/modules/"<br>
>>><br>
>>> /* uncomment next line for MySQL DB support */<br>
>>> #loadmodule "mysql.so"<br>
>>> loadmodule "sl.so"<br>
>>> loadmodule "tm.so"<br>
>>> loadmodule "rr.so"<br>
>>> loadmodule "maxfwd.so"<br>
>>> loadmodule "usrloc.so"<br>
>>> loadmodule "registrar.so"<br>
>>> loadmodule "textops.so"<br>
>>> loadmodule "mi_fifo.so"<br>
>>> loadmodule "uri_db.so"<br>
>>> loadmodule "uri.so"<br>
>>> loadmodule "xlog.so"<br>
>>> loadmodule "acc.so"<br>
>>> loadmodule "dispatcher.so"<br>
>>> # ----------------- setting module-specific parameters ---------------<br>
>>><br>
>>> # ----- mi_fifo params -----<br>
>>> modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")<br>
>>><br>
>>> # ----- rr params -----<br>
>>> # add value to ;lr param to cope with most of the UAs<br>
>>> modparam("rr", "enable_full_lr", 1)<br>
>>> # do not append from tag to the RR (no need for this script)<br>
>>> modparam("rr", "append_fromtag", 0)<br>
>>> # ----- rr params -----<br>
>>> modparam("registrar", "method_filtering", 1)<br>
>>> # ----- uri_db params -----<br>
>>> /* by default we disable the DB support in the module as we do not need it<br>
>>> in this configuration */<br>
>>> modparam("uri_db", "use_uri_table", 0)<br>
>>> modparam("uri_db", "db_url", "")<br>
>>> # ----- usrloc params -----<br>
>>> modparam("usrloc", "db_mode", 0)<br>
>>> /* uncomment the following lines if you want to enable DB persistency<br>
>>> for location entries */<br>
>>> #modparam("usrloc", "db_mode", 2)<br>
>>> #modparam("usrloc", "db_url",<br>
>>> # "mysql://openser:openserrw@localhost/openser")<br>
>>><br>
>>><br>
>>> # ----- auth_db params -----<br>
>>> /* uncomment the following lines if you want to enable the DB based<br>
>>> authentication */<br>
>>><br>
>>> #------ dispatcher params -----<br>
>>> modparam("dispatcher","list_file","/usr/local/etc/openser/dispatcher.cfg")<br>
>>><br>
>>><br>
>>> ####### Routing Logic ########<br>
>>><br>
>>><br>
>>> # main request routing logic<br>
>>><br>
>>> route{<br>
>>><br>
>>> log(1,"This is the another log message \n");<br>
>>> xlog("L_INFO", "SIP Request: method [$rm] from [$fu] to [$tu]\n");<br>
>>><br>
>>><br>
>>> if (!mf_process_maxfwd_header("10")) {<br>
>>> sl_send_reply("483","Too Many Hops");<br>
>>> exit;<br>
>>> }<br>
>>><br>
>>> ds_select_dst("2","4");<br>
>>><br>
>>> forward();<br>
>>> }<br>
>>><br>
>>><br>
>>> dispatcher.cfg<br>
>>><br>
>>> # $Id: dispatcher.list 3662 2008-02-07 13:06:00Z miconda $<br>
>>> # dispatcher destination sets<br>
>>> #<br>
>>><br>
>>> # line format<br>
>>> # setit(integer) destination(sip uri) flags (integer, optional)<br>
>>><br>
>>> # proxies<br>
>>> 2 sip:xx.xx.xxx.137:5080<br>
>>> 2 sip:xxx.xxx.xx.59:5080<br>
>>><br>
>>><br>
>>> continously it goes to 59 only it never goes to 137 ..<br>
>>><br>
>>> Any help in this would be appreciated.<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> Please<br>
>>> ------------------------------------------------------------------------<br>
>>><br>
>>> _______________________________________________<br>
>>> Users mailing list<br>
>>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
>>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>>><br>
>>><br>
>> _______________________________________________<br>
>> Users mailing list<br>
>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>><br>
>><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>