[OpenSIPS-Users] Opensips + Dispatcher + asterisk + fail over problem

urmi lakkad urmi.lakkad at gmail.com
Tue Aug 4 13:27:32 CEST 2009


Hello,

I am using Opensips and Asterisk for my call flow.

I am using 3 Asterisks for call forwarding. Opensips's dispatcher module is
doing the task of load balancing among all 3 Asterisk servers in a round
robin fashion. i. e.

1st call to 1st Asterisk
2nd call to 2nd Asterisk
3rd call to 3rd Asterisk

If any 1 of the Asterisk goes down,(i.e fail to respond), then dispatcher
stops sending calls to that particular Asterisk. Its working fine.

But again when that Asterisk comes up( i.e comes to network or become live)
, the dispatcher should start sending calls to that Asterisk server. Can u
please suggest me how can I achieve this ?

Following is my opensips.cfg file
----------------------------------------

loadmodule "dispatcher.so"

modparam("dispatcher", "list_file",
"/usr/local/etc/opensips/dispatcher.list")

modparam("dispatcher", "flags", 2)
modparam("dispatcher", "dst_avp", "$avp(i:271)")
modparam("dispatcher", "grp_avp", "$avp(i:272)")
modparam("dispatcher", "cnt_avp", "$avp(i:273)")

modparam("dispatcher", "ds_ping_method", "INFO")
modparam("dispatcher", "ds_ping_interval", 1)
modparam("dispatcher", "ds_probing_mode", 1)

route{

if (is_method("INVITE"))
{
              if (nat_uac_test("16"))
              {
                  fix_nated_contact();
                  force_rport();
};


ds_select_dst("1", "0");
t_on_reply("1");
t_on_failure("1");
forward();
exit;

}

 ----------------------------------------
Dispatcher.cfg

1 sip:192.168.1.1:5060 #Asterisk-1
1 sip:192.168.1.1:5061 #Asterisk-2
1 sip:192.168.1.1:5062 #Asterisk-3

----------------------------------------

 Thanks for your attention.

-Urmi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090804/4ced5e83/attachment.htm 


More information about the Users mailing list