Advertisement
oquidave

res_odbc asterisk config

Oct 22nd, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. //part of the res_odbc.conf at /etc/asterisk
  2.  
  3. [asterisk]
  4. ;
  5. ; Permit disabling sections without needing to comment them out.
  6. ; If not specified, it is assumed the section is enabled.
  7. enabled => yes
  8. ;
  9. ; This value should match an entry in /etc/odbc.ini
  10. ; (or /usr/local/etc/odbc.ini, on FreeBSD and similar systems).
  11. dsn => asterisk-connector
  12. ;
  13. ; Username for connecting to the database. The default user is "root".
  14. username => asterisk
  15. ;
  16. ; Password for authenticating the user to the database. The default
  17. ; password is blank.
  18. password => asteriskmysql
  19. ;
  20. ; Build a connection at startup?
  21. pre-connect => yes
  22.  
  23.  
  24. //cat /etc/unixODBC/odbc.ini
  25. [asterisk-connector]
  26. Description = MySQL connection to 'asterisk' database
  27. Driver = MySQL
  28. Database = asterisk
  29. Server = localhost
  30. ;UserName = asterisk
  31. USER = asterisk
  32. Password = asteriskmysql
  33. Port = 3306
  34. ;location varies
  35. ;Socket = /var/lib/mysql/mysql.sock
  36. Socket=/var/run/mysql/mysql.sock
  37.  
  38. //cat /etc/unixODBC/odbcinst.ini
  39. [PSQL]
  40. Description = PostgreSQL
  41. Driver = /usr/lib/psqlodbcw.so
  42. UsageCount = 1
  43.  
  44. [MySQL]
  45. Description = ODBC for MySQL
  46. ;Driver = /usr/lib/odbc/libmyodbc.so
  47. Driver=/usr/lib/libmyodbc5.so
  48. ;Setup = /usr/lib/odbc/libodbcmyS.so
  49. FileUsage = 1
  50.  
  51. //odbc shows nothing!!
  52. oquisuse*CLI> odbc show
  53.  
  54. ODBC DSN Settings
  55. -----------------
  56.  
  57. //asterisk is running under username asterisk with the right password
  58.  
  59. mysql -u asterisk -p
  60. Enter password:
  61. Welcome to the MySQL monitor. Commands end with ; or \g.
  62. Your MySQL connection id is 1
  63. Server version: 5.5.25-log Source distribution
  64.  
  65. Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  66.  
  67. Oracle is a registered trademark of Oracle Corporation and/or its
  68. affiliates. Other names may be trademarks of their respective
  69. owners.
  70.  
  71. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  72.  
  73. mysql>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement