<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<title>1</title>

<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
h1
        {margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:3.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:16.0pt;
        font-family:Arial;}
h3
        {margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:3.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:Arial;}
p.MsoToc1, li.MsoToc1, div.MsoToc1
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p.MsoToc3, li.MsoToc3, div.MsoToc3
        {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;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc26687117">1.<span
style='color:windowtext;text-decoration:none'>         </span>Introduction<span
style='color:windowtext;display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>1</span></a></span></p>

<p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc26687118">1.1<span
style='color:windowtext;text-decoration:none'>       </span>Revision<span
style='color:windowtext;display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>1</span></a></span></p>

<p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc26687119">1.2<span
style='color:windowtext;text-decoration:none'>       </span>Why SER<span
style='color:windowtext;display:none;text-decoration:none'>.. </span><span
style='color:windowtext;display:none;text-decoration:none'>1</span></a></span></p>

<p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc26687120">1.3<span
style='color:windowtext;text-decoration:none'>       </span>Where to get SER<span
style='color:windowtext;display:none;text-decoration:none'>.. </span><span
style='color:windowtext;display:none;text-decoration:none'>1</span></a></span></p>

<p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc26687121">1.4<span
style='color:windowtext;text-decoration:none'>       </span>Installation<span
style='color:windowtext;display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>1</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>  
</span><a href="#_Toc26687122">1.4.<span style='text-decoration:none'>1    </span>DNS
SVR Resource Records<span style='color:windowtext;display:none;text-decoration:
none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>2</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>  
</span><a href="#_Toc26687123">1.4.<span style='text-decoration:none'>2   </span>Adding
a database for client information<span style='color:windowtext;display:none;
text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>3</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>     
</span><a href="#_Toc26687124">1.4.2.1<span style='color:windowtext;text-decoration:
none'>   </span>MySQL setup<span style='color:windowtext;display:none;
text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>3</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>     
</span><a href="#_Toc26687125">1.4.2.2<span style='color:windowtext;text-decoration:
none'>   </span>Modify SER configuration<span style='color:windowtext;
display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>5</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>     
</span><a href="#_Toc26687126">1.4.2.3<span style='color:windowtext;text-decoration:
none'>   </span>Adding an admin for your realm<span style='color:windowtext;
display:none;text-decoration:none'>.. </span><span
style='color:windowtext;display:none;text-decoration:none'>5</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><a href="#_Toc26687127">1.5<span
style='text-decoration:none'>         </span>Installing SERweb<span
style='color:windowtext;display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>6</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>   
</span><a href="#_Toc26687128">1.5.1<span style='color:windowtext;text-decoration:
none'>        </span>Installing SERweb<span style='color:windowtext;display:
none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>6</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>      
</span><a href="#_Toc26687129">1.5.1.1<span style='color:windowtext;text-decoration:
none'>  </span>Installing SERweb default configuration<span style='color:windowtext;
display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>6</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>      
</span><a href="#_Toc26687130">1.5.1.2<span style='color:windowtext;text-decoration:
none'>  </span>Installing SERweb custom file locations<span style='color:windowtext;
display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>6</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>   
</span><a href="#_Toc26687131">1.5.2<span style='color:windowtext;text-decoration:
none'>        </span>Modifying SERweb configuration general<span
style='color:windowtext;display:none;text-decoration:none'> </span><span
style='color:windowtext;display:none;text-decoration:none'>7</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><a href="#_Toc26687132">1.6<span
style='color:windowtext;text-decoration:none'>          </span>Diagnostics and
tools<span style='color:windowtext;display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>8</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>  
</span><a href="#_Toc26687133">1.6.1<span style='color:windowtext;text-decoration:
none'>         </span>Ngrep<span style='color:windowtext;display:none;
text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>8</span></a></span></p>

<p class=MsoToc3><span class=MsoHyperlink><span style='text-decoration:none'>  
</span><a href="#_Toc26687134">1.6.2<span style='color:windowtext;text-decoration:
none'>         </span>Sipsak<span style='color:windowtext;display:none;
text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>8</span></a></span></p>

<h1 style='margin-left:40.5pt;text-indent:-22.5pt'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><a name="_Toc26687117">Introduction</a></h1>

<h1 style='margin-left:49.5pt;text-indent:-31.5pt'><a name="_Toc26687118">1.1<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Revision</a></h1>

<p class=MsoNormal style='margin-left:1.0in;text-indent:-.25in'><span
style='font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Version 0.1 12/02/2002</p>

<p class=MsoNormal>&nbsp;</p>

<h1 style='margin-left:49.5pt;text-indent:-31.5pt'><a name="_Toc26687119">1.2<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Why
SER</a></h1>

<p class=MsoNormal style='margin-left:.5in'>SER is an open-source project that
aims to make available a fully functional and scalable Session Initiated
Protocol suite.  Call processing is described with a concise scripting language
that offers the flexibility of regular expressions and the ability to interface
with 3<sup>rd</sup> party applications for the purposes of call accounting and
authorization.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<h1 style='margin-left:49.5pt;text-indent:-31.5pt'><a name="_Toc26687120">1.3<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Where
to get SER</a></h1>

<p class=MsoNormal style='margin-left:.5in'>SER is available for download from <a
href="ftp://ftp.berlios.de/pub/ser">ftp://ftp.berlios.de/pub/ser</a></p>

<p class=MsoNormal style='margin-left:.5in'>The newest release may be found in
the folder /latest</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<h1 style='margin-left:49.5pt;text-indent:-31.5pt'><a name="_Toc26687121">1.4<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Installation</a></h1>

<p class=MsoNormal style='margin-left:.5in'>Installing SER on a RedHat Linux
distribution is a simple matter of unzipping the downloaded file and using your
favorite package manager.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Example /root&gt;rpm –i
ser-08.10-2.i386.rpm</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>You can start the service with
/etc/rc.d/init.d/ser start</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>You now have a functioning SIP
server, but what can you do with it?  At this point not very much.  With an SIP
client, such as Microsoft MSN Messenger 4.6, you can register with the server,
send Instant Messages to other logged on clients of the same server, and even have
voice conversations with them.  </p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>That sounds pretty good, but maybe
you’d like to add a little more security, or make you server accessible to
others.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<h3 style='margin-left:.5in;text-indent:-.5in'>1.4.1<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span> <a name="_Toc26687122">DNS SVR Resource Records</a></h3>

<p class=MsoNormal style='margin-left:.5in'>It is important that your SIP
clients can connect to your server for purposes of registration and call
control.  You might even want to have a redundant server to handle calls if
your primary server is unavailable.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>These requirements can be meet by
using DNS SVR Resource Records, available in BIND 8.X and up releases.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>The format for a SVR RR is this:</p>

<p class=MsoNormal style='margin-left:.5in'>            _service._protocol        SVR
Priority Weight     Port hostname</p>

<p class=MsoNormal style='margin-left:.5in'>In this case we want to establish
an entry for our primary SIP server, gateway.mydomain.com, that will listen on
UDP port 5060.  The entry will look like this:</p>

<p class=MsoNormal style='margin-left:.5in'>            _sip._udp         SRV     0
 0   5060  gateway.mydomain.com</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>After reloading your zone file you
can verify that the entry is working by using dig.</p>

<p class=MsoNormal style='margin-left:.5in'>            dig –t SRV
_sip._udp.mydomain.com</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>The results should look something
like this:</p>

<p class=MsoNormal style='margin-left:.5in'>; &lt;&lt;&gt;&gt; DiG 9.1.0
&lt;&lt;&gt;&gt; -t SRV _sip._udp.mydomain.com</p>

<p class=MsoNormal style='margin-left:.5in'>;; global options:  printcmd</p>

<p class=MsoNormal style='margin-left:.5in'>;; Got answer:</p>

<p class=MsoNormal style='margin-left:.5in'>;; -&gt;&gt;HEADER&lt;&lt;- opcode:
QUERY, status: NOERROR, id: 32654</p>

<p class=MsoNormal style='margin-left:.5in'>;; flags: qr aa rd ra; QUERY: 1,
ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>;; QUESTION SECTION:</p>

<p class=MsoNormal style='margin-left:.5in'>;_sip._udp.mydomain.com.         
IN      SRV</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>;; ANSWER SECTION:</p>

<p class=MsoNormal style='margin-left:.5in'>_sip._udp.mydomain.com.   86400  
IN   SRV   0 0 5060 gateway.mydomain.com.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>;; AUTHORITY SECTION:</p>

<p class=MsoNormal style='margin-left:.5in'>mydomain.com.             86400  
IN      NS      ns3.elsewhere.com.</p>

<p class=MsoNormal style='margin-left:.5in'>mydomain..com             86400  
IN      NS      gateway. mydomain.com.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>;; ADDITIONAL SECTION:</p>

<p class=MsoNormal style='margin-left:.5in'>gateway. mydomain.com.     86400  
IN      A       192.168.0.150</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>;; Query time: 6 msec</p>

<p class=MsoNormal style='margin-left:.5in'>;; SERVER:
192.168.0.150#53(192.168.0.150)</p>

<p class=MsoNormal style='margin-left:.5in'>;; WHEN: Tue Dec  3 08:34:17 2002</p>

<p class=MsoNormal style='margin-left:.5in'>;; MSG SIZE  rcvd: 132</p>

<p class=MsoNormal>&nbsp;</p>

<h3 style='margin-left:.5in;text-indent:-.5in'><a name="_Toc26687123">1.4.2<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Adding
a database for client information</a></h3>

<p class=MsoNormal style='margin-left:.5in'>By leveraging a MySQL database, we
can provide support for user credentials, and keeping track of where the
clients are logged on during server restarts.</p>

<h3 style='margin-left:.75in;text-indent:-.75in'><a name="_Toc26687124">1.4.2.1<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>MySQL setup</a></h3>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>The package you downloaded has scripts
to create the required database and establish permissions for the accounts
need.  A recent release of MySQL is recommended.  Earlier versions may have
problems with the syntax required to set permissions on the database.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>If you do not already have a copy
of MySQL installed, download it from your <a href="http://www.mysql.com/">http://www.mysql.com</a></p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Once you have MySQL installed and
started, execute /usr/sbin/ser_mysql.sh.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>You can verify that the database
has been created, and correct permissions assigned by using the mysql
management tool and these steps:</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Mysql&gt; select * from user;</p>

<p class=MsoNormal style='margin-left:.5in'>| Host               | User  |
Password         | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv
| Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv
| References_priv | Index_priv | Alter_priv |</p>

<p class=MsoNormal style='margin-left:.5in'>| %                  | ser   |
4e633cf914a735a0 | N           | N           | N           | N           |
N           | N         | N           | N             | N            |
N         | N          | N               | N          | N          |</p>

<p class=MsoNormal style='margin-left:.5in'>| localhost          | ser   |
4e633cf914a735a0 | Y           | Y           | Y           | Y           |
Y           | Y         | Y           | Y             | Y            | Y         |
N          | Y               | Y          | Y          |</p>

<p class=MsoNormal style='margin-left:.5in'>| %                  | serro |
7cb73a267cb7bd5f | N           | N           | N           | N           |
N           | N         | N           | N             | N            |
N         | N          | N               | N          | N          |</p>

<p class=MsoNormal style='margin-left:.5in'>| localhost          | serro |
7cb73a267cb7bd5f | Y           | N           | N           | N           |
N           | N         | N           | N             | N            |
N         | N          | N               | N          | N          |</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>The above results show that the two
user, ser and serro, have been created and granted the permissions needed to
access the database.  Note that in the above example the permissions have been
modified to deny access to these accounts from any system(%) other than local
host.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>mysql&gt; connect ser;</p>

<p class=MsoNormal style='margin-left:.5in'>Connection id:    294</p>

<p class=MsoNormal style='margin-left:.5in'>Current database: ser</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>mysql&gt; show tables;</p>

<p class=MsoNormal style='margin-left:.5in'>+-----------------+</p>

<p class=MsoNormal style='margin-left:.5in'>| Tables_in_ser   |</p>

<p class=MsoNormal style='margin-left:.5in'>+-----------------+</p>

<p class=MsoNormal style='margin-left:.5in'>| acc                    |</p>

<p class=MsoNormal style='margin-left:.5in'>| active_sessions |</p>

<p class=MsoNormal style='margin-left:.5in'>| aliases                |</p>

<p class=MsoNormal style='margin-left:.5in'>| config                |</p>

<p class=MsoNormal style='margin-left:.5in'>| event                 |</p>

<p class=MsoNormal style='margin-left:.5in'>| grp                    | </p>

<p class=MsoNormal style='margin-left:.5in'>| location             |</p>

<p class=MsoNormal style='margin-left:.5in'>| missed_calls     |</p>

<p class=MsoNormal style='margin-left:.5in'>| pending            |</p>

<p class=MsoNormal style='margin-left:.5in'>| phonebook       |</p>

<p class=MsoNormal style='margin-left:.5in'>| reserved           |</p>

<p class=MsoNormal style='margin-left:.5in'>| silo                   |</p>

<p class=MsoNormal style='margin-left:.5in'>| subscriber        |</p>

<p class=MsoNormal style='margin-left:.5in'>| version             |</p>

<p class=MsoNormal style='margin-left:.5in'>+-----------------+</p>

<p class=MsoNormal style='margin-left:.5in'>14 rows in set (0.00 sec)</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>mysql&gt; select * from subscriber;</p>

<p class=MsoNormal style='margin-left:.5in'>| phplib_id                       
| USER_ID | PASSWORD | FIRST_NAME | LAST_NAME | PHONE        |
EMAIL_ADDRESS              | DATETIME_CREATED    | DATETIME_MODIFIED   |
confirmation                     | flag | SendNotification | Greeting |
HA1                              | REALM      |
ha1b                             | perms | allow_find | timezone            |</p>

<p class=MsoNormal style='margin-left:.5in'>| 4cefa7a4d3c8c2dbf6328520bd873a19
| admin     | heslo | first        | admin    | 557-8469     |
admin@iptel.org      | 2002-12-02 19:20:41 | 2002-12-02 20:29:46 | 80e0f273b2067d40277b49ff842bb9e3 | o    |                  |          |
c79a8f8f08596baa84bb02c88884426d | iptel.org | f322c94b8b2fbe557d43ab3ac9e05b3a
| admin | 1          | America/Los_Angeles |</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>This last query shows that you have
one user account defined and it has administrator privileges.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>We’ll need to add another account
to be the administrator for your realm, which we will do after the next
section.</p>

<h3 style='margin-left:.75in;text-indent:-.75in'><a name="_Toc26687125">1.4.2.2<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Modify SER configuration</a></h3>

<p class=MsoNormal style='margin-left:.5in'>Now that we have a working MySQL
database, we need to modify the configuration file for ser, located on a RedHat
7.X install in /etc/ser.  The following changes need to be made.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Uncomment this line:  loadmodule
&quot;//usr/lib/ser/modules/mysql.so</p>

<p class=MsoNormal style='margin-left:.5in'>Comment this line:  modparam(&quot;usrloc&quot;,
&quot;db_mode&quot;,   0)</p>

<p class=MsoNormal style='margin-left:.5in'>Uncomment this line:  modparam(&quot;usrloc&quot;,
&quot;db_mode&quot;, 2)</p>

<p class=MsoNormal style='margin-left:.5in'>Uncomment this line:  modparam(&quot;auth&quot;,
&quot;calculate_ha1&quot;, yes)</p>

<p class=MsoNormal style='margin-left:.5in'>Uncomment this line: modparam(&quot;auth&quot;,
&quot;password_column&quot;, &quot;password&quot;)</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Change (uri==”myself”) to (uri=~”mydomain.com”)</p>

<p class=MsoNormal style='margin-left:.5in'>Uncomment these lines and change
all instances of iptel.org to mydomain.com</p>

<p class=MsoNormal style='margin-left:.5in'>                       if (!www_authorize(&quot;mydomain.com&quot;,
&quot;subscriber&quot;)) {</p>

<p class=MsoNormal style='margin-left:.5in'>                               www_challenge(&quot;mydomain.com&quot;,
&quot;0&quot;);</p>

<p class=MsoNormal style='margin-left:.5in'>                              
break;</p>

<p class=MsoNormal style='margin-left:.5in'>                       };</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>We’re now ready to restart ser.  On
RedHat use /etc/rc.d/init.d/ser restart</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<h3 style='margin-left:.75in;text-indent:-.75in'><a name="_Toc26687126">1.4.2.3<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Adding an admin for your realm</a></h3>

<p class=MsoNormal style='margin-left:.5in'>Now that we have a working database
and ser is configured to use it, we need to add some users and at least one of
them should have administrator privileges.  The administrator role becomes
important if you want to use a web management tool such as serweb.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Basic account manipulation can be
performed with the serctl script, located in /usr/local/sbin.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>To add a user use these commands</p>

<p class=MsoNormal style='margin-left:.5in'>serctl add JoeUser qwerty <a
href="mailto:joe@mydomain.com">joe@mydomain.com</a></p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>To make JoeUser an administrator,
we need to logon to MySQL and modify the database.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>mysql&gt; connect ser;</p>

<p class=MsoNormal style='margin-left:.5in'>mysql&gt; update subscriber set
perms=”admin” where USER_ID=”JoeUser”;</p>

<p class=MsoNormal style='margin-left:.5in'>Query OK, 1 row affected (0.00 sec)</p>

<p class=MsoNormal style='margin-left:.5in'>Rows matched: 1  Changed: 1 
Warnings: 0</p>

<p class=MsoNormal style='margin-left:.5in'>mysql&gt; select * from subscriber;</p>

<p class=MsoNormal style='margin-left:.5in'>| 4cefa7a4d3c8c2dbf6328520bd873a19
| JoeUser     | qwerty |  |   |   | joe@mydomain.com   | 2002-12-02 19:20:41 | 2002-12-02 20:29:46 | 80e0f273b2067d40277b49ff842bb9e3 | o   
|                  |          | c79a8f8f08596baa84bb02c88884426d | mydomain.com
| f322c94b8b2fbe557d43ab3ac9e05b3a | admin | 1          | America/Los_Angeles |</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>The third from last field shows
that Joe has been assigned admin privileges.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>At this point Joe can logon to our
server, but since he is the only user, there is not much he can do.  We can now
add additional users using the serctl script, or now is a good time to look at
installing serweb, which will allow users to subscribe to our service.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<h3 style='margin-left:.5in;text-indent:-.5in'><a name="_Toc26687127">1.5<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Installing SERweb</a></h3>

<p class=MsoNormal style='margin-left:.5in'>The SERWeb package can be
downloaded from <a href="ftp://ftp.berlios.de/ser/latest/serweb">ftp://ftp.berlios.de/ser/latest/serweb</a></p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>The pages associated with SERweb
provide a starting point to customize your SIP user account management tools.</p>

<h3 style='margin-left:.5in;text-indent:-.5in'><a name="_Toc26687128">1.5.1<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Installing
SERweb</a></h3>

<h3 style='margin-left:.75in;text-indent:-.75in'><a name="_Toc26687129">1.5.1.1<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Installing SERweb default configuration</a></h3>

<p class=MsoNormal style='margin-left:.5in'>If you are installing this package
on a server that does not host any other web pages, you can simply extract the
files to the document directory of your web server.  This presumes that you
have a working webserver.  </p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<h3 style='margin-left:.75in;text-indent:-.75in'><a name="_Toc26687130">1.5.1.2<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Installing SERweb custom file locations</a></h3>

<p class=MsoNormal style='margin-left:.5in'>In case your server performs
multiple functions, and you want to just add the SERWeb tools to an existing
web site, we will need to make changes to a number of the php files.  The
following examples are from an Apache 2.0 on RedHat.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Unzip the files into a temporary
directory, such as /root/serweb.  The directory will contain these files:</p>

<p class=MsoNormal style='margin-left:.5in'>-rw-rw-r--    1 827     
2020        18561 Sep 25 16:31 COPYING</p>

<p class=MsoNormal style='margin-left:.5in'>drwxr-xr-x    2 827     
2020         1024 Nov 27 16:43 CVS</p>

<p class=MsoNormal style='margin-left:.5in'>-rw-rw-r--    1 827     
2020          529 Sep 25 16:29 README</p>

<p class=MsoNormal style='margin-left:.5in'>drwxr-xr-x    7 827     
2020         1024 Nov 27 22:24 html</p>

<p class=MsoNormal style='margin-left:.5in'>drwxr-xr-x    3 827     
2020         2048 Sep 26 10:26 phplib</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Move the html directory to the root
of your web server:</p>

<p class=MsoNormal style='margin-left:.5in'>mv html /usr/local/apache/htdocs/serweb</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Move the phplib directory to your
web server application directory:</p>

<p class=MsoNormal style='margin-left:.5in'>Mv phplib /usr/local/apache/phplib</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>These files need to have the path
to the libraries updated:</p>

<p class=MsoNormal style='margin-left:.5in'>./admin/prepend.php</p>

<p class=MsoNormal style='margin-left:.5in'>./user_interface/prepend.php</p>

<p class=MsoNormal style='margin-left:.5in'>./user_interface/reg/prepend.php</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>For these files the variable:
$_PHPLIB[&quot;libdir&quot;]  = &quot;../../phplib/&quot;; becomes
$_PHPLIB[&quot;libdir&quot;]  = &quot;../../../phplib/&quot;; </p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>In the ./admin directory the files acl.php,
index.php, and users.php will need their path to the forms library updated. 
For this example, add ../ to the existing line</p>

<p class=MsoNormal style='margin-left:.5in'>:require &quot;../../../phplib/oohforms.inc&quot;;</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>In the ./user_interface directory
the following files need the same change:</p>

<p class=MsoNormal style='margin-left:.5in'>accounting.php find_user.php                index.php         missed_calls.php</p>

<p class=MsoNormal style='margin-left:.5in'>my_account.php           phonebook.php            send_im.php</p>

<p class=MsoNormal style='margin-left:.5in'>notification_subscription.php</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Next these files in ./user_interface/reg
need the same change, with an additional ../:</p>

<p class=MsoNormal style='margin-left:.5in'>Finish.php                     get_pass.php                index.php</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>The last changes occur in the config.php
file to provide the location for graphic files, style sheets and time zone
information.  Update the following variables:</p>

<p class=MsoNormal style='margin-left:.5in'>$this-&gt;root_path=&quot;/serweb/&quot;;</p>

<p class=MsoNormal style='margin-left:.5in'>                $this-&gt;img_src_path
=   $this-&gt;root_path.&quot;img/&quot;;</p>

<p class=MsoNormal style='margin-left:.5in'>                $this-&gt;js_src_path
=    $this-&gt;root_path.&quot;styles/&quot;;</p>

<p class=MsoNormal style='margin-left:.5in'>                $this-&gt;style_src_path
= $this-&gt;root_path.&quot;styles/&quot;;</p>

<p class=MsoNormal style='margin-left:.5in'>                $this-&gt;zonetab_file
=   &quot;/usr/share/zoneinfo/zone.tab&quot;;         </p>

<p class=MsoNormal style='margin-left:.5in'>//TZ zone descriptions file,
usually: /usr/share/zoneinfo/zone.tab</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<h3 style='margin-left:.5in;text-indent:-.5in'><a name="_Toc26687131">1.5.2<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Modifying
SERweb configuration general</a></h3>

<p class=MsoNormal style='margin-left:.5in'>We need to update /usr/local/apache/htdocs/serweb/config.php
to represent our realm.  The following variables need to be changed to our
domain:</p>

<p class=MsoNormal style='margin-left:.5in'>              
$this-&gt;realm=&quot;mydomain.com&quot;;</p>

<p class=MsoNormal style='margin-left:.5in'>                $this-&gt;domainname=&quot;
mydomain.com&quot;;</p>

<p class=MsoNormal style='margin-left:.5in'>               
$this-&gt;web_contact=&quot;sip:JoeUser@ mydomain.com&quot;;</p>

<p class=MsoNormal style='margin-left:.5in'>//address of pseudo sender</p>

<p class=MsoNormal style='margin-left:.5in'>                $this-&gt;default_domain=&quot;
mydomain.com&quot;;</p>

<p class=MsoNormal style='margin-left:.5in'>               
$this-&gt;mail_header_from=&quot;Registration@ mydomain.com&quot;;</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Additionally we will want to modify
the section for Terms and Conditions, either replacing it with appropriate
language for our services, or at least replacing iptel.org with our domain
information.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<h3 style='margin-left:.5in;text-indent:-.5in'><a name="_Toc26687132">1.6<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Diagnostics and tools</a></h3>

<p class=MsoNormal style='margin-left:.5in'>Detailed information about the
communications between clients and the SIP server is needed to isolate
problems.  Two tools that can be used to gather such information are sipsak and
ngrep.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<h3 style='margin-left:.5in;text-indent:-.5in'><a name="_Toc26687133">1.6.1<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Ngrep</a></h3>

<p class=MsoNormal style='margin-left:.5in'>Ngrep is a capable of listening in
on network traffic and filtering it in much the same way as grep can locate
patterns in files.  To monitor the communications between a client, joe, and
the server the following command would be run on the server:</p>

<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'>ngrep  -n 5060 –d
eth0 joe</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Since SIP communications are ASCII
based, all events such as REGISTER, INVITE, SUBSCRIBE, etc. are captured.  The
output of ngrep can identify problems with SIP addresses, or client identity.</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>Ngrep should be part of most modern
distributions, or can be downloaded from <a
href="http://sourceforge.net/projects/ngrep/">http://sourceforge.net/projects/ngrep/</a></p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<h3 style='margin-left:.5in;text-indent:-.5in'><a name="_Toc26687134">1.6.2<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Sipsak</a></h3>

<p class=MsoNormal style='margin-left:.5in'>Sipsak can be used to determine if
your server is responding to requests, and provide information on how your
server would route SIP connections.  Sipsak and basic documentation on its use
can be downloaded from <a href="http://sipsak.berlios.de/">http://sipsak.berlios.de</a> 
</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

<p class=MsoNormal style='margin-left:.5in'>&nbsp;</p>

</div>

</body>

</html>