Deepesh D
2013-Feb-23 11:39 UTC
[asterisk-users] Connecting to multiple databases using res_config_pgsql
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