Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
userdoc:tt_asterisk-odbc [2013/03/14 16:23] abelbeck |
userdoc:tt_asterisk-odbc [2014/07/03 13:30] abelbeck [Mass Deployment SQL Table] |
||
---|---|---|---|
Line 38: | Line 38: | ||
The first step in using func_odbc dialplan functions is to create a database with some SQL schema, for example when the AstLinux **SQL-Data** tab in the web interface is first accessed it automatically creates the following schema in file ''/ | The first step in using func_odbc dialplan functions is to create a database with some SQL schema, for example when the AstLinux **SQL-Data** tab in the web interface is first accessed it automatically creates the following schema in file ''/ | ||
- | CREATE TABLE ' | + | CREATE TABLE IF NOT EXISTS |
' | ' | ||
' | ' | ||
- | ' | + | ' |
- | ' | + | ' |
' | ' | ||
' | ' | ||
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
); | ); | ||
| | ||
- | CREATE TABLE ' | + | CREATE TABLE IF NOT EXISTS |
' | ' | ||
' | ' | ||
- | ' | + | ' |
); | ); | ||
| | ||
- | CREATE TABLE ' | + | CREATE TABLE IF NOT EXISTS |
' | ' | ||
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
' | ' | ||
); | ); | ||
Line 73: | Line 73: | ||
!!Note ->!! The out_context table is automatically populated with id's from 0-7. | !!Note ->!! The out_context table is automatically populated with id's from 0-7. | ||
- | A simple example is the best way to demonstrate how this works. | + | A simple example is the best way to demonstrate how this works. |
+ | |||
+ | {{: | ||
Example ''/ | Example ''/ | ||
Line 90: | Line 92: | ||
same => n, | same => n, | ||
same => n,Hangup() | same => n,Hangup() | ||
+ | |||
+ | It is very simple and very powerful! | ||
+ | |||
+ | !!Tip ->!! Teach yourself some basic SQL commands. | ||
+ | |||
+ | ===== Mass Deployment SQL Table ===== | ||
+ | |||
+ | When using the PhoneProv tab in the web interface, by default the templates (sql_enable=yes) automatically generate a ' | ||
+ | |||
+ | !!Note: AstLinux 1.1.7 or later is required!! | ||
+ | |||
+ | Using the SQL-Data tab in the web interface, view an example ' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The SQL schema is of the form: | ||
+ | |||
+ | CREATE TABLE ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | Mass Deployment detailed documentation found here: | ||
+ | **[[userdoc: | ||