aboutsummaryrefslogtreecommitdiffstats
path: root/configs/func_odbc.conf.sample
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-21 18:43:10 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-21 18:43:10 +0000
commit4ca4b36d9042b0170ce397d4ff6ddb74a682a714 (patch)
treecf7ce480a2500b8547236b881ecb2a705a67fedf /configs/func_odbc.conf.sample
parent6aacd0c1284a35cf4bd566739760ef4815597f2b (diff)
Bug 5055 - Simple SQL commands from the dialplan
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7576 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configs/func_odbc.conf.sample')
-rw-r--r--configs/func_odbc.conf.sample32
1 files changed, 32 insertions, 0 deletions
diff --git a/configs/func_odbc.conf.sample b/configs/func_odbc.conf.sample
new file mode 100644
index 000000000..0c4a01517
--- /dev/null
+++ b/configs/func_odbc.conf.sample
@@ -0,0 +1,32 @@
+;
+; func_odbc.conf
+;
+; Each context is a separately defined function. By convention, all
+; functions are entirely uppercase, so the defined contexts should also
+; be all-uppercase, but there is nothing that enforces this. All functions
+; are case-sensitive, however.
+;
+; For substitution, you have ${ARG1}, ${ARG2} ... ${ARGn}
+; for the arguments to each SQL statement.
+;
+; In addition, for write statements, you have ${VAL1}, ${VAL2} ... ${VALn}
+; parsed, just like arguments, for the values. In addition, if you want the
+; whole value, never mind the parsing, you can get that with ${VALUE}.
+
+
+; ODBC_SQL - Allow an SQL statement to be built entirely in the dialplan
+[SQL]
+dsn=mysql1
+read=${ARG1}
+
+; ODBC_ANTIGF - A blacklist.
+[ANTIGF]
+dsn=mysql1
+read=SELECT COUNT(*) FROM exgirlfriends WHERE callerid='${ARG1}'
+
+; ODBC_PRESENCE - Retrieve and update presence
+[PRESENCE]
+dsn=mysql1
+read=SELECT location FROM presence WHERE id='${ARG1}'
+write=UPDATE presence SET location='${VAL1}' WHERE id='${ARG1}'
+