差分

移動先: 案内検索

Asterisk+MySQL

1,719 バイト追加, 2009年2月19日 (木) 09:32
cdr_addon_mysqを設定する
sock=/var/lib/mysql/mysql.so
設定が終わったらAsteriskを再起動するか、module load cdr_addon_mysql.so を実行します。これで通話記録はDBに保存されるようになります。
===動作を確認してみる===
正しく設定されていればCDRはデータベースに記録されますので、適当に内線にでも電話してみます。MySQLで確認するとCDRが取れていることがわかるはずです。
# mysql -u root -p
Password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.0.45 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from cdr;
+---------------------+-------------+-----+-----+----------+------------------+-
-----------+---------+----------+----------+---------+-------------+----------+-
------------+----------+-----------+
| calldate | clid | src | dst | dcontext | channel |
dstchannel | lastapp | lastdata | duration | billsec | disposition | amaflags |
accountcode | uniqueid | userfield |
+---------------------+-------------+-----+-----+----------+------------------+-
-----------+---------+----------+----------+---------+-------------+----------+-
------------+----------+-----------+
| 2009-02-19 09:29:55 | "201" <201> | 201 | 300 | default | SIP/201-082e04c8 |
| MeetMe | 300|M | 20 | 20 | ANSWERED | 3 |
| | |
+---------------------+-------------+-----+-----+----------+------------------+-
-----------+---------+----------+----------+---------+-------------+----------+-
------------+----------+-----------+
1 row in set (0.00 sec)
 
mysql>

案内メニュー

VoIp-Info.jp

HP Directplus -HP公式オンラインストア-