| 
									
										
										
										
											2009-06-29 18:05:27 +00:00
										 |  |  | ; | 
					
						
							|  |  |  | ; Asterisk Channel Event Logging (CEL) - PostgreSQL Backend | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ; Sample Asterisk config file for CEL logging to PostgreSQL | 
					
						
							| 
									
										
										
										
											2025-01-07 21:17:56 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-26 15:28:53 +00:00
										 |  |  | ; CEL field names: | 
					
						
							| 
									
										
										
										
											2025-01-07 21:17:56 +01:00
										 |  |  | ;   eventtype | 
					
						
							|  |  |  | ;     CHANNEL_START = 1 | 
					
						
							|  |  |  | ;     CHANNEL_END = 2 | 
					
						
							|  |  |  | ;     HANGUP = 3 | 
					
						
							|  |  |  | ;     ANSWER = 4 | 
					
						
							|  |  |  | ;     APP_START = 5 | 
					
						
							|  |  |  | ;     APP_END = 6 | 
					
						
							|  |  |  | ;     BRIDGE_START = 7 | 
					
						
							|  |  |  | ;     BRIDGE_END = 8 | 
					
						
							|  |  |  | ;     CONF_START = 9 | 
					
						
							|  |  |  | ;     CONF_END = 10 | 
					
						
							|  |  |  | ;     PARK_START = 11 | 
					
						
							|  |  |  | ;     PARK_END = 12 | 
					
						
							|  |  |  | ;     BLINDTRANSFER = 13 | 
					
						
							|  |  |  | ;     ATTENDEDTRANSFER = 14 | 
					
						
							|  |  |  | ;     TRANSFER = 15 | 
					
						
							|  |  |  | ;     HOOKFLASH = 16 | 
					
						
							|  |  |  | ;     3WAY_START = 17 | 
					
						
							|  |  |  | ;     3WAY_END = 18 | 
					
						
							|  |  |  | ;     CONF_ENTER = 19 | 
					
						
							|  |  |  | ;     CONF_EXIT = 20 | 
					
						
							|  |  |  | ;     USER_DEFINED = 21 | 
					
						
							|  |  |  | ;     LINKEDID_END = 22 | 
					
						
							|  |  |  | ;     BRIDGE_UPDATE = 23 | 
					
						
							|  |  |  | ;     PICKUP = 24 | 
					
						
							|  |  |  | ;     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 | 
					
						
							|  |  |  | ;   amaflags       (an int) | 
					
						
							|  |  |  | ;   userfield | 
					
						
							|  |  |  | ;   peer | 
					
						
							|  |  |  | ;   extra | 
					
						
							| 
									
										
										
										
											2009-06-26 15:28:53 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | [global] | 
					
						
							| 
									
										
										
										
											2012-02-01 17:42:15 +00:00
										 |  |  | ; Use 'show_user_defined' to put "USER_DEFINED" in the eventtype field, | 
					
						
							| 
									
										
										
										
											2025-01-07 21:17:56 +01:00
										 |  |  | ; instead of (by default) just putting the user-defined event name there. | 
					
						
							| 
									
										
										
										
											2012-02-01 17:42:15 +00:00
										 |  |  | ;show_user_defined=yes | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-08 11:35:53 +00:00
										 |  |  | ; Log date/time in GMT. The default of this option is 'no'. | 
					
						
							|  |  |  | ;usegmtime=yes | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-07 21:17:56 +01:00
										 |  |  | ; PostgreSQL connection settings | 
					
						
							|  |  |  | ;hostname=localhost           ; Database server hostname | 
					
						
							|  |  |  | ;port=5432                    ; Port number for the PostgreSQL server | 
					
						
							|  |  |  | ;dbname=asterisk              ; Database name | 
					
						
							|  |  |  | ;user=asterisk                ; Username for the database | 
					
						
							|  |  |  | ;password=password            ; Password for the user | 
					
						
							|  |  |  | ;table=cel                    ; SQL table where CELs will be inserted | 
					
						
							|  |  |  | ;schema=public                ; Schema where the CEL table is located (optional). | 
					
						
							|  |  |  |                               ; Defaults to `current_schema()` if not specified. | 
					
						
							|  |  |  | ;appname=asterisk             ; Optional PostgreSQL application_name (no whitespace allowed) |