Execute SQL query from Dialplan
Note: The following function is available for Brekeke SIP Server Advanced edition only.
Initial Settings:
Set the following variables at Brekeke SIP Server Admintool > [Configuration] > [Advanced] page
------------------------------- db-name.driver = <jdbc_driver> db-name.url = <database_url> db-name.user = <user_name> db-name.password = <password> -------------------------------
Example:
--------------------------------------- mydb.driver = com.mysql.jdbc.Driver mydb.url = jdbc:mysql://domain/mydb mydb.user = user mydb.password = password ---------------------------------------
DialPlan:
Syntax:
$db.query( db-name, query )
Example:
$db.query( "mydb", "select A from table where B = '%1' " ) = (.+)