This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| configuration:telephony:examples [2019/05/23 11:23] – [How to configure a poll on the Commsmundi server] jgil | configuration:telephony:examples [2025/01/13 17:22] (current) – [Example 1 Commdesk and changes datas] admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| =====ODBC===== | =====ODBC===== | ||
| - | ====Example 1 Outgoing call - Conditional rules - some numbers can call but others not==== | + | ====Example 1 Commdesk and changes datas==== |
| + | - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | ||
| + | * Name: [example] | ||
| + | * SQL: Execute | ||
| + | * SQL Editor: | ||
| + | |||
| + | CREATE TABLE `data` ( | ||
| + | `fecha` int(11) DEFAULT NULL, | ||
| + | `uuid` varchar(255) NOT NULL, | ||
| + | `cuenta` varchar(255) NOT NULL, | ||
| + | `agente` varchar(255) NOT NULL, | ||
| + | `telefono` varchar(255) NOT NULL, | ||
| + | `tipo` varchar(255) NOT NULL, | ||
| + | UNIQUE KEY `uuid` (`uuid`)); | ||
| + | When it's ok, click on __Add__. | ||
| + | </ | ||
| + | - Now, we will to create a new ODBC, to this we will go to **Home -> ODBC**\\ and we do click on __Add__. We will configure the parameters the next way:< | ||
| + | * Name: [example] | ||
| + | * Parameters: | ||
| + | * Driver: My SQL Internal | ||
| + | * Database: [example] | ||
| + | |||
| + | When it's ok, click on __Add__. | ||
| + | </ | ||
| + | - To continue, we will create an extension for a context, to do this we will go to **Telephony -> Dialplan**\\, | ||
| + | * Name: [example insert odbc]. | ||
| + | * Priority: First. | ||
| + | * Continue: Check on. | ||
| + | * Conditions: Any. | ||
| + | * Action: | ||
| + | * Custom. | ||
| + | * ODBC. | ||
| + | * Execute: On start. | ||
| + | * ODBC: [example] | ||
| + | * SQL: | ||
| + | |||
| + | INSERT INTO data (fecha, uuid, cuenta, agente, telefono, tipo) VALUES (unix_timestamp(CURRENT_TIMESTAMP), | ||
| + | When it's ok, click on __Add__. | ||
| + | </ | ||
| + | - The next step will be add a new " | ||
| + | * Name: [example callcenter]. | ||
| + | * Priority: after [example insert odbc]. | ||
| + | * Continue: not | ||
| + | * Conditions: Custom. | ||
| + | * to: ^tipificar | ||
| + | * Action: | ||
| + | * Custom. | ||
| + | * Odbc: | ||
| + | * Driver: My SQL Internal | ||
| + | * Database: [example] | ||
| + | * sql: UPDATE data SET tipo=' | ||
| + | |||
| + | < | ||
| + | |||
| + | [ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | [ | ||
| + | {" | ||
| + | {" | ||
| + | {" | ||
| + | ] | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | </ | ||
| + | |||
| + | To finish, we do click on __Add__. | ||
| + | |||
| + | </ | ||
| + | - To continue, we will create an chat extension for a context, to do this we will go to **Telephony -> Chat -> Dialplan**\\, | ||
| + | * Name: [example actualizar]. | ||
| + | * Priority: First. | ||
| + | * Continue: Check Off. | ||
| + | * Conditions: Custom: | ||
| + | * ^tipificar | ||
| + | * Action: | ||
| + | * Custom. | ||
| + | * ODBC. | ||
| + | * Execute: On start. | ||
| + | * ODBC: [example] | ||
| + | * SQL: | ||
| + | < | ||
| + | UPDATE data SET tipo=' | ||
| + | </ | ||
| + | |||
| + | When it's ok, click on __Add__. | ||
| + | </ | ||
| + | |||
| + | ====Example 2 Outgoing call - Conditional rules - some numbers can call but others not==== | ||
| - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | ||
| * Name: [example] | * Name: [example] | ||
| Line 59: | Line 159: | ||
| - To finish, we do click on __Add__. | - To finish, we do click on __Add__. | ||
| - | ====Example | + | ====Example |
| - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | ||
| Line 120: | Line 220: | ||
| - To finish, we do click on __Add__. | - To finish, we do click on __Add__. | ||
| - | ====Example | + | ====Example |
| - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | ||
| Line 210: | Line 310: | ||
| </ | </ | ||
| - | ====Example | + | ====Example |
| - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | ||
| Line 279: | Line 379: | ||
| When it's ok, click on __Add__. | When it's ok, click on __Add__. | ||
| - | ====Example | + | ====Example |
| - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | ||
| Line 350: | Line 450: | ||
| * Destination: | * Destination: | ||
| When it's ok, click on __Add__. | When it's ok, click on __Add__. | ||
| + | |||
| + | ====Example 7 callback, if account is busy:==== | ||
| + | |||
| + | - The first, we will go to **Services -> MySQL**\\ and in the MySQL DataBases we will go to do click in __Add__. We will configure the parameters the next way:< | ||
| + | * Name: [localhost] | ||
| + | * SQL: Execute | ||
| + | * SQL Editor: | ||
| + | |||
| + | CREATE TABLE `numbers` ( | ||
| + | `phone` varchar(10) NOT NULL, | ||
| + | `account` varchar(10) DEFAULT ' | ||
| + | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
| + | When it's ok, click on __Add__. | ||
| + | </ | ||
| + | - Now, we will to create a new ODBC, to this we will go to **Home -> ODBC**\\ and we do click on __Add__. We will configure the parameters the next way:< | ||
| + | * Name: [localhost] | ||
| + | * Parameters: | ||
| + | * Driver: My SQL Internal | ||
| + | * Database: [localhost] | ||
| + | |||
| + | When it's ok, click on __Add__. | ||
| + | </ | ||
| + | |||
| + | - To call to a account and continue if busy.< | ||
| + | |||
| + | * **Name**: call account | ||
| + | * **Priority**: | ||
| + | * **Continue**: | ||
| + | * **Conditions**: | ||
| + | * **Action**: x - //custom//: //Bridge Local//; //Type//: x - // | ||
| + | * // | ||
| + | * click __Add__ | ||
| + | </ | ||
| + | |||
| + | - Adding a rule call trigger upon hangup. Add the rule using the following parameters:< | ||
| + | * **Name**: call trigger | ||
| + | * **Priority**: | ||
| + | * **Continue**: | ||
| + | * **Conditions**: | ||
| + | * **Action**: x - //custom//: //Execute on Hangup//; | ||
| + | * //Action//: //HTTP//; | ||
| + | * x - Execute in channel A / Execute in channel B | ||
| + | * //URL//: http:// | ||
| + | * click __Add__ | ||
| + | </ | ||
| + | |||
| + | - To add a new menu action go to the page Telephony -> IVR:< | ||
| + | |||
| + | - Select the IVR where you want to add the new action or actions by clicking in the folder icon, near its name in the IVR table. | ||
| + | - In the IVR Actions table (where the configured IVR actions are listed), click __Add__ | ||
| + | Example of some actions that you can add: | ||
| + | * __Action: insert in odbc__ | ||
| + | - Set the value for the **Digits**, //6// | ||
| + | - Set the value for the **Priority**, | ||
| + | - Set the **Action** for the ivr menu, choose: | ||
| + | * //Custom// | ||
| + | * //ODBC// | ||
| + | * x - //Execute inline//; | ||
| + | * //ODBC//: localhost; | ||
| + | * //SQL//: INSERT INTO `numbers` (`phone`, `account`) VALUES(' | ||
| + | - Click __Add__ | ||
| + | </ | ||
| + | |||
| + | - Adding a trigger:< | ||
| + | * Name: numbers | ||
| + | * X- key : <key trigger> | ||
| + | </ | ||
| + | |||
| + | - Adding a trigger rule that check in odbc query:< | ||
| + | * Name: odbc_query | ||
| + | * Priority: First | ||
| + | * Continue: Continue after rule | ||
| + | * Conditions: x - Any | ||
| + | * Action: x - Custom, odbc | ||
| + | * ODBC: loalhost. | ||
| + | * SQL: select * from numbers where account = ' | ||
| + | </ | ||
| + | |||
| + | - Adding a trigger rule that to call:< | ||
| + | * Name: call | ||
| + | * Priority: Last | ||
| + | * Continue: Continue after rule | ||
| + | * Conditions: x - custom; x - Variable text; Name: odbc_account; | ||
| + | * Action: Call | ||
| + | * Destination: | ||
| + | * Action: ${odbc_phone} @ outgoing | ||
| + | * Click on __Add__ | ||
| + | |||
| + | |||
| + | - Adding a trigger rule that delete | ||
| + | * Name: odbc_delete | ||
| + | * Priority: last | ||
| + | * Conditions: x - custom; x - Variable text; Name: odbc_account; | ||
| + | * Action: x - Custom, odbc | ||
| + | * ODBC: loalhost. | ||
| + | * SQL: delete from numbers where account = ' | ||
| + | |||