Asterisk config cel_pgsql.conf

;
; Asterisk Channel Event Logging (CEL) - PostgreSQL Backend
;

; Sample Asterisk config file for CEL logging to PostgreSQL
;
; CEL field names:
;
;  	eventtype
;	  CEL_CHANNEL_START = 1
;	  CEL_CHANNEL_END = 2
;	  CEL_HANGUP = 3
;	  CEL_ANSWER = 4
;	  CEL_APP_START = 5
;	  CEL_APP_END = 6
;	  CEL_BRIDGE_START = 7
;	  CEL_BRIDGE_END = 8
;	  CEL_CONF_START = 9
;	  CEL_CONF_END = 10
;	  CEL_PARK_START = 11
;	  CEL_PARK_END = 12
;	  CEL_BLINDTRANSFER = 13
;	  CEL_ATTENDEDTRANSFER = 14
;	  CEL_TRANSFER = 15
;	  CEL_HOOKFLASH = 16
;	  CEL_3WAY_START = 17
;	  CEL_3WAY_END = 18
;	  CEL_CONF_ENTER = 19
;	  CEL_CONF_EXIT = 20
;	  CEL_USER_DEFINED = 21
;	  CEL_LINKEDID_END = 22
;	  CEL_BRIDGE_UPDATE = 23
;	  CEL_PICKUP = 24
;	  CEL_FORWARD = 25
;	eventtime  (timeval, includes microseconds)
;	userdeftype (set only if eventtype == USER_DEFINED)
;	cid_name
;	cid_num
;	cid_ani
;	cid_rdnis
;	cid_dnid
;	exten
;	context
;	channame
;	appname
;	appdata
;	accountcode
;	peeraccount
;	uniqueid
;	linkedid
;	amaflag  (an int)
;	userfield
;	peer


[global]
;hostname=localhost
;port=5432
;dbname=asterisk
;password=password
;user=postgres
;table=cel		;SQL table where CEL's will be inserted





SQL:
CREATE TABLE cel
(
  id integer NOT NULL DEFAULT nextval('cel_id_seq'::regclass),
  eventtime timestamp with time zone NOT NULL DEFAULT now(),
  eventtype character varying(80) NOT NULL DEFAULT ''::character varying,
  userdeftype character varying(80) NOT NULL DEFAULT ''::character varying,
  cid_name character varying(80) NOT NULL DEFAULT ''::character varying,
  cid_num character varying(80) NOT NULL DEFAULT ''::character varying,
  cid_ani character varying(80) NOT NULL DEFAULT ''::character varying,
  cid_rdnis character varying(80) NOT NULL DEFAULT ''::character varying,
  cid_dnid character varying(80) NOT NULL DEFAULT ''::character varying,
  exten character varying(80) NOT NULL DEFAULT ''::character varying,
  context character varying(80) NOT NULL DEFAULT ''::character varying,
  channame character varying(80) NOT NULL DEFAULT ''::character varying,
  appname character varying(80) NOT NULL DEFAULT ''::character varying,
  appdata character varying(80) NOT NULL DEFAULT ''::character varying,
  accountcode character varying(20) NOT NULL DEFAULT ''::character varying,
  peeraccount character varying(80) NOT NULL DEFAULT ''::character varying,
  uniqueid character varying(32) NOT NULL DEFAULT ''::character varying,
  linkedid character varying(80) NOT NULL DEFAULT ''::character varying,
  amaflags integer NOT NULL DEFAULT 0,
  userfield character varying(255) NOT NULL DEFAULT ''::character varying,
  peer character varying(80) NOT NULL DEFAULT ''::character varying,
  CONSTRAINT cel_pkey PRIMARY KEY (id)
)

;
; Asterisk Channel Event Logging (CEL) - PostgreSQL Backend
;

; Sample Asterisk config file for CEL logging to PostgreSQL
;
; CEL field names:
;
;  	eventtype
;	  CEL_CHANNEL_START = 1
;	  CEL_CHANNEL_END = 2
;	  CEL_HANGUP = 3
;	  CEL_ANSWER = 4
;	  CEL_APP_START = 5
;	  CEL_APP_END = 6
;	  CEL_BRIDGE_START = 7
;	  CEL_BRIDGE_END = 8
;	  CEL_CONF_START = 9
;	  CEL_CONF_END = 10
;	  CEL_PARK_START = 11
;	  CEL_PARK_END = 12
;	  CEL_BLINDTRANSFER = 13
;	  CEL_ATTENDEDTRANSFER = 14
;	  CEL_TRANSFER = 15
;	  CEL_HOOKFLASH = 16
;	  CEL_3WAY_START = 17
;	  CEL_3WAY_END = 18
;	  CEL_CONF_ENTER = 19
;	  CEL_CONF_EXIT = 20
;	  CEL_USER_DEFINED = 21
;	  CEL_LINKEDID_END = 22
;	  CEL_BRIDGE_UPDATE = 23
;	  CEL_PICKUP = 24
;	  CEL_FORWARD = 25
;	eventtime  (timeval, includes microseconds)
;	userdeftype (set only if eventtype == USER_DEFINED)
;	cid_name
;	cid_num
;	cid_ani
;	cid_rdnis
;	cid_dnid
;	exten
;	context
;	channame
;	appname
;	appdata
;	accountcode
;	peeraccount
;	uniqueid
;	linkedid
;	amaflag  (an int)
;	userfield
;	peer


[global]
;hostname=localhost
;port=5432
;dbname=asterisk
;password=password
;user=postgres
;table=cel		;SQL table where CEL's will be inserted





SQL:
CREATE TABLE cel
(
  id integer NOT NULL DEFAULT nextval('cel_id_seq'::regclass),
  eventtime timestamp with time zone NOT NULL DEFAULT now(),
  eventtype character varying(80) NOT NULL DEFAULT ''::character varying,
  userdeftype character varying(80) NOT NULL DEFAULT ''::character varying,
  cid_name character varying(80) NOT NULL DEFAULT ''::character varying,
  cid_num character varying(80) NOT NULL DEFAULT ''::character varying,
  cid_ani character varying(80) NOT NULL DEFAULT ''::character varying,
  cid_rdnis character varying(80) NOT NULL DEFAULT ''::character varying,
  cid_dnid character varying(80) NOT NULL DEFAULT ''::character varying,
  exten character varying(80) NOT NULL DEFAULT ''::character varying,
  context character varying(80) NOT NULL DEFAULT ''::character varying,
  channame character varying(80) NOT NULL DEFAULT ''::character varying,
  appname character varying(80) NOT NULL DEFAULT ''::character varying,
  appdata character varying(80) NOT NULL DEFAULT ''::character varying,
  accountcode character varying(20) NOT NULL DEFAULT ''::character varying,
  peeraccount character varying(80) NOT NULL DEFAULT ''::character varying,
  uniqueid character varying(32) NOT NULL DEFAULT ''::character varying,
  linkedid character varying(80) NOT NULL DEFAULT ''::character varying,
  amaflags integer NOT NULL DEFAULT 0,
  userfield character varying(255) NOT NULL DEFAULT ''::character varying,
  peer character varying(80) NOT NULL DEFAULT ''::character varying,
  CONSTRAINT cel_pkey PRIMARY KEY (id)
)

Created by: millsu2, Last modification: Mon 21 of May, 2012 (22:41 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+