<div>Hi!I've 2 asterisk at home and I use openser becouse I want use more proxies for my softphones;my problem is this:</div>
<div>I'm using vrrp protocol; </div>
<div><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.1/" target="_blank">192.168.25.1</a> is the master&nbsp;&nbsp; (asterisk1)</div>
<div><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.2/" target="_blank">192.168.25.2</a> is the slave&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (asterisk2)</div>
<div><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.200/" target="_blank">192.168.25.200</a> is the virtual IP.</div>
<div>then I have my softphones on a Xp pc with IP <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.10/" target="_blank">192.168.25.10</a></div>
<div>&nbsp;</div>
<div>I set my softphones with <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.200/" target="_blank">192.168.25.200</a> and they run, only that, the problem with asterisk is that softphones and IP phones(some like wi-fi) can register only one proxy, and asterisk can't make a option for more proxies than one;so the proxy is the 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.200/" target="_blank">192.168.25.200</a>, but at real it is 192.168.25.1..and softphones or wi-fi are&nbsp;registered only in the first asterisk with the 
192.168.25.1..if the master falls down the slave hasn't the authentication SIP registration...only the master..So I must use openser or ser to have 2 = box </div>
<div>&nbsp;</div>
<div>my problem is resolved only if I use the redirect option to have 2 = asterisk box so the database can be opened and read from one asterisk to the other;if the master falls down the slave has all the configuration and the SIP registration, so it can work without problems. 
</div>
<div>&nbsp;</div>
<div>A) I've set this file on asterisk <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.1/" target="_blank">192.168.25.1</a> the master</div>
<div>
<p>#<br># $Id: replicate.cfg,v 1.2 2005/07/25 16:27:33 miconda Exp $<br>#<br># demo script showing how to set-up usrloc replication<br>#</p>
<p># ----------- global configuration parameters ------------------------</p>
<p>debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level (cmd line: -dddddddddd)<br>fork=no<br>log_stderror=yes # (cmd line: -E)</p>
<p># ------------------ module loading ----------------------------------</p>
<p>loadmodule &quot;modules/mysql/mysql.so&quot;<br>loadmodule &quot;modules/sl/sl.so&quot;<br>loadmodule &quot;modules/tm/tm.so&quot;<br>loadmodule &quot;modules/maxfwd/maxfwd.so&quot;<br>loadmodule &quot;modules/usrloc/usrloc.so&quot; 
<br>loadmodule &quot;modules/registrar/registrar.so&quot;<br>loadmodule &quot;modules/auth/auth.so&quot;<br>loadmodule &quot;modules/auth_db/auth_db.so&quot;</p>
<p># ----------------- setting module-specific parameters ---------------</p>
<p># digest generation secret; use the same in backup server;<br># also, make sure that the backup server has sync'ed time<br>modparam(&quot;auth&quot;, &quot;secret&quot;, &quot;alsdkhglaksdhfkloiwr&quot;)</p>
<p># -------------------------&nbsp; request routing logic -------------------</p>
<p># main routing logic</p>
<p>route{</p>
<p>&nbsp;# initial sanity checks -- messages with<br>&nbsp;# max_forwars==0, or excessively long requests<br>&nbsp;if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>&nbsp;&nbsp;sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>&nbsp;&nbsp;return; 
<br>&nbsp;};<br>&nbsp;if (len_gt( max_len )) {<br>&nbsp;&nbsp;sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);<br>&nbsp;&nbsp;return;<br>&nbsp;};</p>
<p>&nbsp;# if the request is for other domain use UsrLoc<br>&nbsp;# (in case, it does not work, use the following command<br>&nbsp;# with proper names and addresses in it)<br>&nbsp;if (uri==myself) {</p>
<p>&nbsp;&nbsp;if (method==&quot;REGISTER&quot;) {</p>
<p>&nbsp;&nbsp;&nbsp;# verify credentials<br>&nbsp;&nbsp;&nbsp;if (!www_authorize(&quot;&quot;, &quot;subscriber&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;www_challenge(&quot;&quot;, &quot;0&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;return;<br>&nbsp;&nbsp;&nbsp;};</p>
<p>&nbsp;&nbsp;&nbsp;# if ok, update contacts and ...<br>&nbsp;&nbsp;&nbsp;save(&quot;location&quot;);<br>&nbsp;&nbsp;&nbsp;# ... if this REGISTER is not a replica from our<br>&nbsp;&nbsp;&nbsp;# peer server, replicate to the peer server<br>&nbsp;&nbsp;&nbsp;if (!src_ip==<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.2/" target="_blank">
 192.168.25.2</a>) {<br>&nbsp;&nbsp;&nbsp;&nbsp;t_replicate(&quot;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.2/" target="_blank">192.168.25.2</a>&quot;, &quot;5060&quot;);<br>&nbsp;&nbsp;&nbsp;};<br>&nbsp;&nbsp;&nbsp;return;<br>&nbsp;&nbsp;}; 
<br>&nbsp;&nbsp;# do whatever else appropriate for your domain<br>&nbsp;&nbsp;log(&quot;non-REGISTER\n&quot;); <br>&nbsp;};<br>}</p>
<p>&nbsp;</p>
<div>B) I've set this file on asterisk <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.2/" target="_blank">192.168.25.2</a> the slave</div></div>
<div>&nbsp;</div>
<div>
<p>#<br># $Id: replicate.cfg,v 1.2 2005/07/25 16:27:33 miconda Exp $<br>#<br># demo script showing how to set-up usrloc replication<br>#</p>
<p># ----------- global configuration parameters ------------------------</p>
<p>debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level (cmd line: -dddddddddd)<br>fork=no<br>log_stderror=yes # (cmd line: -E)</p>
<p># ------------------ module loading ----------------------------------</p>
<p>loadmodule &quot;modules/mysql/mysql.so&quot;<br>loadmodule &quot;modules/sl/sl.so&quot;<br>loadmodule &quot;modules/tm/tm.so&quot;<br>loadmodule &quot;modules/maxfwd/maxfwd.so&quot;<br>loadmodule &quot;modules/usrloc/usrloc.so&quot; 
<br>loadmodule &quot;modules/registrar/registrar.so&quot;<br>loadmodule &quot;modules/auth/auth.so&quot;<br>loadmodule &quot;modules/auth_db/auth_db.so&quot;</p>
<p># ----------------- setting module-specific parameters ---------------</p>
<p># digest generation secret; use the same in backup server;<br># also, make sure that the backup server has sync'ed time<br>modparam(&quot;auth&quot;, &quot;secret&quot;, &quot;alsdkhglaksdhfkloiwr&quot;)</p>
<p># -------------------------&nbsp; request routing logic -------------------</p>
<p># main routing logic</p>
<p>route{</p>
<p>&nbsp;# initial sanity checks -- messages with<br>&nbsp;# max_forwars==0, or excessively long requests<br>&nbsp;if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>&nbsp;&nbsp;sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>&nbsp;&nbsp;return; 
<br>&nbsp;};<br>&nbsp;if (len_gt( max_len )) {<br>&nbsp;&nbsp;sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);<br>&nbsp;&nbsp;return;<br>&nbsp;};</p>
<p>&nbsp;# if the request is for other domain use UsrLoc<br>&nbsp;# (in case, it does not work, use the following command<br>&nbsp;# with proper names and addresses in it)<br>&nbsp;if (uri==myself) {</p>
<p>&nbsp;&nbsp;if (method==&quot;REGISTER&quot;) {</p>
<p>&nbsp;&nbsp;&nbsp;# verify credentials<br>&nbsp;&nbsp;&nbsp;if (!www_authorize(&quot;&quot;, &quot;subscriber&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;www_challenge(&quot;&quot;, &quot;0&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;return;<br>&nbsp;&nbsp;&nbsp;};</p>
<p>&nbsp;&nbsp;&nbsp;# if ok, update contacts and ...<br>&nbsp;&nbsp;&nbsp;save(&quot;location&quot;);<br>&nbsp;&nbsp;&nbsp;# ... if this REGISTER is not a replica from our<br>&nbsp;&nbsp;&nbsp;# peer server, replicate to the peer server<br>&nbsp;&nbsp;&nbsp;if (!src_ip==<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.1/" target="_blank">
 192.168.25.1</a>) {<br>&nbsp;&nbsp;&nbsp;&nbsp;t_replicate(&quot;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.1/" target="_blank">192.168.25.1</a>&quot;, &quot;5060&quot;);<br>&nbsp;&nbsp;&nbsp;};<br>&nbsp;&nbsp;&nbsp;return;<br>&nbsp;&nbsp;}; 
<br>&nbsp;&nbsp;# do whatever else appropriate for your domain<br>&nbsp;&nbsp;log(&quot;non-REGISTER\n&quot;); <br>&nbsp;};<br>}</p>
<p>Must I call this file&nbsp;ser.cfg?Right?Must I set the <font face="Courier" size="2"></font></p>
<p align="left">on the master</p>
<p align="left">listen=<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.1/" target="_blank">192.168.25.1</a>&nbsp; #on the master&nbsp;</p>
<p align="left">port=5060</p><font face="Courier" size="2">
<p align="left">on the slave</p>
<p align="left">listen=<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.25.2/" target="_blank">192.168.25.2</a>&nbsp; #on the slave</p>
<p align="left">port=5060</p></font>
<p align="left">&nbsp;</p>
<p>Then I use on all the 2 linux;</p>
<p>#chkconfig -add ser</p>
<p>#chkconfig -add mediaproxy</p>
<p>And ser and mediaproxy works like deamon every time I start-up the 2 linux.</p>
<p>Is it right to add this 2 sip number in openser or ser in this way?(they're registered in asterisk and 650 is a number from a X-lite, 651 from Phoner)</p>
<p>serctl add 650&nbsp; 1234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:650@192.168.25.200" target="_blank">650@192.168.25.200</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:650@192.168.25.200" target="_blank">
 650@192.168.25.200</a>]<br>serctl add 651&nbsp; 1234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:651@192.168.25.200" target="_blank">651@192.168.25.200</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:651@192.168.25.200" target="_blank">
 651@192.168.25.200</a>]</p>
<p>Is it right this configuration?If the master falls down the slave has all the Sip registration authentificated and run without any problem?</p>
<p>100000 thanks!</p></div>