<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2176/25/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/MSSQL+CEL+Backend?focusedCommentId=21464401#comment-21464401">MSSQL CEL Backend</a></h2>
        <h4>Page
        <b>comment added</b> by              <a href="https://wiki.asterisk.org/wiki/display/~wolfantec">Antonio Insuasti</a>
    </h4>
    <br/>
    <div class="notificationGreySide">
       <p><b>bold</b> For FreeTDS, cel_tds</p>

<p>this is the correct database create statment. </p>

<p>CREATE TABLE cel ( <br/>
        <span class="error">&#91;eventtype&#93;</span> <span class="error">&#91;varchar&#93;</span> (30) NULL ,<br/>
        <span class="error">&#91;eventtime&#93;</span> <span class="error">&#91;datetime&#93;</span> NULL , <br/>
        <span class="error">&#91;cidname&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL , <br/>
        <span class="error">&#91;cidnum&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL , <br/>
        <span class="error">&#91;cidani&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL ,<br/>
        <span class="error">&#91;cidrdnis&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL , <br/>
        <span class="error">&#91;ciddnid&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL ,<br/>
        <span class="error">&#91;exten&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL , <br/>
        <span class="error">&#91;context&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL , <br/>
        <span class="error">&#91;channel&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL ,<br/>
        <span class="error">&#91;linkedid&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL ,<br/>
        <span class="error">&#91;appname&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL ,<br/>
        <span class="error">&#91;appdata&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL , <br/>
        <span class="error">&#91;amaflags&#93;</span> <span class="error">&#91;varchar&#93;</span> (16) NULL , <br/>
        <span class="error">&#91;accountcode&#93;</span> <span class="error">&#91;varchar&#93;</span> (20) NULL ,<br/>
        <span class="error">&#91;uniqueid&#93;</span> <span class="error">&#91;varchar&#93;</span> (32) NULL , <br/>
        <span class="error">&#91;userfield&#93;</span> <span class="error">&#91;varchar&#93;</span> (255) NULL , <br/>
        <span class="error">&#91;peer&#93;</span> <span class="error">&#91;varchar&#93;</span> (80) NULL <br/>
) ;</p>


<p><b>bold</b> Setup FreeTds file</p>

<p>in the file /etc/freetds/freetds.conf define Freetds conection (conection name, host, port) </p>

<p><span class="error">&#91;Microsoft&#93;</span><br/>
        host = 192.168.1.110<br/>
        port = 1433<br/>
        tds version = 7.0</p>

<p><b>bold</b> Setup cel_tds.conf</p>

<p><span class="error">&#91;global&#93;</span><br/>
connection=Microsoft<br/>
dbname=asterisk<br/>
table=cel<br/>
user=voipdbuser<br/>
password=voipdpass<br/>
charset=BIG5</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/MSSQL+CEL+Backend?focusedCommentId=21464401#comment-21464401">View Online</a>
              |
       <a id="reply-21464401" href="https://wiki.asterisk.org/wiki/display/AST/MSSQL+CEL+Backend?replyToComment=21464401#comment-21464401">Reply To This</a>
           </div>

</div>
</div>
</div>
</div>
</body>
</html>