Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
configuration:telephony:examples [2019/05/23 13:23] – [How to configure a poll on the Commsmundi server] jgilconfiguration:telephony:examples [2025/01/13 18: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:<WRAP> 
 +  * 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__. 
 +</WRAP> 
 +  - 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:<WRAP> 
 +  * Name: [example] 
 +  * Parameters:  
 +    * Driver: My SQL Internal 
 +    * Database: [example]  
 + 
 +When it's ok, click on __Add__. 
 +</WRAP> 
 +  - To continue, we will create an extension for a context, to do this we will go to **Telephony -> Dialplan**\\, we will select the "Outgoing" context and we will do click on __Add__ in "Outgoing call". We will configure the parameters the next way:<WRAP> 
 +  * 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), '${uuid}', '', '', '${caller_id_number}', ''); 
 +When it's ok, click on __Add__. 
 +</WRAP> 
 +  - The next step will be add a new "Outgoing call". We will configure the parameters the next way:<WRAP> 
 +  * 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='${body.tipo}', cuenta='${from_user}' where uuid='${body.uuid}' 
 + 
 +<code> 
 + 
 +
 +
 +        "type": "label", 
 +        "label":"Cola: XXX" 
 +}, 
 +
 +"action":"message", 
 +"destination":"tipificar", 
 +"label":"tipo de llamada", 
 +"type":"select", 
 +"option": 
 +
 +{"label":"--seleccione una opcion--","value":{"uuid":"${uuid}", "tipo":"0"}}, 
 +{"label":"Tipo 1","value":{"uuid":"${uuid}", "tipo":"101"}}, 
 +{"label":"Tipo 2","value":{"uuid":"${uuid}", "tipo":"102"}} 
 +
 +}, 
 +
 +"type":"label", 
 +"label":"Origen: ${caller_id_number} </label><label>" 
 +
 +
 +</code> 
 + 
 +To finish, we do click on __Add__.  
 + 
 +</WRAP> 
 +  - To continue, we will create an chat extension for a context, to do this we will go to **Telephony -> Chat -> Dialplan**\\, we will select the "Outgoing" context and we will do click on __Add__ in "Outgoing Chat". We will configure the parameters the next way:<WRAP> 
 +  * Name: [example actualizar]. 
 +  * Priority: First. 
 +  * Continue: Check Off. 
 +  * Conditions: Custom: 
 +  * ^tipificar 
 +  * Action: 
 +    * Custom. 
 +    * ODBC. 
 +    * Execute: On start. 
 +      * ODBC: [example] 
 +      * SQL: 
 +<code> 
 +UPDATE data SET tipo='${body.tipo}', cuenta='${from_user}' where uuid='${body.uuid}' 
 +</code> 
 + 
 +When it's ok, click on __Add__. 
 +</WRAP> 
 + 
 +====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:<WRAP>   - 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:<WRAP>
   * Name: [example]   * Name: [example]
Line 59: Line 159:
   - To finish, we do click on __Add__.    - To finish, we do click on __Add__. 
  
-====Example Outgoing call - Conditional rules - Limit users by call time (after reach the time limit no more calls are allowed)====+====Example Outgoing call - Conditional rules - Limit users by call time (after reach the time limit no more calls are allowed)====
  
   - 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:<WRAP>   - 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:<WRAP>
Line 120: Line 220:
   - To finish, we do click on __Add__.    - To finish, we do click on __Add__. 
  
-====Example Outgoing call - Conditional rules - Limit user by call time, force to hangup on available time, and prevent next call after limit reached ====+====Example Outgoing call - Conditional rules - Limit user by call time, force to hangup on available time, and prevent next call after limit reached ====
  
   - 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:<WRAP>   - 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:<WRAP>
Line 210: Line 310:
 </WRAP> </WRAP>
  
-====Example condition to Outgoing call - Make a call to X digits number, pulsing only the 3 firsts:====+====Example condition to Outgoing call - Make a call to X digits number, pulsing only the 3 firsts:====
  
   - 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:<WRAP>   - 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:<WRAP>
Line 279: Line 379:
 When it's ok, click on __Add__. When it's ok, click on __Add__.
  
-====Example condition to Outgoing call - Show in the addressee the name and number who is calling:====+====Example condition to Outgoing call - Show in the addressee the name and number who is calling:====
  
   - 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:<WRAP>   - 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:<WRAP>
Line 350: Line 450:
         * Destination: Domain: [Your Domain] Number: ${odbc_LARGO}         * Destination: Domain: [Your Domain] Number: ${odbc_LARGO}
 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:<WRAP>
 +  * Name: [localhost]
 +  * SQL: Execute
 +  * SQL Editor: 
 +
 +  CREATE TABLE `numbers` (
 +  `phone` varchar(10) NOT NULL,
 +  `account` varchar(10) DEFAULT 'YES'
 +  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 +When it's ok, click on __Add__.
 +</WRAP>
 +  - 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:<WRAP>
 +  * Name: [localhost]
 +  * Parameters: 
 +    * Driver: My SQL Internal
 +    * Database: [localhost] 
 +
 +When it's ok, click on __Add__.
 +</WRAP>
 +
 +  - To call to a account and continue if busy.<WRAP>
 +
 +  * **Name**: call account
 +  * **Priority**: //last//
 +  * **Continue**: x - //Continue after extension//
 +  * **Conditions**: x - //custom//; x - //Destination number//: x-//Expression//: ^20\d$
 +  * **Action**: x - //custom//: //Bridge Local//; //Type//: x - //account//; //Domain//: commsmundi.com; //Number//: ${destination_number}
 +    * //Continue//; //Condition//: x - //Busy//; x - //transfer//: ivr @ outgoing 
 +  * click __Add__
 +</WRAP>
 +
 +  - Adding a rule call trigger upon hangup. Add the rule using the following parameters:<WRAP>
 +  * **Name**: call trigger
 +  * **Priority**: //first//
 +  * **Continue**: x - //Continue after extension//
 +  * **Conditions**: x - //any//
 +  * **Action**: x - //custom//: //Execute on Hangup//; 
 +    * //Action//: //HTTP//;
 +    * x -  Execute in channel A / Execute in channel B
 +    * //URL//: http://localhost:1080/mon/event.php?sensor_name=phone&key=<key trigger>&account=${caller_id_number}
 +  * click __Add__
 +</WRAP>
 +
 +  - To add a new menu action go to the page Telephony -> IVR:<WRAP>
 +
 +  - 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**, //first//
 +      - Set the **Action** for the ivr menu, choose:
 +        * //Custom//
 +        * //ODBC//
 +        * x - //Execute inline//;
 +        * //ODBC//: localhost; 
 +        * //SQL//: INSERT INTO `numbers` (`phone`, `account`) VALUES('${caller_id_number}', '${destination_number}');
 +      - Click __Add__
 +</WRAP>
 +
 +  - Adding a trigger:<WRAP>
 +  * Name: numbers
 +  * X- key : <key trigger>
 +</WRAP>
 +
 +  - Adding a trigger rule that check  in odbc query:<WRAP>
 +  * Name: odbc_query
 +  * Priority: First
 +  * Continue: Continue after rule
 +  * Conditions: x - Any
 +  * Action: x - Custom, odbc
 +    * ODBC: loalhost.
 +    * SQL: select * from numbers where account = '${account}' limit 1;
 +</WRAP>
 +
 +  - Adding a trigger rule that to call:<WRAP>
 +  * Name: call
 +  * Priority: Last
 +  * Continue: Continue after rule
 +  * Conditions: x - custom; x - Variable text; Name: odbc_account; Expression: ^.+$
 +  * Action: Call
 +  * Destination: ${odbc_account} @ outgoing
 +  * Action: ${odbc_phone} @ outgoing
 +  * Click on __Add__
 +
 +
 +  - Adding a trigger rule that delete  in odbc query:<WRAP>
 +  * Name: odbc_delete
 +  * Priority: last
 +  * Conditions: x - custom; x - Variable text; Name: odbc_account; Expression: ^.+$
 +  * Action: x - Custom, odbc
 +    * ODBC: loalhost.
 +    * SQL: delete from numbers where account = '${odbc_account}' limit 1;
 +
  
  
/home/www/wiki/data/attic/configuration/telephony/examples.1558610619.txt.gz · Last modified: 2019/05/23 13:23 by jgil
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki