call history + odbc_cdr
-
Its ODBC
CREATE TABLEcdr(
accountcodevarchar(20) DEFAULT NULL,
srcvarchar(80) DEFAULT NULL,
dstvarchar(80) DEFAULT NULL,
dcontextvarchar(80) DEFAULT NULL,
clidvarchar(80) DEFAULT NULL,
channelvarchar(80) DEFAULT NULL,
dstchannelvarchar(80) DEFAULT NULL,
lastappvarchar(80) DEFAULT NULL,
lastdatavarchar(80) DEFAULT NULL,
startdatetime DEFAULT NULL,
answerdatetime DEFAULT NULL,
enddatetime DEFAULT NULL,
durationint(11) DEFAULT NULL,
billsecint(11) DEFAULT NULL,
dispositionvarchar(45) DEFAULT NULL,
amaflagsvarchar(45) DEFAULT NULL,
userfieldvarchar(256) DEFAULT NULL,
uniqueidvarchar(150) DEFAULT NULL,
linkedidvarchar(150) DEFAULT NULL,
peeraccountvarchar(20) DEFAULT NULL,
sequenceint(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Дамп данных таблицыcdrINSERT INTO
cdr(accountcode,src,dst,dcontext,clid,channel,dstchannel,lastapp,lastdata,start,answer,end,duration,billsec,disposition,amaflags,userfield,uniqueid,linkedid,peeraccount,sequence) VALUES
(NULL, NULL, '17710', 'incom', '"user101" <>', 'IAX2/user101-15651', 'IAX2/user151-21434', 'Dial', 'IAX2/user151/10,40', '2016-12-21 17:08:37', '2016-12-21 17:08:37', '2016-12-21 17:09:17', 40, 40, 'NO ANSWER', 'DOCUMENTATION', NULL, 'List-1482329317.9312', 'List-1482329317.9312', NULL, 1070);and MySQL schema
CREATE TABLE
cdr_old(
idint(11) NOT NULL,
calldatedatetime NOT NULL DEFAULT '0000-00-00 00:00:00',
clidvarchar(80) NOT NULL DEFAULT '',
srcvarchar(80) NOT NULL DEFAULT '',
dstvarchar(80) NOT NULL DEFAULT '',
dcontextvarchar(80) NOT NULL DEFAULT '',
channelvarchar(80) NOT NULL DEFAULT '',
dstchannelvarchar(80) NOT NULL DEFAULT '',
lastappvarchar(80) NOT NULL DEFAULT '',
lastdatavarchar(80) NOT NULL DEFAULT '',
durationint(11) NOT NULL DEFAULT '0',
billsecint(11) NOT NULL DEFAULT '0',
dispositionvarchar(45) NOT NULL DEFAULT '',
amaflagsint(11) NOT NULL DEFAULT '0',
accountcodevarchar(20) NOT NULL DEFAULT '',
userfieldvarchar(255) NOT NULL DEFAULT '',
uniqueidvarchar(32) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Дамп данных таблицыcdr_oldINSERT INTO
cdr_old(id,calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,userfield,uniqueid) VALUES
(1, '2015-12-20 18:09:57', '"1001" <1001>', '1001', '7170', 'incom', 'OOH323/cisco', '', 'Dial', '', 3, 3, 'ANSWERED', 3, 'ast_h323', '', 'asterisk_list-1450624197.0'); -
-
-
-
-
-
-
I get this:
notice
/var/www/html/fop2/lib/dblib.php (line 59)mysqli::mysqli(): Headers and client library minor version mismatch. Headers:50550 Library:50635
notice
/var/www/html/fop2/calldetailrecords.php (line 241)Undefined index: filterdir
notice
/var/www/html/fop2/calldetailrecords.php (line 260)Undefined index: filterdispo
View Record
notice
/var/www/html/fop2/lib/dblib.php (line 356)mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given
-
hmmm, this:
Headers and client library minor version mismatch. Headers:50550 Library:50635
seems to indicate that you have conflicting packages/versions installed for mysql and libaries.... maybe the problem is a result of that mismatch. You will have to be sure you have same version of mysql-xx everything installed.
-
I think, the problem is here
/var/www/html/fop2/lib/dblib.php (line 356)mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given
i.e. mysqli_num_rows(this->result), this->result doesnt contain mysqli_result data. Plese show, where its colled in detail record.
PS. When I comment this function and return 1 instead, I see "cancel" button on detail record page. The problem is here. -
The problem was solved by
diff tmp/dbgrid.php lib/dbgrid.php 2618c2618 < $res = $this->link->consulta("SELECT $this->fields FROM %s %s WHERE %s = %s %s",$this->table,$joinstring,$this->table.".".$this->pk,$id, $this->groupby); --- > $res = $this->link->consulta("SELECT $this->fields FROM %s %s WHERE %s = '%s' %s",$this->table,$joinstring,$this->table.".".$this->pk,$id, $this->groupby); -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login