<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;</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>&nbsp;</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>&nbsp;</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>

<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>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;<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>&nbsp;</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&nbsp;TABLE&nbsp;`sipfriends`&nbsp;(
</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'>&nbsp;&nbsp;&nbsp;`name`&nbsp;varchar(40)&nbsp;NOT&nbsp;NULL&nbsp;default&nbsp;'',&nbsp;&nbsp;&nbsp;
</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'>&nbsp;&nbsp;&nbsp;`username`&nbsp;varchar(40)&nbsp;default&nbsp;'',
</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'>&nbsp;&nbsp;&nbsp;`secret`&nbsp;varchar(40)&nbsp;NOT&nbsp;NULL&nbsp;default&nbsp;'',
</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'>&nbsp;&nbsp;&nbsp;`context`&nbsp;varchar(40)&nbsp;NOT&nbsp;NULL&nbsp;default&nbsp;'',
</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'>&nbsp;&nbsp;&nbsp;`ipaddr`&nbsp;varchar(20)&nbsp;NOT&nbsp;NULL&nbsp;default&nbsp;'',
</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'>&nbsp;&nbsp;&nbsp;`port`&nbsp;int(6)&nbsp;NOT&nbsp;NULL&nbsp;default&nbsp;'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'>&nbsp;&nbsp;&nbsp;`regseconds`&nbsp;int(11)&nbsp;NOT&nbsp;NULL&nbsp;default&nbsp;'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'>&nbsp;&nbsp;&nbsp;PRIMARY&nbsp;KEY&nbsp;&nbsp;(`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'>&nbsp;)&nbsp;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>&nbsp;</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'>And there was no dial tone on the phone. Can you please tell
me as to what&#8217;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>&nbsp;</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&#8230;<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'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;<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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>