Compile, configure, and install the latest FreeTDS package:

  • [pre]           tar -zxvf freetds-0.62.4.tar.gz &&            cd freetds-0.62.4 &&            ./configure --prefix=/usr --with-tdsver=7.0            make &&            make install [/pre]

                Compile, or recompile, asterisk so that it will now add support                for cdr_tds.

  • [pre]                   make clean && ./configure --with-tds &&                    make update &&                    make &&                    make install [/pre]

                Only install one database connector.  Do not confuse asterisk                by using both ODBC (cdr_odbc) and FreeTDS (cdr_tds).                This command will erase the contents of cdr_odbc.conf

  • [pre]        [ -f /etc/asterisk/cdr_odbc.conf ] > /etc/asterisk/cdr_odbc.conf [/pre]

                Setup cdr_tds configuration files.  These are working samples                from my system.  You will need to modify for your setup. Define                your usernames and passwords here, secure file as well.

  • [pre]                /etc/asterisk/cdr_tds.conf            [global]            hostname=192.168.1.25            port=1433            dbname=voipdb            user=voipdbuser            password=voipdpass            charset=BIG5 [/pre]

                And finally, create the 'cdr' table in your mssql database.

  • [pre]        CREATE TABLE cdr (                 [accountcode]   [varchar] (20)          NULL ,                 [src]           [varchar] (80)          NULL ,                 [dst]           [varchar] (80)          NULL ,                 [dcontext]      [varchar] (80)          NULL ,                 [clid]          [varchar] (80)          NULL ,                 [channel]       [varchar] (80)          NULL ,                 [dstchannel]    [varchar] (80)          NULL ,                 [lastapp]       [varchar] (80)          NULL ,                 [lastdata]      [varchar] (80)          NULL ,                 [start]         [datetime]              NULL ,                 [answer]        [datetime]              NULL ,                 [end]           [datetime]              NULL ,                 [duration]      [int]                   NULL ,                 [billsec]       [int]                   NULL ,                 [disposition]   [varchar] (20)          NULL ,                 [amaflags]      [varchar] (16)          NULL ,                 [uniqueid]      [varchar] (150)         NULL ,                 [userfield]     [varchar] (256)         NULL         ) [/pre]

                Start asterisk in verbose mode, you should see that asterisk                logs a connection to the database and will now record every                call to the database when it's complete.

asterisk用 freetds记录 cdr 到mssql的更多相关文章

  1. centos6.4下安装freetds使php支持mssql

    centos版本:6.4 php版本5.3.17 没有安装之前的情况:nginx+php+mysql+FPM-FCGI 接下来安装步骤如下: 1.打开http://www.freetds.org/,进 ...

  2. 【Linux】freetds安装配置连接MSSQL

    我使用的是freetds-0.91,下载地址:http://pan.baidu.com/s/1hq68rZY 安装编译(根据需要unixodbc): [root@zabbixserver / ]# t ...

  3. Linux下用freetds连接mssql中文乱码的问题【参考2】

    php5.3的情况下,用pdo的dblib驱动无法连接mssql的,根据官方的描述,5.2已经修改这个bug,5.3没有. 用php自带的mssql函数可以的.编译freetds,php_mssql, ...

  4. linux服务之asterisk

    由于Asterisk过于专业且复杂,所以目前也存在大量衍生自Asterisk但简化过的通信系统,以让用户较容易使用.比如在欧美比较流行的elastix.trixbox.或以简体中文为基础的Freeir ...

  5. [转]开源应用架构之asterisk

    作者:Russell Bryant 翻译:jiazhengfeng Asterisk[1]是一款GPLv2协议下的开源电话应用平台.简单来说,Asterisk是一个服务器应用,能够完成发起电话呼叫.接 ...

  6. mysql实时同步到mssql的解决方案

    数据库在应用程序中是必不可少的部分,mysql是开源的,所以很多人它,mssql是微软的,用在windows平台上是非常方便的,所以也有很多人用它.现在问题来了,如何将这两个数据库同步,即数据内容保持 ...

  7. Python3 freetds.conf odbcinst.ini odbc.ini 之间的关系

    Python3 freetds.conf odbcinst.ini odbc.ini 之间的关系 三者分别是FreeTDS和UnixODBC的配置文件: 1,FreeTDS中的freetds.conf ...

  8. php.ini

    [PHP];;;;;;;;;;;;;;;;;;;; About php.ini   ;;;;;;;;;;;;;;;;;;;;; PHP's initialization file, generally ...

  9. PHP配置详解

    [PHP] ;;;;;;;;;;;;;;;;;;; ; About php.ini ; ;;;;;;;;;;;;;;;;;;; ; This file controls many aspects of ...

随机推荐

  1. Git以及github的使用方法(二)创建仓库,git add添加到“暂储区”,git commit添加到“本地仓库”

    什么是版本库呢?版本库又名仓库,英文名repository,你可以简单理解成一个目录,这个目录里面的所有文件都可以被Git管理起来,每个文件的修改.删除,Git都能跟踪,以便任何时刻都可以追踪历史,或 ...

  2. PC和手机怎么实现绝对居中?

    示例1(懒人之家): http://www.51xuediannao.com/js/nav/360buy_nav.html 示例2(google官方):

  3. javascript原生调用摄像头

    HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta ...

  4. JS推断浏览器类型与版本号

    在JS中推断浏览器的类型,预计是每一个编辑过页面的开发者都遇到过的问题.在众多的浏览器产品中.IE.Firefox.Opera.Safari........众多品牌却标准不一,因此时常须要依据不同的浏 ...

  5. C中的预编译编译链接

        http://ke.qq.com/webcourse/index.html#course_id=67888&term_id=100058920&taid=13934591901 ...

  6. vs2012编译ffmpeg

    从官方网站down下来的ffmpeg没有pdb文件不方便调试,为此使用VS2012编译ffmpeg. 编译步骤: 一.安装MinGW,具体的安装方法上一篇文章已经有介绍这里不在赘述. 二.下载文件并放 ...

  7. redirect_uri 參数错误的解决的方法

    我通过java代码去获得用户的openid,一直报redirect_uri. 我页面代码的链接为: https://open.weixin.qq.com/connect/oauth2/authoriz ...

  8. python--函数嵌套 命名空间

    函数的嵌套调用 def func(): print(123) def func2(): func() print(345) func2() #结果:123 345 函数的嵌套定义 def func() ...

  9. paxos算法之粗浅理解

    paxos出身 paxos出身名门,它爹是没多久前获得图灵奖的在分布式领域大名鼎鼎的LeslieLamport. paxos为何而生 那么Lamport他老人家为什么要搞这个东东呢,不是吃饱了撑的,而 ...

  10. caffe配置Makefile.config----ubuntu16.04--重点是matlab的编译

    来源: http://blog.csdn.net/daaikuaichuan/article/details/61414219 配置Makefile.config(参考:http://blog.csd ...