Soporte & Consultoria

Soporte Remoto y Consultoria skype : ambiorixg12.
Nota no se brinda ningun tipo de consulta o soporte fuera del blog de forma gratuita

lunes, 27 de febrero de 2017

CDR centos 6.5 Config


/etc/odbc.ini



[asterisk-mysql]
Description           = MySQL connection to 'asterisk' database
Driver                = MySQL
Database              = asteriskcdrdb
Server                = localhost
UserName              = root
Password              = 7891
Port                  = 3306
Socket                = /var/lib/mysql/mysql.sock






/etc/odbcinst.ini



# Example driver definitions

# Driver from the postgresql-odbc package
# Setup from the unixODBC package
[PostgreSQL]
Description     = ODBC for PostgreSQL
Driver          = /usr/lib/psqlodbc.so
Setup           = /usr/lib/libodbcpsqlS.so
Driver64        = /usr/lib64/psqlodbc.so
Setup64         = /usr/lib64/libodbcpsqlS.so
FileUsage       = 1


# Driver from the mysql-connector-odbc package
# Setup from the unixODBC package
[MySQL]
Description     = ODBC for MySQL
Driver          = /usr/lib/libmyodbc5.so
Setup           = /usr/lib/libodbcmyS.so
Driver64        = /usr/lib64/libmyodbc5.so
Setup64         = /usr/lib64/libodbcmyS.so
FileUsage       = 1




/etc/asterisk/res_odbc_custom.conf

[asterisk-mysql]
enabled => yes
dsn => asterisk-mysql
username => root
password => 7891
pre-connect => yes




/etc/asterisk/cdr_adaptive_odbc.conf



[asterisk-mysql]
connection=asterisk-mysql
table=cdr
alias start => calldate




Load  on asterisk

module reload res_odbc.so

Module 'res_odbc.so' reloaded successfully.
    -- Reloading module 'res_odbc.so' (ODBC resource)
  == Parsing '/etc/asterisk/res_odbc.conf': Found
  == Parsing '/etc/asterisk/res_odbc_custom.conf': Found
  == Parsing '/etc/asterisk/res_odbc_additional.conf': Found
[2015-09-04 14:48:27] NOTICE[10623]: res_odbc.c:1528 odbc_obj_connect: Connecting asterisk-mysql
[2015-09-04 14:48:27] NOTICE[10623]: res_odbc.c:1567 odbc_obj_connect: res_odbc: Connected to asterisk-mysql [asterisk-mysql]
[2015-09-04 14:48:27] NOTICE[10623]: res_odbc.c:923 load_odbc_config: Registered ODBC class 'asterisk-mysql' dsn->[asterisk-mysql]
[2015-09-04 14:48:27] NOTICE[10623]: res_odbc.c:1528 odbc_obj_connect: Connecting asteriskcdrdb
[2015-09-04 14:48:27] WARNING[10623]: res_odbc.c:1560 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
[2015-09-04 14:48:27] WARNING[10623]: res_odbc.c:1370 _ast_odbc_request_obj2: Failed to connect to asteriskcdrdb
[2015-09-04 14:48:27] NOTICE[10623]: res_odbc.c:923 load_odbc_config: Registered ODBC class 'asteriskcdrdb' dsn->[MySQL-asteriskcdrdb]
ibx2*CLI>






ibx2*CLI> module reload cdr_adaptive_odbc.so


Module 'cdr_adaptive_odbc.so' reloaded successfully.
    -- Reloading module 'cdr_adaptive_odbc.so' (Adaptive ODBC CDR backend)
  == Parsing '/etc/asterisk/cdr_adaptive_odbc.conf': Found
    -- Found adaptive CDR table cdr@asterisk-mysql.
    -- Found alias start for column calldate in cdr@asterisk-mysql
       > Found calldate column with type 93 with len 19, octetlen 19, and numlen (0,10)
       > Found clid column with type 12 with len 80, octetlen 80, and numlen (0,0)
       > Found src column with type 12 with len 80, octetlen 80, and numlen (0,0)
       > Found dst column with type 12 with len 80, octetlen 80, and numlen (0,0)
       > Found dcontext column with type 12 with len 80, octetlen 80, and numlen (0,0)
       > Found channel column with type 12 with len 80, octetlen 80, and numlen (0,0)
       > Found dstchannel column with type 12 with len 80, octetlen 80, and numlen (0,0)
       > Found lastapp column with type 12 with len 80, octetlen 80, and numlen (0,0)
       > Found lastdata column with type 12 with len 80, octetlen 80, and numlen (0,0)
       > Found duration column with type 4 with len 10, octetlen 10, and numlen (0,10)
       > Found billsec column with type 4 with len 10, octetlen 10, and numlen (0,10)
       > Found disposition column with type 12 with len 45, octetlen 45, and numlen (0,0)
       > Found amaflags column with type 4 with len 10, octetlen 10, and numlen (0,10)
       > Found accountcode column with type 12 with len 20, octetlen 20, and numlen (0,0)
       > Found uniqueid column with type 12 with len 32, octetlen 32, and numlen (0,0)
       > Found userfield column with type 12 with len 255, octetlen 255, and numlen (0,0)
       > Found did column with type 12 with len 50, octetlen 50, and numlen (0,0)
       > Found recordingfile column with type 12 with len 255, octetlen 255, and numlen (0,0)
       > Found cnum column with type 12 with len 40, octetlen 40, and numlen (0,0)
       > Found cnam column with type 12 with len 40, octetlen 40, and numlen (0,0)
       > Found outbound_cnum column with type 12 with len 40, octetlen 40, and numlen (0,0)
       > Found outbound_cnam column with type 12 with len 40, octetlen 40, and numlen (0,0)
       > Found dst_cnam column with type 12 with len 40, octetlen 40, and numlen (0,0)
ibx2*CLI>







ibx2*CLI> odbc show all

ODBC DSN Settings
-----------------

  Name:   asterisk-mysql
  DSN:    asterisk-mysql
    Last connection attempt: 1969-12-31 19:00:00
  Pooled: No
  Connected: Yes

  Name:   asteriskcdrdb
  DSN:    MySQL-asteriskcdrdb
    Last connection attempt: 2015-09-04 14:48:27





ibx2*CLI> cdr show status

Call Detail Record (CDR) settings
----------------------------------
  Logging:                    Enabled
  Mode:                       Simple
  Log unanswered calls:       No
  Log congestion:             No

* Registered Backends
  -------------------
    cdr-custom
    Adaptive ODBC



No hay comentarios:

Publicar un comentario