<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi All<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>As per previous Q “mentioned below” </span></font><span
class=value>I did try using t_replicate however once the client A logons on to
server A it just keeps sending subscribe requests to server B</span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><span class=value><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Hi All</span></font></span><br>
<br>
<span class=value>I have the following scenario</span><br>
<span class=value>Openser Server A --> Uses Localhost MySQL Server</span><br>
<span class=value>Openser Server B --> Uses ServerA MySQL server</span><br>
<br>
<span class=value>Each server is in a different location. Both servers
share the same database. I.e. in other words a user can successfully logon to
either server. Both servers have a similar configuration file. My problem at
hand is the following</span><br>
<br>
<span class=value>User A and User C logon to Server A</span><br>
<span class=value>User B logs on to Server B</span><br>
<br>
<span class=value>User A and User C can call each other.</span><br>
<br>
<span class=value>How can User A and C communicate with user B ?</span><br>
<br>
<span class=value>Can anyone provide me with a working example.<o:p></o:p></span></p>
<p class=MsoNormal><span class=value><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></span></p>
<p class=MsoNormal><span class=value><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></span></p>
<p class=MsoNormal><span class=value><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>My Config<o:p></o:p></span></font></span></p>
<p class=MsoNormal><span class=value><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></span></p>
<pre><span class=com><font size=2 face="Courier New"><span style='font-size:
10.0pt'>####### Modules Section ########</span></font></span><br>
<span class=pln> </span><br>
<span class=com>#set module path</span><br>
<span class=pln>mpath</span><span class=pun>=</span><span class=str>"/usr/local/lib/openser/modules/"</span><br>
<span class=pln> </span><br>
<span class=com>/* uncomment next line for MySQL DB support */</span><br>
<span class=pln>loadmodule </span><span class=str>"mysql.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"sl.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"tm.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"rr.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"maxfwd.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"usrloc.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"registrar.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"textops.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"mi_fifo.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"uri_db.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"uri.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"xlog.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"auth.so"</span><br>
<span class=pln>loadmodule </span><span class=str>"auth_db.so"</span><br>
<span class=pln> </span><br>
<span class=com># ----- rr params -----</span><br>
<span class=com># add value to ;lr param to cope with most of the UAs</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"rr"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"enable_full_lr"</span><span
class=pun>,</span><span class=pln> </span><span class=lit>1</span><span
class=pun>)</span><br>
<span class=com># do not append from tag to the RR (no need for this script)</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"rr"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"append_fromtag"</span><span
class=pun>,</span><span class=pln> </span><span class=lit>0</span><span
class=pun>)</span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=com># ----- rr params -----</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"registrar"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"method_filtering"</span><span
class=pun>,</span><span class=pln> </span><span class=lit>1</span><span
class=pun>)</span><br>
<span class=com>/* uncomment the next line to disable parallel forking via location */</span><br>
<span class=com># modparam("registrar", "append_branches", 0)</span><br>
<span class=com>/* uncomment the next line not to allow more than 10 contacts per AOR */</span><br>
<span class=com>#modparam("registrar", "max_contacts", 10)</span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=com># ----- uri_db params -----</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"uri_db"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"use_uri_table"</span><span
class=pun>,</span><span class=pln> </span><span class=lit>0</span><span
class=pun>)</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"uri_db"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"db_url"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"mysql://db_string"</span><span
class=pun>)</span><br>
<span class=pln> </span><br>
<span class=com># ----- usrloc params -----</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"usrloc"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"db_mode"</span><span
class=pun>,</span><span class=pln> </span><span class=lit>3</span><span
class=pun>)</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"usrloc"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"db_url"</span><span
class=pun>,</span><span class=str>"mysql://db_string"</span><span
class=pun>)</span><br>
<span class=pln> </span><br>
<span class=com># ----- auth_db params -----</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"auth_db"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"calculate_ha1"</span><span
class=pun>,</span><span class=pln> yes</span><span class=pun>)</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"auth_db"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"password_column"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"password"</span><span
class=pun>)</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"auth_db"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"use_domain"</span><span
class=pun>,</span><span class=pln> </span><span class=lit>0</span><span
class=pun>)</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"auth_db"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"db_url"</span><span
class=pun>,</span><span class=str>"mysql://db_string"</span><span
class=pun>)</span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"usrloc"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"db_url"</span><span
class=pun>,</span><span class=str>"mysql://db_string"</span><span
class=pun>)</span><br>
<span class=pln> </span><br>
<span class=com># ----------------- setting module-specific parameters ---------------</span><br>
<span class=pln> </span><br>
<span class=com># -- mi_fifo params --</span><br>
<span class=pln> </span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"mi_fifo"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"fifo_name"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"/tmp/openser_fifo_xmpp"</span><span
class=pun>)</span><br>
<span class=pln> </span><br>
<span class=com># -- usrloc params --</span><br>
<span class=pln> </span><br>
<span class=com># -- rr params --</span><br>
<span class=com># add value to ;lr param to make some broken UAs happy</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>"rr"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"enable_full_lr"</span><span
class=pun>,</span><span class=pln> </span><span class=lit>1</span><span
class=pun>)</span><br>
<span class=pln> </span><br>
<span class=com>###### Routing Logic ########</span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=pln>route</span><br>
<span class=pun>{</span><br>
<span class=pln> </span><span class=kwd>if</span><span
class=pun>(!</span><span class=pln>mf_process_maxfwd_header</span><span
class=pun>(</span><span class=str>"10"</span><span class=pun>)){</span><br>
<span class=pln> sl_send_reply</span><span
class=pun>(</span><span class=str>"486"</span><span class=pun>,</span><span
class=pln> </span><span class=str>"To Many Hops"</span><span
class=pun>);</span><br>
<span class=pln> </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln> </span><span class=pun>}</span><br>
<span class=pln> </span><br>
<span class=pln> </span><span class=kwd>if</span><span
class=pun>(</span><span class=pln>msg</span><span class=pun>:</span><span
class=pln>len </span><span class=pun>>=</span><span class=pln> max_len</span><span
class=pun>){</span><br>
<span class=pln> sl_send_reply</span><span
class=pun>(</span><span class=str>"513"</span><span class=pun>,</span><span
class=pln> </span><span class=str>"Message To Big"</span><span
class=pun>);</span><br>
<span class=pln> </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln> </span><span class=pun>}</span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=pln> </span><span class=com>#########End of XMPP Section ###################</span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=pln> </span><span class=kwd>if</span><span
class=pun>(!</span><span class=pln>is_method</span><span class=pun>(</span><span
class=str>"REGISTER"</span><span class=pun>)){</span><br>
<span class=pln> record_route</span><span
class=pun>();</span><br>
<span class=pln> </span><span class=pun>}</span><br>
<span class=pln> </span><br>
<span class=pln> </span><span class=kwd>if</span><span
class=pun>(</span><span class=pln>loose_route</span><span class=pun>()){</span><br>
<span class=pln> route</span><span
class=pun>(</span><span class=lit>1</span><span class=pun>);</span><br>
<span class=pln> </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln> </span><span class=pun>}</span><br>
<span class=pln> </span><br>
<span class=pln> </span><span class=kwd>if</span><span
class=pun>(</span><span class=pln>uri </span><span class=pun>==</span><span
class=pln> myself</span><span class=pun>){</span><br>
<span class=pln> </span><span
class=kwd>if</span><span class=pun>(</span><span class=pln>is_method</span><span
class=pun>(</span><span class=str>"REGISTER"</span><span class=pun>)){</span><br>
<span class=pln> </span><span
class=kwd>if</span><span class=pun>(!</span><span class=pln>www_authorize</span><span
class=pun>(</span><span class=str>"mydomain.net"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"subscriber"</span><span
class=pun>)){</span><br>
<span class=pln> www_challenge</span><span
class=pun>(</span><span class=str>"mydomain.net"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"1"</span><span
class=pun>);</span><br>
<span class=pln> </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln> </span><span
class=pun>}</span><br>
<span class=pln> </span><br>
<span class=pln> save</span><span
class=pun>(</span><span class=str>"location"</span><span class=pun>);</span><br>
<span class=pln> </span><span
class=kwd>if</span><span class=pun>(!</span><span class=pln>src_ip</span><span
class=pun>==</span><span class=pln>xx</span><span class=pun>.</span><span
class=pln>yy</span><span class=pun>.</span><span class=pln>zz</span><span
class=pun>.</span><span class=lit>12</span><span class=pun>)</span><br>
<span class=pln> </span><span
class=pun>{</span><br>
<span class=pln> t_replicate</span><span
class=pun>(</span><span class=str>"xx.yy.zz.12"</span><span
class=pun>,</span><span class=pln> </span><span class=str>"5060"</span><span
class=pun>);</span><br>
<span class=pln> </span><span
class=pun>};</span><br>
<span class=pln> </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=pln> </span><span
class=pun>}</span><br>
<span class=pln> </span><br>
<span class=pln> </span><span
class=kwd>if</span><span class=pun>(</span><span class=pln>does_uri_exist</span><span
class=pun>()){</span><br>
<span class=pln> </span><span
class=com># local uri does exist, is probably a user.</span><br>
<span class=pln> </span><br>
<span class=pln> </span><span
class=com># lookup location</span><br>
<span class=pln> </span><span
class=kwd>if</span><span class=pun>(</span><span class=pln>lookup</span><span
class=pun>(</span><span class=str>"location"</span><span class=pun>)){</span><br>
<span class=pln> route</span><span
class=pun>(</span><span class=lit>1</span><span class=pun>);</span><br>
<span class=pln> </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln> </span><span
class=pun>}</span><br>
<span class=pln> </span><span
class=pun>}</span><span class=pln> </span><span class=kwd>else</span><span
class=pln> </span><span class=pun>{</span><br>
<span class=pln> </span><span
class=com># probably a call to pstn....</span><br>
<span class=pln> route</span><span
class=pun>(</span><span class=lit>2</span><span class=pun>);</span><br>
<span class=pln> </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln> </span><span
class=pun>}</span><br>
<span class=pln> </span><span class=pun>}</span><br>
<span class=pun>}</span><br>
<span class=pln> </span><br>
<span class=pln>route</span><span class=pun>[</span><span class=lit>1</span><span
class=pun>]</span><span class=pln> </span><span class=pun>{</span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=pln> </span><span class=com># for INVITEs enable some additional helper routes</span><br>
<span class=pln> </span><span class=kwd>if</span><span
class=pln> </span><span class=pun>(</span><span class=pln>is_method</span><span
class=pun>(</span><span class=str>"INVITE"</span><span class=pun>))</span><span
class=pln> </span><span class=pun>{</span><br>
<span class=pln> t_on_branch</span><span
class=pun>(</span><span class=str>"2"</span><span class=pun>);</span><br>
<span class=pln> t_on_reply</span><span
class=pun>(</span><span class=str>"2"</span><span class=pun>);</span><br>
<span class=pln> t_on_failure</span><span
class=pun>(</span><span class=str>"1"</span><span class=pun>);</span><br>
<span class=pln> </span><span class=pun>}</span><br>
<span class=pln> </span><br>
<span class=pln> </span><span class=kwd>if</span><span
class=pln> </span><span class=pun>(!</span><span class=pln>t_relay</span><span
class=pun>())</span><span class=pln> </span><span class=pun>{</span><br>
<span class=pln> sl_reply_error</span><span
class=pun>();</span><br>
<span class=pln> </span><span class=pun>};</span><br>
<span class=pln> exit</span><span class=pun>;</span><br>
<span class=pun>}</span><br>
<span class=pln> </span><br>
<span class=pln>route</span><span class=pun>[</span><span class=lit>2</span><span
class=pun>]</span><br>
<span class=pun>{</span><br>
<span class=pln> </span><span class=com># pstn handling, simply route out to pstn.</span><br>
<span class=pln> xlog</span><span class=pun>(</span><span
class=str>"L_INFO"</span><span class=pun>,</span><span class=str>"rewritehostport to Splendor_VOIP_GW:5065"</span><span
class=pun>);</span><br>
<span class=pln> sl_send_reply</span><span
class=pun>(</span><span class=str>"100"</span><span class=pun>,</span><span
class=str>"Call Going To PSTN"</span><span class=pun>);</span><br>
<span class=pln> sethostport</span><span
class=pun>(</span><span class=str>"xx.yy.zz.39"</span><span
class=pun>);</span><br>
<span class=pln> route</span><span class=pun>(</span><span
class=lit>1</span><span class=pun>);</span><br>
<span class=pun>}</span><br>
<span class=pln> </span><br>
<span class=com>/*</span><br>
<span class=com>route[2] {</span><br>
<span class=com># for INVITEs enable some additional helper routes</span><br>
<span class=com> rewritehostport ("xx.yy.zz.39:5060");</span><br>
<span class=com> xlog("L_INFO","rewritehostport to Splendor_VOIP_GW:5065");</span><br>
<span class=com> route(1);</span><br>
<span class=com>}</span><br>
<span class=com>*/</span><span class=pln> </span><br>
<span class=pln> </span><br>
<span class=com># Presence route</span><br>
<span class=com>/* uncomment the whole following route for enabling presence</span><br>
<span class=com> NOTE: do not forget to enable the call of this route from the main</span><br>
<span class=com> route */</span><br>
<span class=pln> </span><br>
<span class=pln>branch_route</span><span class=pun>[</span><span class=lit>2</span><span
class=pun>]</span><span class=pln> </span><span class=pun>{</span><br>
<span class=pln> xlog</span><span class=pun>(</span><span
class=str>"new branch at $ru\n"</span><span class=pun>);</span><br>
<span class=pun>}</span><br>
<span class=pln> </span><br>
<span class=pln> </span><br>
<span class=pln>onreply_route</span><span class=pun>[</span><span class=lit>2</span><span
class=pun>]</span><span class=pln> </span><span class=pun>{</span><br>
<span class=pln> xlog</span><span class=pun>(</span><span
class=str>"incoming reply\n"</span><span class=pun>);</span><br>
<span class=pun>}</span><o:p></o:p></pre>
<p class=MsoNormal><span class=value><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></span></p>
<p class=MsoNormal><span class=value><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></span></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
11.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>