vinsbg
March 6, 2017, 11:23am
6
kharwell:
Yes as @david551 mentioned you can do this by calling into the database directly from the dialplan. See the func_odbc.conf.sample file for an example. Once you’ve declared your section/SQL in funcodbc.conf_ you can reference it from the dialplan using something similar to the below:
same => n,Set(<variable>=${ODBC_<section from configuration>(<argument[s]>)})
So, using the example from the sample file, if you wanted to retrieve and store the presence in variable “MYPRESENCE” you’d do the following in the dialplan:
same => n,Set(MYPRESENCE=${ODBC_PRESENCE(${EXTEN})})
Okay lets say I’ve make it like this. After the same => n,Set(MYPRESENCE=${ODBC_PRESENCE(${EXTEN})}) how to catch if is there this user or no… and how to proceed to next contexts ?