Newer Version Available
fireOnCallEnd()
Fires an event that notifies a call has ended. Use to get information or send information between an interaction
log and a custom console component.
This method is only available in API version 31.0 or
later.
Syntax
1sforce.console.cti.fireOnCallEnd( callObjectId:String, callDuration:Number, callDisposition:String, (optional)callback:Function )Arguments
| Name | Type | Description |
|---|---|---|
| callObjectId | string | The object ID of the call. |
| callDuration | number | Number specifying the duration of the call. |
| callDisposition | string | String representing the call’s disposition, such as call successful, left voicemail, or disconnected. |
| callback | function | JavaScript method called upon completion of the method. |
Sample Code–Visualforce
1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17<apex:page>
18 <A HREF="#" onClick="testFireOnCallEnd();return false">
19 Click here to end a call</A>
20
21 <apex:includeScript value="/support/console/31.0/integration.js"/>
22 <script type="text/javascript">
23
24 function testFireOnCallEnd() {
25 //Here, 'call.1' refers to a call that is in progress.
26 sforce.console.cti.fireOnCallEnd('call.1', 60, 'Set Appointment');
27 }
28
29 </script>
30</apex:page>Response
This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field:
| Name | Type | Description |
|---|---|---|
| success | boolean | true if firing the event is successful, false otherwise. |