<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>&nbsp;</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 &#8220;mentioned below&#8221; </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>&nbsp;</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 --&gt; Uses Localhost MySQL Server</span><br>
<span class=value>Openser Server B --&gt; Uses ServerA MySQL server</span><br>
<br>
<span class=value>Each server is in a different location. &nbsp;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 &nbsp;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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</span><br>
<span class=com>#set module path</span><br>
<span class=pln>mpath</span><span class=pun>=</span><span class=str>&quot;/usr/local/lib/openser/modules/&quot;</span><br>
<span class=pln>&nbsp;</span><br>
<span class=com>/* uncomment next line for MySQL DB support */</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;mysql.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;sl.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;tm.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;rr.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;maxfwd.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;usrloc.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;registrar.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;textops.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;mi_fifo.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;uri_db.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;uri.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;xlog.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;auth.so&quot;</span><br>
<span class=pln>loadmodule </span><span class=str>&quot;auth_db.so&quot;</span><br>
<span class=pln>&nbsp;</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>&quot;rr&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;enable_full_lr&quot;</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>&quot;rr&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;append_fromtag&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=lit>0</span><span
class=pun>)</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp;</span><br>
<span class=com># ----- rr params -----</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>&quot;registrar&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;method_filtering&quot;</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(&quot;registrar&quot;, &quot;append_branches&quot;, 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(&quot;registrar&quot;, &quot;max_contacts&quot;, 10)</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp;</span><br>
<span class=com># ----- uri_db params -----</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>&quot;uri_db&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;use_uri_table&quot;</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>&quot;uri_db&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;db_url&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;mysql://db_string&quot;</span><span
class=pun>)</span><br>
<span class=pln>&nbsp;</span><br>
<span class=com># ----- usrloc params -----</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>&quot;usrloc&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;db_mode&quot;</span><span
class=pun>,</span><span class=pln> &nbsp; </span><span class=lit>3</span><span
class=pun>)</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>&quot;usrloc&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;db_url&quot;</span><span
class=pun>,</span><span class=str>&quot;mysql://db_string&quot;</span><span
class=pun>)</span><br>
<span class=pln>&nbsp;</span><br>
<span class=com># ----- auth_db params -----</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>&quot;auth_db&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;calculate_ha1&quot;</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>&quot;auth_db&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;password_column&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;password&quot;</span><span
class=pun>)</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>&quot;auth_db&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;use_domain&quot;</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>&quot;auth_db&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;db_url&quot;</span><span
class=pun>,</span><span class=str>&quot;mysql://db_string&quot;</span><span
class=pun>)</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>&quot;usrloc&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;db_url&quot;</span><span
class=pun>,</span><span class=str>&quot;mysql://db_string&quot;</span><span
class=pun>)</span><br>
<span class=pln>&nbsp;</span><br>
<span class=com># ----------------- setting module-specific parameters ---------------</span><br>
<span class=pln>&nbsp;</span><br>
<span class=com># -- mi_fifo params --</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>modparam</span><span class=pun>(</span><span class=str>&quot;mi_fifo&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;fifo_name&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;/tmp/openser_fifo_xmpp&quot;</span><span
class=pun>)</span><br>
<span class=pln>&nbsp;</span><br>
<span class=com># -- usrloc params --</span><br>
<span class=pln>&nbsp;</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>&quot;rr&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;enable_full_lr&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=lit>1</span><span
class=pun>)</span><br>
<span class=pln>&nbsp;</span><br>
<span class=com>###### Routing Logic ########</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>route</span><br>
<span class=pun>{</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </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>&quot;10&quot;</span><span class=pun>)){</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sl_send_reply</span><span
class=pun>(</span><span class=str>&quot;486&quot;</span><span class=pun>,</span><span
class=pln> </span><span class=str>&quot;To Many Hops&quot;</span><span
class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=pun>}</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </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>&gt;=</span><span class=pln> max_len</span><span
class=pun>){</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sl_send_reply</span><span
class=pun>(</span><span class=str>&quot;513&quot;</span><span class=pun>,</span><span
class=pln> </span><span class=str>&quot;Message To Big&quot;</span><span
class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=pun>}</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=com>#########End of XMPP Section ###################</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=kwd>if</span><span
class=pun>(!</span><span class=pln>is_method</span><span class=pun>(</span><span
class=str>&quot;REGISTER&quot;</span><span class=pun>)){</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; record_route</span><span
class=pun>();</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=pun>}</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=kwd>if</span><span
class=pun>(</span><span class=pln>loose_route</span><span class=pun>()){</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; route</span><span
class=pun>(</span><span class=lit>1</span><span class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=pun>}</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=kwd>if</span><span class=pun>(</span><span class=pln>is_method</span><span
class=pun>(</span><span class=str>&quot;REGISTER&quot;</span><span class=pun>)){</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=kwd>if</span><span class=pun>(!</span><span class=pln>www_authorize</span><span
class=pun>(</span><span class=str>&quot;mydomain.net&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;subscriber&quot;</span><span
class=pun>)){</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; www_challenge</span><span
class=pun>(</span><span class=str>&quot;mydomain.net&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;1&quot;</span><span
class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=pun>}</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; save</span><span
class=pun>(</span><span class=str>&quot;location&quot;</span><span class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=pun>{</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t_replicate</span><span
class=pun>(</span><span class=str>&quot;xx.yy.zz.12&quot;</span><span
class=pun>,</span><span class=pln> </span><span class=str>&quot;5060&quot;</span><span
class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=pun>};</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=pun>}</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=com># local uri does exist, is probably a user.</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=com># lookup location</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=kwd>if</span><span class=pun>(</span><span class=pln>lookup</span><span
class=pun>(</span><span class=str>&quot;location&quot;</span><span class=pun>)){</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; route</span><span
class=pun>(</span><span class=lit>1</span><span class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=pun>}</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=com># probably a call to pstn....</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; route</span><span
class=pun>(</span><span class=lit>2</span><span class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=kwd>return</span><span class=pun>;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span
class=pun>}</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=pun>}</span><br>
<span class=pun>}</span><br>
<span class=pln>&nbsp;</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>&nbsp;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=com># for INVITEs enable some additional helper routes</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </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>&quot;INVITE&quot;</span><span class=pun>))</span><span
class=pln> </span><span class=pun>{</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t_on_branch</span><span
class=pun>(</span><span class=str>&quot;2&quot;</span><span class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t_on_reply</span><span
class=pun>(</span><span class=str>&quot;2&quot;</span><span class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t_on_failure</span><span
class=pun>(</span><span class=str>&quot;1&quot;</span><span class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=pun>}</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sl_reply_error</span><span
class=pun>();</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=pun>};</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; exit</span><span class=pun>;</span><br>
<span class=pun>}</span><br>
<span class=pln>&nbsp;</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>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=com># pstn handling, simply route out to pstn.</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xlog</span><span class=pun>(</span><span
class=str>&quot;L_INFO&quot;</span><span class=pun>,</span><span class=str>&quot;rewritehostport to Splendor_VOIP_GW:5065&quot;</span><span
class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sl_send_reply</span><span
class=pun>(</span><span class=str>&quot;100&quot;</span><span class=pun>,</span><span
class=str>&quot;Call Going To PSTN&quot;</span><span class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sethostport</span><span
class=pun>(</span><span class=str>&quot;xx.yy.zz.39&quot;</span><span
class=pun>);</span><br>
<span class=pln>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;route</span><span class=pun>(</span><span
class=lit>1</span><span class=pun>);</span><br>
<span class=pun>}</span><br>
<span class=pln>&nbsp;</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>&nbsp; &nbsp; &nbsp; &nbsp;rewritehostport (&quot;xx.yy.zz.39:5060&quot;);</span><br>
<span class=com>&nbsp; &nbsp; &nbsp; &nbsp;xlog(&quot;L_INFO&quot;,&quot;rewritehostport to Splendor_VOIP_GW:5065&quot;);</span><br>
<span class=com>&nbsp; &nbsp; &nbsp; &nbsp;route(1);</span><br>
<span class=com>}</span><br>
<span class=com>*/</span><span class=pln> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><br>
<span class=pln>&nbsp;</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>&nbsp; &nbsp;NOTE: do not forget to enable the call of this route from the main</span><br>
<span class=com>&nbsp; &nbsp; &nbsp;route */</span><br>
<span class=pln>&nbsp;</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>&nbsp; &nbsp; &nbsp; &nbsp; xlog</span><span class=pun>(</span><span
class=str>&quot;new branch at $ru\n&quot;</span><span class=pun>);</span><br>
<span class=pun>}</span><br>
<span class=pln>&nbsp;</span><br>
<span class=pln>&nbsp;</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>&nbsp; &nbsp; &nbsp; &nbsp; xlog</span><span class=pun>(</span><span
class=str>&quot;incoming reply\n&quot;</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>&nbsp;</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>&nbsp;</o:p></span></font></span></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
11.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>