<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2172/18/9/_/styles/combined.css?spaceKey=AST&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://wiki.asterisk.org/wiki/display/AST/ODBC+Voicemail+Storage">ODBC Voicemail Storage</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://wiki.asterisk.org/wiki/display/~mjordan">Matt Jordan</a>
    </h4>
        <br/>
                         <h4>Changes (2)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >|recording|longblob|Yes| |NULL| |          <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{note} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{note|title=Upgrade Notice} <br></td></tr>
            <tr><td class="diff-unchanged" >For Asterisk 11, the following column should be added to the schema: <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>ODBC Storage allows you to store voicemail messages within a database instead of using a file. This is not a full realtime engine and only supports ODBC. The table description for the voicemessages table is as follows: </p>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Field</th>
<th class='confluenceTh'>Type</th>
<th class='confluenceTh'>Null</th>
<th class='confluenceTh'>Key</th>
<th class='confluenceTh'>Default</th>
<th class='confluenceTh'>Extra</th>
</tr>
<tr>
<td class='confluenceTd'>msgnum</td>
<td class='confluenceTd'>int(11)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'>dir</td>
<td class='confluenceTd'>varchar(80)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>MUL</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
</tr>
<tr>
<td class='confluenceTd'>context</td>
<td class='confluenceTd'>varchar(80)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'>macrocontext</td>
<td class='confluenceTd'>varchar(80)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'>callerid</td>
<td class='confluenceTd'>varchar(40)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'>origtime</td>
<td class='confluenceTd'>varchar(40)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'>duration</td>
<td class='confluenceTd'>varchar(20)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'>flag</td>
<td class='confluenceTd'>varchar(8)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'>mailboxuser</td>
<td class='confluenceTd'>varchar(80)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'>mailboxcontext</td>
<td class='confluenceTd'>varchar(80)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'>recording</td>
<td class='confluenceTd'>longblob</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'>NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
</tbody></table>
</div>


<div class="error"><span class="error">Unknown macro: {note|title=Upgrade Notice}</span> </div>
<p>For Asterisk 11, the following column should be added to the schema:</p>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Field</th>
<th class='confluenceTh'>Type</th>
<th class='confluenceTh'>Null</th>
<th class='confluenceTh'>Key</th>
<th class='confluenceTh'>Default</th>
<th class='confluenceTh'>Extra</th>
</tr>
<tr>
<td class='confluenceTd'>msg_id</td>
<td class='confluenceTd'>varchar(40)</td>
<td class='confluenceTd'>Yes</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> NULL</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
</tbody></table>
</div>


<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td></td></tr></table></div>

<p>The database name (from /etc/asterisk/res_odbc.conf) is in the odbcstorage variable in the general section of voicemail.conf. </p>

<p>You may modify the voicemessages table name by using odbctable=table_name in voicemail.conf.</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
        <a href="https://wiki.asterisk.org/wiki/display/AST/ODBC+Voicemail+Storage">View Online</a>
        |
        <a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=5242965&revisedVersion=3&originalVersion=2">View Changes</a>
                |
        <a href="https://wiki.asterisk.org/wiki/display/AST/ODBC+Voicemail+Storage?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>