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. The bean 'xxx' could not be injected as a 'xxx'because it is a JDK dynamic proxy that implements

    启动springboot项目的时候示以下错误 Error starting ApplicationContext. To display the conditions report re-run yo ...

  2. HDU 4403 A very hard Aoshu problem (DFS暴力)

    题意:给你一个数字字符串.问在字符串中间加'='.'+'使得'='左右两边相等. 1212  : 1+2=1+2,   12=12. 12345666 : 12+3+45+6=66.  1+2+3+4 ...

  3. windows平台简易直播系统搭建

    最近做直播系统的朋友很多,正好前端时间也在做这一块,写片文章分享下开发心得,以为后用. 直播系统我将它分为前堆推流,后台服务,客户端播放三大部分.前端推流基于ffmpeg,后台服务 使用crtmp服务 ...

  4. UVA 10042 Smith Numbers(数论)

    Smith Numbers Background While skimming his phone directory in 1982, Albert Wilansky, a mathematicia ...

  5. Flash制作和软件使用

    Flash制作和软件使用 2014-11-09 ——君子善假于物也 引子 虽说FLASH在随着HTML5的发展而受阻,尤其移动终端都不再支持它了,但是在一段时间内还是重要的.近期朋友说要结婚,想弄个电 ...

  6. Django-Rest-Framework部分源码流程分析

    class TestView(APIView): ''' 调用这个函数的时候,会自动触发authentication_classes的运行,所以会先执行上边的类 ''' authentication_ ...

  7. Android性能优化之中的一个 布局优化

    本文为Android性能优化--布局优化,主要介绍使用抽象布局标签(include, viewstub, merge).去除不必要的嵌套和View节点.降低不必要的infalte及其它Layout方面 ...

  8. Android 短信验证码控件

    Android 短信验证码控件,便于项目中使用统一样式,统一提示改动.个人觉得挺好用的 <span style="font-size:18px;">public cla ...

  9. 在jquery的ajax方法中的success中使用return要注意的问题

    jquery的ajax方法:在success中使用return:来结束程序的时候,结束的只是success这个方法,也就是说success中的return的作用范围只是success: 如果要想在su ...

  10. ios开发动物园管理 继承多态的实现

    // // main.m // 继承 // // #import <Foundation/Foundation.h> #import "Animal.h" #impor ...