Dmitriy Serov
2015-Mar-18 19:37 UTC
[asterisk-users] Asterisk 13. Writing call quality parameters to CDR. How?
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
2015-Mar-19 09:12 UTC
[asterisk-users] Asterisk 13. Writing call quality parameters to CDR. How?
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 =======================================
Ethy H. Brito
2015-Mar-25 19:37 UTC
[asterisk-users] Asterisk 13. Writing call quality parameters to CDR. How?
On Thu, 19 Mar 2015 10:12:22 +0100 Marek Cervenka <cervajs at fpf.slu.cz> wrote:> 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}',...);Interesting approach. But how to tell from a call going directly (directmedia) and a call with asterisk in between?? In the last case, two bridged channels, how to collect the parameters from each "leg" in the "h" extension? Cheers Ethy> > > 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 > ======================================> > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Ethy H. Brito /"\ InterNexo Ltda. \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML +55 (12) 3797-6860 X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL S.J.Campos - Brasil / \ PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc