Let's also include aclocal.m4
[asterisk-bristuff.git] / configs / func_odbc.conf.sample
blobc9f9d5d7f63924a4b2c8fc31ec8abf40aae1e5bf
2 ; func_odbc.conf
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 ; If you have data which may potentially contain single ticks, you may wish
18 ; to use the dialplan function SQL_ESC() to escape the data prior to its
19 ; inclusion in the SQL statement.
22 ; ODBC_SQL - Allow an SQL statement to be built entirely in the dialplan
23 [SQL]
24 dsn=mysql1
25 read=${ARG1}
27 ; ODBC_ANTIGF - A blacklist.
28 [ANTIGF]
29 dsn=mysql1
30 read=SELECT COUNT(*) FROM exgirlfriends WHERE callerid='${SQL_ESC(${ARG1})}'
32 ; ODBC_PRESENCE - Retrieve and update presence
33 [PRESENCE]
34 dsn=mysql1
35 read=SELECT location FROM presence WHERE id='${SQL_ESC(${ARG1})}'
36 write=UPDATE presence SET location='${SQL_ESC(${VAL1})}' WHERE id='${SQL_ESC(${ARG1})}'
37 ;prefix=OFFICE          ; Changes this function from ODBC_PRESENCE to OFFICE_PRESENCE
38 ;escapecommas=no        ; Normally, commas within a field are escaped such that each
39                         ; field may be separated into individual variables with ARRAY.
40                         ; This option turns that behavior off [default=yes].