Setup Module Posgresql trên Asterisk - 21102019

Breaking

Post Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Thursday, September 13, 2018

Setup Module Posgresql trên Asterisk

Cài đặt thêm module Postgresql cho Asterisk

1. Cài đặt:
yum install postgresql-server postgresql-contrib



2. Cấu hình:
2.1 Cấu hình trên cdr_pgsql.conf
vi /etc/asterisk/cdr_pgsql.conf
[global]
hostname=localhost
port=5432
dbname=asterisk
password=password
user=postgres
appname=asterisk    ; Postgres application_name support (optional). Whitespace n
ot allowed.
table=cdr     
2.2 extensions.conf
vi /etc/asterisk/extensions.conf
Add thêm phần sau:
[settings]
extensions => pgsql,asteriskDB,extensions_conf
sipuser => pgsql,asteriskDB,sip_conf
sippeers => pgsql,asteriskDB,sip_conf
sipregs => pgsql,asteriskDB,sip_conf
voicemail => pgsql,asteriskDB,voicemail_users
queues => pgsql,asteriskDB,queue_table
queue_members => pgsql,asteriskDB,queue_member_table
2.3 /etc/asterisk/res_pgsql.conf
[general]
dbhost=127.0.0.1
dbport=5432
dbname=asteriskDB
dbuser=asterisk
dbpass=password
requirements=warn
2.4 Restart Service Asterisk
All set... we are ready, now just restart Asterisk. Congratulations!

/etc/init.d/asterisk restart

- Check lại trên Asterisk
cdr show status
Call Detail Record (CDR) settings
----------------------------------
  Logging:                    Enabled
  Mode:                       Simple
  Log unanswered calls:       No
  Log congestion:             No

* Registered Backends
  -------------------
    pgsql
    Adaptive ODBC
    cdr_manager (suspended)
    cdr-custom
    csv
Sourrce: https://www.howtoforge.com/installing-and-configuring-asterisk-1.6-and-postgresql-to-manage-cdr-and-realtime-config-on-debian

No comments:

Post a Comment

Post Top Ad

Responsive Ads Here