что астер может писать CEL с форматом eventtime как секунды.микросенду, если не указан иной формат.
Так и поступил, исключил строку с dateformat из cel.conf, сделалй в таблице тип Double, результат - вместо времени, записывается 2012 в каждый ивент, т.е. - год, а не секунды или микросекунды. В чем может быть проблема?
; Date Format
;
; Use the 'dateformat' keyword to specify the date format used when CEL events
; are raised.
;
; Accepted values: A strftime format string (see man strftime)
;
; Example: "%F %T"
; -> This gives the date and time in the format "2009-06-23 17:02:35"
;
; If this option is not specified, the default format is "<seconds>.<microseconds>"
; since epoch. The microseconds field will always be 6 digits in length, meaning it
; may have leading zeros.
;
;dateformat = %F %T
Вот код таблицы и сам файл cel.conf :
Код: Выделить всё
-- Table: cel
-- DROP TABLE cel;
CREATE TABLE cel
(
id serial NOT NULL,
contractor_id integer NOT NULL,
eventtype integer,
eventtime double precision,
userdeftype character varying(255) NOT NULL,
cid_name character varying(80),
cid_num character varying(80),
cid_ani character varying(80),
cid_rdnis character varying(80),
cid_dnid character varying(80),
exten character varying(80) NOT NULL,
context character varying(80) NOT NULL,
channame character varying(80) NOT NULL,
appname character varying(80) NOT NULL,
appdata character varying(80) NOT NULL,
amaflags bigint NOT NULL,
accountcode character varying(20),
peeraccount character varying(80) NOT NULL,
uniqueid character varying(150),
userfield character varying(255) NOT NULL,
linkedid character varying(150),
peer character varying(80) NOT NULL,
CONSTRAINT cel_pkey PRIMARY KEY (id ),
CONSTRAINT cel_contractor_id_fkey FOREIGN KEY (contractor_id)
REFERENCES contractors_contractor (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED,
CONSTRAINT cel_eventtype_fkey FOREIGN KEY (eventtype)
REFERENCES cel_event (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
)
WITH (
OIDS=FALSE
);
cel.conf :
Код: Выделить всё
[general]
enable=yes
;dateformat=%F %T.%6q
events = ALL
apps = noop,answer,playback,hangup,background,waitexten,goto,dial,congestion,set,playtones,busy,macro