Hi!
For some reason I need to the enter the SQL statements manually on the DB server (I do not want to copy the scripts to the DB server and there is no superuser access over the network)
Is there a simple method to get all the SQL commands to create the kamailio database?
I see there are all the files in "/usr/share/kamailio/postgres/" and lots of other SQL statements in /usr/lib/kamailio/kamctl/kamdbctl.pgsql. Does anyone know of a simple method to get all the raw SQL queries?
Thanks Klaus
On Wed, Jul 11, 2012 at 3:24 PM, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Hi!
For some reason I need to the enter the SQL statements manually on the DB server (I do not want to copy the scripts to the DB server and there is no superuser access over the network)
Is there a simple method to get all the SQL commands to create the kamailio database?
Hi,
You can look at this module. you can query a sql database from your kamailio.cfg
http://kamailio.org/docs/modules/stable/modules_k/sqlops.html
Cheers.
I see there are all the files in "/usr/share/kamailio/postgres/" and lots of other SQL statements in /usr/lib/kamailio/kamctl/kamdbctl.pgsql. Does anyone know of a simple method to get all the raw SQL queries?
Thanks Klaus
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
For the files: I solved my problem by changing the /usr/lib/kamailio/kamctl/kamdbctl.pgsql script to write all queries to stdout instead sending it to the DB, e.g:
# execute sql command with optional db name sql_query() { if [ $TRYONLY -eq 1 ] ; then if [ $# -gt 1 ] ; then shift echo "$@" else cat fi else if [ $# -gt 1 ] ; then if [ -n "$1" ]; then DB="$1" else DB="" fi shift $CMD -d $DB -c "$@" else $CMD "$@" fi fi }
And then call "TRYONLY=1 kamdbctl create"
regards Klaus
On 11.07.2012 11:24, Klaus Darilion wrote:
Hi!
For some reason I need to the enter the SQL statements manually on the DB server (I do not want to copy the scripts to the DB server and there is no superuser access over the network)
Is there a simple method to get all the SQL commands to create the kamailio database?
I see there are all the files in "/usr/share/kamailio/postgres/" and lots of other SQL statements in /usr/lib/kamailio/kamctl/kamdbctl.pgsql. Does anyone know of a simple method to get all the raw SQL queries?
Thanks Klaus
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users