[asterisk-users] Connecting to multiple databases using res_config_pgsql
Deepesh D
deep.d2010 at gmail.com
Sat Feb 23 05:39:55 CST 2013
Hello,
How do I use multiple postgresql databases using res_config_pgsql?
I tried creating multiple contexts in res_pgsql.conf, but asterisk is
only using the 'general' context.
My res_pgsq.conf is
[general] ;; Connect to mydb on localhost
dbport=5432
dbname=mydb
dbuser=pgdbuser
requirements=warn
[pgwritedb] ;; Connect to mydb2 on another host
dbhost=<IP of other db server>
dbport=5432
dbname=mydb2
dbuser=pgdbuser2
dbpass=xxxxx
requirements=warn
In extconfig.conf I configured
sippeers => pgsql,general,sip_peers
sipregs => pgsql,pgwritedb,sip_regs
But asterisk is not using 'pgwritedb' to connect for sipregs, its
trying to update 'sip_regs' on the local database.
Thanks
More information about the asterisk-users
mailing list