<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>
<!--
/* Font Definitions */
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* 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'>Hello there,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> I have configured my asterisk to run on
Mysql backend. But the Asterisk was unable to pick the peer details from the
database. This is how I configured the Asterisk to run with mysql on the
backend.<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=3 color=black face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:black'>Edit /usr/src/asterisk/channels/Makefile,
change it to enable the MYSQL_FRIENDS <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:black'><o:p> </o:p></span></font></p>
<div style='mso-element:para-border-div;border:dashed #999999 1.0pt;padding:
0in 0in 7.0pt 0in;background:#EEEEEE;margin-left:76.5pt;margin-right:1.5in'>
<p class=MsoNormal style='background:#EEEEEE;border:none;padding:0in'><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>USE_MYSQL_FRIENDS=1<o:p></o:p></span></font></p>
<p class=MsoNormal style='background:#EEEEEE;border:none;padding:0in'><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>USE_SIP_MYSQL_FRIENDS=1<o:p></o:p></span></font></p>
</div>
<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'><o:p> </o:p></span></font></p>
<div style='mso-element:para-border-div;border:solid #999999 1.0pt;border-left:
solid #999999 1.5pt;padding:0in 0in 0in 0in;background:#EEEEEE;margin-left:
24.0pt;margin-right:96.0pt'><pre style='background:#EEEEEE;border:none;
padding:0in'><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;color:black'>cd /usr/src/asterisk<o:p></o:p></span></font></pre><pre
style='background:#EEEEEE;border:none;padding:0in'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;color:black'>make clean<o:p></o:p></span></font></pre><pre
style='background:#EEEEEE;border:none;padding:0in'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;color:black'>make <o:p></o:p></span></font></pre><pre
style='background:#EEEEEE;border:none;padding:0in'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;color:black'>make install<o:p></o:p></span></font></pre></div>
<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'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Created the database with the following structure:<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 color=black face=Courier><span
style='font-size:11.0pt;font-family:Courier;color:black'>CREATE TABLE `sipfriends` (
</span></font><font size=2 color=black face=Verdana><span style='font-size:
11.0pt;font-family:Verdana;color:black'><br>
</span></font><font size=2 color=black face=Courier><span style='font-size:
11.0pt;font-family:Courier;color:black'> `name` varchar(40) NOT NULL default '',
</span></font><font size=2 color=black face=Verdana><span style='font-size:
11.0pt;font-family:Verdana;color:black'><br>
</span></font><font size=2 color=black face=Courier><span style='font-size:
11.0pt;font-family:Courier;color:black'> `username` varchar(40) default '',
</span></font><font size=2 color=black face=Verdana><span style='font-size:
11.0pt;font-family:Verdana;color:black'><br>
</span></font><font size=2 color=black face=Courier><span style='font-size:
11.0pt;font-family:Courier;color:black'> `secret` varchar(40) NOT NULL default '',
</span></font><font size=2 color=black face=Verdana><span style='font-size:
11.0pt;font-family:Verdana;color:black'><br>
</span></font><font size=2 color=black face=Courier><span style='font-size:
11.0pt;font-family:Courier;color:black'> `context` varchar(40) NOT NULL default '',
</span></font><font size=2 color=black face=Verdana><span style='font-size:
11.0pt;font-family:Verdana;color:black'><br>
</span></font><font size=2 color=black face=Courier><span style='font-size:
11.0pt;font-family:Courier;color:black'> `ipaddr` varchar(20) NOT NULL default '',
</span></font><font size=2 color=black face=Verdana><span style='font-size:
11.0pt;font-family:Verdana;color:black'><br>
</span></font><font size=2 color=black face=Courier><span style='font-size:
11.0pt;font-family:Courier;color:black'> `port` int(6) NOT NULL default '0',
</span></font><font size=2 color=black face=Verdana><span style='font-size:
11.0pt;font-family:Verdana;color:black'><br>
</span></font><font size=2 color=black face=Courier><span style='font-size:
11.0pt;font-family:Courier;color:black'> `regseconds` int(11) NOT NULL default '0',
</span></font><font size=2 color=black face=Verdana><span style='font-size:
11.0pt;font-family:Verdana;color:black'><br>
</span></font><font size=2 color=black face=Courier><span style='font-size:
11.0pt;font-family:Courier;color:black'> PRIMARY KEY (`name`)
</span></font><font size=2 color=black face=Verdana><span style='font-size:
11.0pt;font-family:Verdana;color:black'><br>
</span></font><font size=2 color=black face=Courier><span style='font-size:
11.0pt;font-family:Courier;color:black'> ) TYPE=MyISAM;</span></font><font
size=2 face=Arial><span style='font-size:11.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><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'>And there was no dial tone on the phone. Can you please tell
me as to what’s wrong in the configuration and how as to how does asterisk
fetch the details of the peers from the database.<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'>Thanks in advance…<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'> <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'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#002392" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#002392'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#002392" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#002392'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#002392" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#002392'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#002392" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#002392'>Regards,<o:p></o:p></span></font></p>
<p class=MsoNormal><b><i><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial;font-weight:bold;font-style:italic'>Bharat M. Sarvan</span></font><o:p></o:p></i></b></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>