- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在运行
CEL 工作正常(见下文),但 CDR 无法通过自适应 ODBC 工作。 (顺便说一句,标准 ODBC 和直接 MySQL 写入可用于 CDR。)
Asterisk 可以找到 CEL 的正确表和列。亲自看看:
dev-lt-tk1*CLI> core set verbose 99
Verbosity is at least 99
dev-lt-tk1*CLI> module reload cel_odbc.so
-- Reloading module 'cel_odbc.so' (ODBC CEL backend)
== Parsing '/opt/gemeinschaft/etc/asterisk/cel_odbc.conf': == Found
-- Found CEL table cel@odbc-voipstat101.
> Found id column with type 4 with len 10, octetlen 10, and numlen (0,10)
> Found eventtype column with type 12 with len 30, octetlen 30, and numlen (0,0)
> Found eventtime column with type 93 with len 19, octetlen 19, and numlen (0,10)
> Found userdeftype column with type 12 with len 255, octetlen 255, and numlen (0,0)
> Found cid_name column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found cid_num column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found cid_ani column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found cid_rdnis column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found cid_dnid column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found exten column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found context column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found channame column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found appname column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found appdata column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found accountcode column with type 12 with len 20, octetlen 20, and numlen (0,0)
> Found peeraccount column with type 12 with len 20, octetlen 20, and numlen (0,0)
> Found uniqueid column with type 12 with len 150, octetlen 150, and numlen (0,0)
> Found linkedid column with type 12 with len 150, octetlen 150, and numlen (0,0)
> Found amaflags column with type 4 with len 10, octetlen 10, and numlen (0,10)
> Found userfield column with type 12 with len 255, octetlen 255, and numlen (0,0)
> Found peer column with type 12 with len 80, octetlen 80, and numlen (0,0)
这是我的 CEL 表结构:
mysql> describe cel;
+-------------+--------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+-------------------+-----------------------------+
| id | int(30) | NO | PRI | NULL | auto_increment |
| eventtype | varchar(30) | NO | | NULL | |
| eventtime | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| userdeftype | varchar(255) | NO | | NULL | |
| cid_name | varchar(80) | NO | | NULL | |
| cid_num | varchar(80) | NO | | NULL | |
| cid_ani | varchar(80) | NO | | NULL | |
| cid_rdnis | varchar(80) | NO | | NULL | |
| cid_dnid | varchar(80) | NO | | NULL | |
| exten | varchar(80) | NO | | NULL | |
| context | varchar(80) | NO | | NULL | |
| channame | varchar(80) | NO | | NULL | |
| appname | varchar(80) | NO | | NULL | |
| appdata | varchar(80) | NO | | NULL | |
| accountcode | varchar(20) | NO | | NULL | |
| peeraccount | varchar(20) | NO | | NULL | |
| uniqueid | varchar(150) | NO | | NULL | |
| linkedid | varchar(150) | NO | | NULL | |
| amaflags | int(11) | NO | | NULL | |
| userfield | varchar(255) | NO | | NULL | |
| peer | varchar(80) | NO | | NULL | |
+-------------+--------------+------+-----+-------------------+-----------------------------+
21 rows in set (0.00 sec)
现在,当我使用 cdr_adaptive_odbc 时,加载模块时会得到这些奇怪的结果。列类型无法与 SQL 列类型匹配。
dev-lt-tk1*CLI> module reload cdr_adaptive_odbc.so
-- Reloading module 'cdr_adaptive_odbc.so' (Adaptive ODBC CDR backend)
== Parsing '/opt/gemeinschaft/etc/asterisk/cdr_adaptive_odbc.conf': == Found
-- Found adaptive CDR table ast_cdr@odbc-voipstat101.
> Found _id column with type 4 with len 10, octetlen 10, and numlen (0,10)
> Found calldate column with type 93 with len 19, octetlen 19, and numlen (0,10)
> Found uniqueid column with type -9 with len 32, octetlen 32, and numlen (0,0)
> Found clid column with type -9 with len 80, octetlen 240, and numlen (0,0)
> Found src column with type -9 with len 30, octetlen 30, and numlen (0,0)
> Found dst column with type -9 with len 30, octetlen 30, and numlen (0,0)
> Found dcontext column with type -9 with len 50, octetlen 50, and numlen (0,0)
> Found channel column with type -9 with len 60, octetlen 60, and numlen (0,0)
> Found dstchannel column with type -9 with len 60, octetlen 60, and numlen (0,0)
> Found lastapp column with type -9 with len 30, octetlen 30, and numlen (0,0)
> Found lastdata column with type -9 with len 80, octetlen 80, and numlen (0,0)
> Found duration column with type 4 with len 8, octetlen 8, and numlen (0,10)
> Found billsec column with type 4 with len 8, octetlen 8, and numlen (0,10)
> Found disposition column with type -9 with len 15, octetlen 15, and numlen (0,0)
> Found amaflags column with type -6 with len 3, octetlen 3, and numlen (0,10)
> Found accountcode column with type -9 with len 25, octetlen 25, and numlen (0,0)
> Found userfield column with type -9 with len 255, octetlen 255, and numlen (0,0)
> Found sequence column with type -8 with len 32, octetlen 32, and numlen (0,0)
> Found linkedid column with type -8 with len 32, octetlen 32, and numlen (0,0)
这是我们的 CDR 表结构:
mysql> describe ast_cdr;
+-------------+-----------------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-----------------------+------+-----+-------------------+----------------+
| _id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| calldate | timestamp | NO | MUL | CURRENT_TIMESTAMP | |
| uniqueid | varchar(32) | NO | MUL | NULL | |
| clid | varchar(80) | NO | | | |
| src | varchar(30) | NO | MUL | | |
| dst | varchar(30) | NO | MUL | | |
| dcontext | varchar(50) | NO | | | |
| channel | varchar(60) | NO | | | |
| dstchannel | varchar(60) | NO | | | |
| lastapp | varchar(30) | NO | | | |
| lastdata | varchar(80) | NO | | | |
| duration | mediumint(8) unsigned | NO | | 0 | |
| billsec | mediumint(8) unsigned | NO | | 0 | |
| disposition | varchar(15) | NO | | | |
| amaflags | tinyint(3) unsigned | NO | | 0 | |
| accountcode | varchar(25) | NO | MUL | | |
| userfield | varchar(255) | NO | | | |
| sequence | char(32) | YES | | NULL | |
| linkedid | char(32) | YES | | NULL | |
+-------------+-----------------------+------+-----+-------------------+----------------+
19 rows in set (0.00 sec)
有人知道为什么会发生这种情况吗?我研究了 cel_odbc.c 和 cdr_adaptive_odbc.c 源代码,它们似乎大量复制粘贴。
最佳答案
现在 CDR 自适应 ODBC 正在运行!我必须删除 SQL 表中的所有字符集:
这是旧表:
CREATE TABLE `ast_cdr` (
`_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`calldate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`uniqueid` varchar(32) NOT NULL,
`clid` varchar(80) NOT NULL DEFAULT '',
`src` varchar(30) NOT NULL DEFAULT '',
`dst` varchar(30) NOT NULL DEFAULT '',
`dcontext` varchar(50) NOT NULL DEFAULT '',
`channel` varchar(60) NOT NULL DEFAULT '',
`dstchannel` varchar(60) NOT NULL DEFAULT '',
`lastapp` varchar(30) NOT NULL DEFAULT '',
`lastdata` varchar(80) NOT NULL DEFAULT '',
`duration` mediumint(8) unsigned NOT NULL DEFAULT '0',
`billsec` mediumint(8) unsigned NOT NULL DEFAULT '0',
`disposition` varchar(15) NOT NULL DEFAULT '',
`amaflags` int(3) unsigned NOT NULL DEFAULT '0',
`accountcode` varchar(25) NOT NULL DEFAULT '',
`userfield` varchar(255) NOT NULL DEFAULT '',
`sequence` char(32) DEFAULT NULL,
`linkedid` char(32) DEFAULT NULL,
PRIMARY KEY (`_id`),
KEY `calldate` (`calldate`),
KEY `accountcode` (`accountcode`),
KEY `src_disposition` (`src`(25),`disposition`(4)),
KEY `dst_disposition` (`dst`(25),`disposition`(4)),
KEY `uniqueid` (`uniqueid`(25))
) ENGINE=MyISAM AUTO_INCREMENT=2973 DEFAULT CHARSET=latin1
这是新表:
CREATE TABLE `ast_cdr` (
`_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`calldate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`uniqueid` varchar(32) NOT NULL,
`clid` varchar(80)NOT NULL DEFAULT '',
`src` varchar(30) NOT NULL DEFAULT '',
`dst` varchar(30) NOT NULL DEFAULT '',
`dcontext` varchar(50) NOT NULL DEFAULT '',
`channel` varchar(60) NOT NULL DEFAULT '',
`dstchannel` varchar(60) NOT NULL DEFAULT '',
`lastapp` varchar(30) NOT NULL DEFAULT '',
`lastdata` varchar(80) NOT NULL DEFAULT '',
`duration` mediumint(8) unsigned NOT NULL DEFAULT '0',
`billsec` mediumint(8) unsigned NOT NULL DEFAULT '0',
`disposition` varchar(15) NOT NULL DEFAULT '',
`amaflags` tinyint(3) unsigned NOT NULL DEFAULT '0',
`accountcode` varchar(25) NOT NULL DEFAULT '',
`userfield` varchar(255) NOT NULL DEFAULT '',
`sequence` char(32) DEFAULT NULL,
`linkedid` char(32) DEFAULT NULL,
PRIMARY KEY (`_id`),
KEY `calldate` (`calldate`),
KEY `accountcode` (`accountcode`),
KEY `src_disposition` (`src`(25),`disposition`(4)),
KEY `dst_disposition` (`dst`(25),`disposition`(4)),
KEY `uniqueid` (`uniqueid`(25))
) ENGINE=MyISAM AUTO_INCREMENT=2971;
以下是重要的差异(感谢 #asterisk 上的 wdoekes2):
kleine@mrburns:~/Desktop$ diff -u original.sql new.sql
--- original.sql 2011-09-02 13:52:55.931004844 +0200
+++ new.sql 2011-09-02 13:53:03.501015948 +0200
@@ -2,7 +2,7 @@
`_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`calldate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`uniqueid` varchar(32) NOT NULL,
- `clid` varchar(80)NOT NULL DEFAULT '',
+ `clid` varchar(80) NOT NULL DEFAULT '',
`src` varchar(30) NOT NULL DEFAULT '',
`dst` varchar(30) NOT NULL DEFAULT '',
`dcontext` varchar(50) NOT NULL DEFAULT '',
@@ -13,7 +13,7 @@
`duration` mediumint(8) unsigned NOT NULL DEFAULT '0',
`billsec` mediumint(8) unsigned NOT NULL DEFAULT '0',
`disposition` varchar(15) NOT NULL DEFAULT '',
- `amaflags` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `amaflags` int(3) unsigned NOT NULL DEFAULT '0',
`accountcode` varchar(25) NOT NULL DEFAULT '',
`userfield` varchar(255) NOT NULL DEFAULT '',
`sequence` char(32) DEFAULT NULL,
@@ -24,4 +24,4 @@
KEY `src_disposition` (`src`(25),`disposition`(4)),
KEY `dst_disposition` (`dst`(25),`disposition`(4)),
KEY `uniqueid` (`uniqueid`(25))
- ) ENGINE=MyISAM AUTO_INCREMENT=2971;
+ ) ENGINE=MyISAM AUTO_INCREMENT=2973 DEFAULT CHARSET=latin1
现在,重新加载 CDR 自适应 ODBC 模块即可工作:
dev-lt-tk1*CLI> module reload cdr_adaptive_odbc.so
-- Reloading module 'cdr_adaptive_odbc.so' (Adaptive ODBC CDR backend)
== Parsing '/opt/gemeinschaft/etc/asterisk/cdr_adaptive_odbc.conf': == Found
-- Found adaptive CDR table ast_cdr@odbc-voipstat101.
> Found _id column with type 4 with len 10, octetlen 10, and numlen (0,10)
> Found calldate column with type 93 with len 19, octetlen 19, and numlen (0,10)
> Found uniqueid column with type 12 with len 32, octetlen 32, and numlen (0,0)
> Found clid column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found src column with type 12 with len 30, octetlen 30, and numlen (0,0)
> Found dst column with type 12 with len 30, octetlen 30, and numlen (0,0)
> Found dcontext column with type 12 with len 50, octetlen 50, and numlen (0,0)
> Found channel column with type 12 with len 60, octetlen 60, and numlen (0,0)
> Found dstchannel column with type 12 with len 60, octetlen 60, and numlen (0,0)
> Found lastapp column with type 12 with len 30, octetlen 30, and numlen (0,0)
> Found lastdata column with type 12 with len 80, octetlen 80, and numlen (0,0)
> Found duration column with type 4 with len 8, octetlen 8, and numlen (0,10)
> Found billsec column with type 4 with len 8, octetlen 8, and numlen (0,10)
> Found disposition column with type 12 with len 15, octetlen 15, and numlen (0,0)
> Found amaflags column with type 4 with len 10, octetlen 10, and numlen (0,10)
> Found accountcode column with type 12 with len 25, octetlen 25, and numlen (0,0)
> Found userfield column with type 12 with len 255, octetlen 255, and numlen (0,0)
> Found sequence column with type 1 with len 32, octetlen 32, and numlen (0,0)
> Found linkedid column with type 1 with len 32, octetlen 32, and numlen (0,0)
关于mysql - 如何通过 Asterisk 1.8.5 中的 cdr_adaptive_odbc.so 模块启用 CDR 日志记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7282075/
我想知道如何首先检测 Javascript 是否启用/禁用。在此站点上禁用 javascript 表明 stackoverflow 使用了称为标签的东西。 这是标准的做法吗?它适用于所有浏览器吗?它不
这个问题在这里已经有了答案: 关闭 11 年前。 Possible Duplicate: How to enable PHP short tags ? Enable short open tags
在 VSTS (Azure DevOps) 上拥有私有(private)存储库我尝试通过将以下内容添加到 .csproj 文件来启用 SourceLink:https://github.com/dot
我创建了一个 wx.Frame(我们称之为 mainFrame)。该框架上包含一个按钮,当单击该按钮时,会创建一个新框架(我们称之为 childFrame)。 我想知道如何在创建 childFrame
当我禁用 WPF 中的控件时,比如说一个菜单项 MenuItem aMenuItem = ... aMenuItem.IsEnabled = false; MenuItem 中的文本仍然处于事件状态,
我想在我的 nginx 服务器上启用 gzip 压缩。 nginx.conf 文件在这里: http { # Enable Gzip server { location ~* \.(?
我正在使用免费的 heroku 附加 PG 备份并遵循这些 instructions .我找到了安装应用程序的命令:heroku addons:add pgbackups:auto-week。但是我想
我想知道脚本是否可以使用某种切换按钮启用/禁用页面上的所有输入元素。 我用谷歌搜索了它,但除了这个之外没有发现任何有用的东西: http://www.codetoad.com/javascript/e
在我的 php 文件中,我想使用 jQuery Datepicker。 当我的文件加载时,我创建了禁用的日期选择器。 然后,当我的 php 文件(它是一个表单)中的一个特殊字段被填充时,我想启用日期选
我有一个按钮,如下所示: RadButton lnkAdd = new RadButton(); lnkAdd.ID = "BtnAdd"; lnkAdd.CommandName = RadGrid.
public static void ToggleTaskManager(string keyValue) { RegistryKey objRegistryK
我正在 Azure 中使用事件网格订阅,该订阅在创建 Blob 时触发。然而,我们有很多文件进入这个 blob,比如说 1000 多个。 如果我发现任何文件有任何错误,我想做的是禁用事件订阅。 最佳答
我的网站上有几个使用 HTML5 contentEditable 属性的 div。目标是让用户能够开始编写日记条目,并将保存按钮从禁用更改为启用。 这是我目前拥有的 HTML: Write
我有一个范围输入,其定义如下: @Html.LabelFor(m => Model.Quality, Resources.CompressionQuality) 和一个下拉菜单: @Html.Lab
我正在尝试创建一个启用/禁用按钮的下拉菜单,并且我正在关注此 example 但它已经有 4 年历史了,而且该功能似乎无法在我的 xhtml 页面上运行。 任何帮助都将被适当 最佳答案 这是一个现场演
我正在 Azure 中使用事件网格订阅,该订阅在创建 Blob 时触发。然而,我们有很多文件进入这个 blob,比如说 1000 多个。 如果我发现任何文件有任何错误,我想做的是禁用事件订阅。 最佳答
我在这里遇到一个非常奇怪的情况:我编写了一个应用程序,除其他外,将连接的代理从打开切换到关闭,反之亦然。通过更改注册表中的值来完成此操作: public void SetUpProxy(string
我需要调整一堆 PVC 的大小。似乎最简单的方法是通过ExpandPersistentVolumes 功能。但是我无法获得配置合作。 ExpandPersistentVolumes feature g
如果我的TextField为空,则应禁用该按钮,并且该按钮的textColor和borderColor应该为灰色。但是,启用按钮后,颜色应为蓝色。 更改textColor很容易: button.Set
您好,我的问题是:我无法从另一个类启用表单的按钮。我的表单类是 public class FileSending { //Function for enabling the button
我是一名优秀的程序员,十分优秀!