Telegram- 👇 😉
-
. WIKIMERIONET
Merion Mertics , ,

CRM

11

Channel event logging ( ) , . CEL , . CEL cel

, asteriskcdrdb:

[root@asterisk]# mysql  //   MySQL 
mysql> use asteriskcdrdb;
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

cel, :

mysql> show columns from cel;
+-------------+--------------+------+-----+---------+----------------+
| Field       | Type         | Null | Key | Default | Extra          |
+-------------+--------------+------+-----+---------+----------------+
| id          | int(11)      | NO   | PRI | NULL    | auto_increment |
| eventtype   | varchar(30)  | NO   |     | NULL    |                |
| eventtime   | datetime     | 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   | MUL | NULL    |                |
| channame    | varchar(80)  | NO   |     | NULL    |                |
| appname     | varchar(80)  | NO   |     | NULL    |                |
| appdata     | varchar(80)  | NO   |     | NULL    |                |
| amaflags    | int(11)      | NO   |     | NULL    |                |
| accountcode | varchar(20)  | NO   |     | NULL    |                |
| uniqueid    | varchar(32)  | NO   | MUL | NULL    |                |
| linkedid    | varchar(32)  | NO   | MUL | NULL    |                |
| peer        | varchar(80)  | NO   |     | NULL    |                |
| userdeftype | varchar(255) | NO   |     | NULL    |                |
| extra       | varchar(512) | NO   |     | NULL    |                |
+-------------+--------------+------+-----+---------+----------------+
20 rows in set (0.00 sec)

CEL , Channel Event Logging :

CHAN_START
CHAN_END
LINKEDID_END ID
ANSWER . , ( )
HANGUP . , CHAN_END. , HANGUP , CHAN_END, Asterisk ,
APP_START . , Dial, Busy Congestion
APP_END APP_START
PARK_START . , , , , .
PARK_END
BRIDGE_START (). , Dial() Queue()
BRIDGE_END
BRIDGE_UPDATE . , ,
BLINDTRANSFER ( )
ATTENDEDTRANSFER
USER_DEFINED , CELGenUserEvent()

CEL. cel asteriskcdrdb:

eventtype CHAN_START ( )
eventtime 2016-04-01 14:53:54 ,
cidname Oleg Ivanov , CallerID (CID),
cidnum 84991111111 , CallerID (CID),
cidani 84991111111 Automatic Number Identification (ANI),
cidrdnis 84991111234
ciddnid 84993456458
exten 7057 , ,
context Local ,
channame SIP/0007B3060EB4-00000010
appname Dial ,
appdata SIP/0007B3060EB4 ,
amaflags DOCUMENTATION Automatic Message Accounting (AMA) .
accountcode 6473 . , .
uniqueid 6547653456.18332
userfield Chto ugodno
linkedid 6547653456.18332 , . , , , uniqueid, linkedid
peer SIP/0007B306054F-00000020 , , (bridge) channame

, cel. asteriskcdrdb:

mysql> SELECT * FROM `cel` WHERE `uniqueid` = '1459503113.15';
+------+------------+---------------------+-------------+-------------+-------------+-----------+----------+-------------+------------------+--------------------------------------------+------------+----------------------------------------------------------------------------------+----------+-------------+---------------+---------------+------+-------------+----------------------------------------------------------------------------+
| id   | eventtype  | eventtime           | cid_name    | cid_num     | cid_ani     | cid_rdnis | cid_dnid | exten       | context          | channame                                   | appname    | appdata                                                                          | amaflags | accountcode | uniqueid      | linkedid      | peer | userdeftype | extra                                                                      |
+------+------------+---------------------+-------------+-------------+-------------+-----------+----------+-------------+------------------+--------------------------------------------+------------+----------------------------------------------------------------------------------+----------+-------------+---------------+---------------+------+-------------+----------------------------------------------------------------------------+
| 2339 | CHAN_START | 2016-04-01 12:31:53 |             |             |             |           |          | 89641111111 | from-internal    | Local/89641111111@from-internal-00000004;2 |            |                                                                                  |        3 |             | 1459503113.15 | 1459503090.11 |      |             |                                                                            |
| 2346 | APP_START  | 2016-04-01 12:31:53 | 79252222222 | 79252222222 | 79252222222 |           |          | recordcheck | sub-record-check | Local/89641111111@from-internal-00000004;2 | MixMonitor | 2016/04/01/out-89641111111-79252222222-20160401-123153-1459503113.15.wav,ai(LOCA |        3 |             | 1459503113.15 | 1459503090.11 |      |             |                                                                            |
| 2347 | APP_END    | 2016-04-01 12:31:53 | 79252222222 | 79252222222 | 79252222222 |           |          | recordcheck | sub-record-check | Local/89641111111@from-internal-00000004;2 | MixMonitor | 2016/04/01/out-89641111111-79252222222-20160401-123153-1459503113.15.wav,ai(LOCA |        3 |             | 1459503113.15 | 1459503090.11 |      |             |                                                                            |
| 2364 | HANGUP     | 2016-04-01 12:32:10 |             | 79252222222 | 79252222222 |           |          | h           | from-internal    | Local/89641111111@from-internal-00000004;2 |            |                                                                                  |        3 |             | 1459503113.15 | 1459503090.11 |      |             | {"dialstatus":"CANCEL","hangupcause":16,"hangupsource":"dialplan/builtin"} |
| 2365 | CHAN_END   | 2016-04-01 12:32:10 |             | 79252222222 | 79252222222 |           |          | h           | from-internal    | Local/89641111111@from-internal-00000004;2 |            |                                                                                  |        3 |             | 1459503113.15 | 1459503090.11 |      |             |                                                                            |
+------+------------+---------------------+-------------+-------------+-------------+-----------+----------+-------------+------------------+--------------------------------------------+------------+----------------------------------------------------------------------------------+----------+-------------+---------------+---------------+------+-------------+----------------------------------------------------------------------------+
5 rows in set (0.00 sec)

cel, uniqueid = 1459503113.15.