[asterisk-users] Asterisk 13. Writing call quality parameters to CDR. How?

Marek Cervenka cervajs at fpf.slu.cz
Thu Mar 19 04:12:22 CDT 2015


because of problems you are facing i decided to go way with second table

CREATE TABLE `cdr_extended` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
   `uniqueid` varchar(32) NOT NULL DEFAULT '',
  `callid` varchar(256) NOT NULL DEFAULT '' COMMENT 'sip call-id',
   `hangupcause` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci 
NOT NULL COMMENT 'info about hangup',
   `peerip` varchar(15) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
   `recvip` varchar(15) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
   `from_u` varchar(30) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
   `uri` varchar(30) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
   `useragent` varchar(30) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT 
NULL,
   `codec1` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
   `codec2` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
   `llp` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL 
COMMENT 'lost packets by local end',
   `rlp` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL 
COMMENT 'lost packets by remote end ',
   `ljitt` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL 
COMMENT 'the same for jitter ',
   `rjitt` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL 
COMMENT 'the same for jitter ',
   PRIMARY KEY (`id`),
   KEY `uniqueid` (`uniqueid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

in hangup handler or h exten i will use func_odbc
like
insert into cdr_extended (uniqueid,hangupcause,peerip,...) values 
('${UNIQUEID}',...);


Dne 18.3.2015 v 20:37 Dmitriy Serov napsal(a):
> Hello.
>
> Voice quality when calling - this is one of the most important in the 
> PBX.
> You need to record the quality parameters for each call to improve.
>
> Because the overall quality of a call can only be determined upon 
> completion, I did it in the HangUp handler and wrote in custom fields 
> of CDR.
> This worked well in asterisk 11.
>
> In asterisk 13 I did not find a handler after the call, but before 
> finalizing the CDR.
> I tried to call the AGI and there to update the CDR record by unique 
> identifiers. But faced with the fact that there are no needed record 
> in the table yet.
> To write the data into a separate table and join them may be an 
> option. But do not want to resort to such a decision
>
> How do you solve this problem?
>
> Dmitriy Serov.
>


-- 
---------------------------------------
Marek Cervenka
=======================================




More information about the asterisk-users mailing list