CTI
From Taridium
(→CTI Control) |
|||
(41 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | This optional ipbx module is installed under '''Advanced Setup''' → '''Modules'''. Registered modules are displayed with '''registered module'''. The CTI module has been made available in ipbx 2. | + | This optional ipbx module is installed under '''Advanced Setup''' → '''Modules'''. Registered modules are displayed with '''registered module'''. The CTI module has been made available in ipbx 2.1 and higher versions and is a standard component of ipbx Elite. |
+ | |||
+ | ipbx's CTI module provides a standardized way to interact with incoming calls using external applications. Applications include web driven pop-up windows and call manipulation. CTI interfaces use standard HTTP/S protocol and are completely language agnostic. | ||
+ | |||
+ | CTI integration is available in two places | ||
+ | |||
+ | # as CTI control, where calls coming in/out will cause interaction with external web enabled applications. | ||
+ | # as a means to pop-up an application page in the ipbx [[End User Panel]]. | ||
+ | |||
- | |||
== CTI Configuration == | == CTI Configuration == | ||
The CTI configuration can be accessed '''Advanced Setup''' → '''CTI'''. | The CTI configuration can be accessed '''Advanced Setup''' → '''CTI'''. | ||
+ | |||
+ | === Inbound Pop-Up Configuration === | ||
+ | |||
Basic CTI configuration allows you to specify an URL which will be loaded into the End User Panel CTI window as soon as a call is routed to a user. | Basic CTI configuration allows you to specify an URL which will be loaded into the End User Panel CTI window as soon as a call is routed to a user. | ||
- | + | [[Image:cticonfig.gif]] | |
- | + | Example URL | |
+ | http://192.168.77.123/crm_app/?calleridnumber=%%calleridnumber%%&calleridname=%%calleridname%% | ||
+ | |||
+ | === General CTI Control === | ||
+ | |||
+ | Specifies URL's which will be called before any inbound and outbound calls respectively. | ||
+ | |||
+ | === Post Call CTI === | ||
+ | |||
+ | A URL which will be called after each call. This URL's reply will not be processed, but can be used to pass call detail records in the GET argument. The valid variables for the URL correspond to the [[CDR]] field names using the common ipbx variable format, e.g. %%accountcode%%. | ||
+ | |||
+ | == CTI User Panel == | ||
+ | |||
+ | To open the CTI window in the User Panel, click on '''Features''' and the '''launch''' button: | ||
+ | |||
+ | [[Image:ctiuser.gif]] | ||
+ | |||
+ | == CTI Control == | ||
+ | |||
+ | The CTI control option is available for inbound/outbound call control, in the [[IVR]], [[Groups]] and [[Queues]] applications, for inbound [[Routes|Routing]], for timeout functions and for call accounting (see Call Accounting Module). A CTI URL can also be called after every call, but does not provide any control options. The CTI control options can be accessed in each of the application editors by clicking on '''CTI Control''' → '''configure options'''. | ||
In it's simplest form the CTI control allows you to signal that a call was routed to an application, usually passing along some identifying information such as the caller ID. | In it's simplest form the CTI control allows you to signal that a call was routed to an application, usually passing along some identifying information such as the caller ID. | ||
+ | |||
+ | [[Image:cti-control.gif]] | ||
+ | |||
+ | Example URL | ||
+ | |||
+ | http://192.168.77.123/myctitest.html?calleridnumber=%%calleridnumber%%&calleridname=%%calleridname%% | ||
+ | |||
+ | In the above situation an incoming call would cause the URL to be called and the variables '''%%calleridnumber%%''' and '''%%calleridname%%''' to be replaced with the actual information. The default request timeout is 2 seconds. Both HTTP and HTTPS are supported. | ||
+ | |||
+ | For a complete list of variables refer to [[CTI#CTI_URL_Variables|CTI URL variables]]. | ||
+ | |||
+ | === CTI XML Format === | ||
+ | |||
+ | When a CTI URL is called by ipbx it is parsed for a valid XML reply. This XML reply may contain instructions on how to handle the call BEFORE it is handled by the application. The XML code could for example instruct ipbx to route a call to a different application, based on the caller ID or other information, or it can update the caller ID fields or account code. | ||
+ | |||
+ | '''Example Code 1''' | ||
+ | |||
+ | This example changes the caller ID name field based on data stored in an external application, sets the correct account code and enables call recording. | ||
+ | |||
+ | <?xml version="1.0" encoding="UTF-8" ?> | ||
+ | <ipbx> | ||
+ | <cti> | ||
+ | <call> | ||
+ | <set> | ||
+ | <calleridname>ACME Inc OVRDUE</calleridname> | ||
+ | <accountcode>knownaccount</accountcode> | ||
+ | <record>1</record> | ||
+ | </set> | ||
+ | </call> | ||
+ | </cti> | ||
+ | </ipbx> | ||
+ | |||
+ | The '''<set/>''' tag can contain any of the following sub-tags: | ||
+ | |||
+ | * <calleridname/> sets the caller ID name for the call | ||
+ | * <calleridnumber/> sets the caller ID number for the call | ||
+ | * <calleridani/> sets the ANI for the call | ||
+ | * <accountcode/> sets the accountcode for the call | ||
+ | * <userfield/> sets the userfield for the call | ||
+ | * <acc_code1/> sets an additional account code in the accounting table | ||
+ | * <acc_code2/> sets an additional account code in the accounting table | ||
+ | * <acc_code3/> sets an additional account code in the accounting table | ||
+ | * <record/> 0 or not set, yes(1) whether to record the call, using '''no''' will disable any systemwide recordings | ||
+ | |||
+ | '''Example Code 2''' | ||
+ | |||
+ | This example re-routes the call to another extension. This could for example be an overflow call answering service or any other application within ipbx. | ||
+ | |||
+ | <?xml version="1.0" encoding="UTF-8" ?> | ||
+ | <ipbx> | ||
+ | <cti> | ||
+ | <call> | ||
+ | <route> | ||
+ | <type>extension</type> | ||
+ | <name>18005554444</name> | ||
+ | <break>0</break> | ||
+ | </route> | ||
+ | </call> | ||
+ | </cti> | ||
+ | </ipbx> | ||
+ | |||
+ | The '''<type/>''' tag can contain any of the following keywords: | ||
+ | |||
+ | * extension | ||
+ | * ivr | ||
+ | * conf | ||
+ | * queue | ||
+ | * channel | ||
+ | * directory | ||
+ | * group | ||
+ | * mailbox | ||
+ | * user | ||
+ | |||
+ | The '''<name/>''' tag must contain a valid application/function name. Use a function instead of an extension whenever possible. | ||
+ | |||
+ | The '''<break/>''' tag is boolean, 0 or 1 and indicated whether to break execution after CTI processing has been completed. | ||
== CTI URL Variables == | == CTI URL Variables == | ||
Line 18: | Line 123: | ||
The following variables can be used in any of the CTI URLs and will be replaced with the according values. Some values might not be available in certain situations. | The following variables can be used in any of the CTI URLs and will be replaced with the according values. Some values might not be available in certain situations. | ||
+ | * '''%%calleridnumber%%''' or '''%%calleridnum%%''' The caller ID number, if available | ||
* '''%%calleridname%%''' The caller ID name, if available | * '''%%calleridname%%''' The caller ID name, if available | ||
- | * '''%% | + | * '''%%calleridani%%''' The caller ID [[wikipedia:Automatic_Number_Identification|ANI]], if available |
* '''%%accountcode%%''' The call account code | * '''%%accountcode%%''' The call account code | ||
- | * '''%%uniqueid%%''' The unique ID of the call | + | * '''%%uniqueid%%''' The unique ID of the call as stored in the [[CDR]] records |
* '''%%channel%%''' The channel, if available | * '''%%channel%%''' The channel, if available | ||
+ | * '''%%exten%%''' The called extension | ||
+ | * '''%%acc_code[1-3]%%''' an additional account code |
Latest revision as of 14:09, 24 February 2011
This optional ipbx module is installed under Advanced Setup → Modules. Registered modules are displayed with registered module. The CTI module has been made available in ipbx 2.1 and higher versions and is a standard component of ipbx Elite.
ipbx's CTI module provides a standardized way to interact with incoming calls using external applications. Applications include web driven pop-up windows and call manipulation. CTI interfaces use standard HTTP/S protocol and are completely language agnostic.
CTI integration is available in two places
- as CTI control, where calls coming in/out will cause interaction with external web enabled applications.
- as a means to pop-up an application page in the ipbx End User Panel.
Contents |
CTI Configuration
The CTI configuration can be accessed Advanced Setup → CTI.
Inbound Pop-Up Configuration
Basic CTI configuration allows you to specify an URL which will be loaded into the End User Panel CTI window as soon as a call is routed to a user.
Example URL
http://192.168.77.123/crm_app/?calleridnumber=%%calleridnumber%%&calleridname=%%calleridname%%
General CTI Control
Specifies URL's which will be called before any inbound and outbound calls respectively.
Post Call CTI
A URL which will be called after each call. This URL's reply will not be processed, but can be used to pass call detail records in the GET argument. The valid variables for the URL correspond to the CDR field names using the common ipbx variable format, e.g. %%accountcode%%.
CTI User Panel
To open the CTI window in the User Panel, click on Features and the launch button:
CTI Control
The CTI control option is available for inbound/outbound call control, in the IVR, Groups and Queues applications, for inbound Routing, for timeout functions and for call accounting (see Call Accounting Module). A CTI URL can also be called after every call, but does not provide any control options. The CTI control options can be accessed in each of the application editors by clicking on CTI Control → configure options. In it's simplest form the CTI control allows you to signal that a call was routed to an application, usually passing along some identifying information such as the caller ID.
Example URL
http://192.168.77.123/myctitest.html?calleridnumber=%%calleridnumber%%&calleridname=%%calleridname%%
In the above situation an incoming call would cause the URL to be called and the variables %%calleridnumber%% and %%calleridname%% to be replaced with the actual information. The default request timeout is 2 seconds. Both HTTP and HTTPS are supported.
For a complete list of variables refer to CTI URL variables.
CTI XML Format
When a CTI URL is called by ipbx it is parsed for a valid XML reply. This XML reply may contain instructions on how to handle the call BEFORE it is handled by the application. The XML code could for example instruct ipbx to route a call to a different application, based on the caller ID or other information, or it can update the caller ID fields or account code.
Example Code 1
This example changes the caller ID name field based on data stored in an external application, sets the correct account code and enables call recording.
<?xml version="1.0" encoding="UTF-8" ?> <ipbx> <cti> <call> <set> <calleridname>ACME Inc OVRDUE</calleridname> <accountcode>knownaccount</accountcode> <record>1</record> </set> </call> </cti> </ipbx>
The <set/> tag can contain any of the following sub-tags:
- <calleridname/> sets the caller ID name for the call
- <calleridnumber/> sets the caller ID number for the call
- <calleridani/> sets the ANI for the call
- <accountcode/> sets the accountcode for the call
- <userfield/> sets the userfield for the call
- <acc_code1/> sets an additional account code in the accounting table
- <acc_code2/> sets an additional account code in the accounting table
- <acc_code3/> sets an additional account code in the accounting table
- <record/> 0 or not set, yes(1) whether to record the call, using no will disable any systemwide recordings
Example Code 2
This example re-routes the call to another extension. This could for example be an overflow call answering service or any other application within ipbx.
<?xml version="1.0" encoding="UTF-8" ?> <ipbx> <cti> <call> <route> <type>extension</type> <name>18005554444</name> <break>0</break> </route> </call> </cti> </ipbx>
The <type/> tag can contain any of the following keywords:
- extension
- ivr
- conf
- queue
- channel
- directory
- group
- mailbox
- user
The <name/> tag must contain a valid application/function name. Use a function instead of an extension whenever possible.
The <break/> tag is boolean, 0 or 1 and indicated whether to break execution after CTI processing has been completed.
CTI URL Variables
The following variables can be used in any of the CTI URLs and will be replaced with the according values. Some values might not be available in certain situations.
- %%calleridnumber%% or %%calleridnum%% The caller ID number, if available
- %%calleridname%% The caller ID name, if available
- %%calleridani%% The caller ID ANI, if available
- %%accountcode%% The call account code
- %%uniqueid%% The unique ID of the call as stored in the CDR records
- %%channel%% The channel, if available
- %%exten%% The called extension
- %%acc_code[1-3]%% an additional account code