4 ; Each context is a separately defined function. By convention, all
5 ; functions are entirely uppercase, so the defined contexts should also
6 ; be all-uppercase, but there is nothing that enforces this. All functions
7 ; are case-sensitive, however.
9 ; For substitution, you have ${ARG1}, ${ARG2} ... ${ARGn}
10 ; for the arguments to each SQL statement.
12 ; In addition, for write statements, you have ${VAL1}, ${VAL2} ... ${VALn}
13 ; parsed, just like arguments, for the values. In addition, if you want the
14 ; whole value, never mind the parsing, you can get that with ${VALUE}.
17 ; ODBC_SQL - Allow an SQL statement to be built entirely in the dialplan
22 ; ODBC_ANTIGF - A blacklist.
25 read=SELECT COUNT(*) FROM exgirlfriends WHERE callerid='${ARG1}'
27 ; ODBC_PRESENCE - Retrieve and update presence
30 read=SELECT location FROM presence WHERE id='${ARG1}'
31 write=UPDATE presence SET location='${VAL1}' WHERE id='${ARG1}'