Namespace $.fn.cwic
Defined in: cwic.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
CWIC is a jQuery plug-in to access the Cisco Web Communicator
Audio and Video media require the Cisco Web Communicator add-on to be installed Fields overviewMethods overviewAll cwic methods are called in the following manner$('#selector').cwic('method',parameters)Events overviewAll events are part of the cwic namespace. |
| Method Attributes | Method Name and Description |
|---|---|
| <inner> |
about()
Versions, states and capabilities.
|
| <inner> |
addPreviewWindow(args)
Assign a video window object to preview (self-view).
|
| <inner> |
Cancels ongoing Single Sign On procedure if internal 'canCancelSingleSignOn' capability is enabled.
|
| <inner> |
createVideoWindow(settings)
Creates an object that can be passed to startConversation, addPreviewWindow, or updateConversation('addRemoteVideoWindow').
|
| <inner> |
dock(args)
Docks an external video window created by $.fn.cwic-showPreviewInExternalWindow or $.fn.cwic-showCallInExternalWindow.
|
| <inner> |
endConversation(iDivert, id)
Ends a conversation.
|
| <inner> |
Triggers an $.fn.cwic#event:externalWindowEvent to be sent to the application with the current state of the external window.
|
| <inner> |
Gets a list of objects describing the multimedia devices installed on a system.
|
| <inner> |
getMultimediaDeviceVolume(device, callback(volume))
Gets the current volume value for particular device.
|
| <inner> |
Gets the current user authorization status.
|
| <inner> |
Hides an external video window created by $.fn.cwic-showPreviewInExternalWindow or $.fn.cwic-showCallInExternalWindow.
|
| <inner> |
init(options)
Wait for the document to be ready, and try to load the Cisco Web Communicator add-on.
|
| <inner> |
Alias for $.fn.cwic-registerPhone
|
| <inner> |
registerPhone(args)
Register phone to CUCM (SIP register).
|
| <inner> |
removePreviewWindow(args)
Remove a video window object from preview (self-view)
|
| <inner> |
Clears cached user and system data.
|
| <inner> |
sendDTMF(digit, id)
Sends digit (String) as Dual-Tone Multi-Frequency (DTMF)
|
| <inner> |
setCaptureDevice(clientCaptureID:)
Sets the video capture device used by the Cisco Web Communicator.
|
| <inner> |
setExternalWindowAlwaysOnTop(isAlwaysOnTop)
Controls whether external video windows created by $.fn.cwic-showPreviewInExternalWindow or
$.fn.cwic-showCallInExternalWindow are shown always on top (default) or not.
|
| <inner> |
setExternalWindowShowControls(showControls)
Controls whether a overlaid controls are shown in external video window created by $.fn.cwic-showCallInExternalWindow or $.fn.cwic-showPreviewInExternalWindow.
|
| <inner> |
setExternalWindowShowSelfViewPip(showPipSelfView)
Controls whether a picture-in-picture preview (self-view) is shown when $.fn.cwic-showCallInExternalWindow is used to put a call in external video window.
|
| <inner> |
setExternalWindowTitle(title)
Sets the window title used in external video windows created by $.fn.cwic-showPreviewInExternalWindow or $.fn.cwic-showCallInExternalWindow.
|
| <inner> |
Sets microphone volume.
|
| <inner> |
setPlayoutDevice(clientPlayoutID:)
Sets the audio playout device used by the Cisco Web Communicator.
|
| <inner> |
Sets all capable devices as ringers.
|
| <inner> |
setRecordingDevice(clientRecordingID:)
Sets the audio recording device used by the Cisco Web Communicator.
|
| <inner> |
setRingerDevice(clientRingerID:)
Sets the ringer device used by the Cisco Web Communicator.
|
| <inner> |
Sets ringer volume.
|
| <inner> |
setRingtone(ringtone)
Sets ringtone.
|
| <inner> |
Sets speaker volume.
|
| <inner> |
Shows the call in an external video window.
|
| <inner> |
Shows preview (self-view) in an external video window.
|
| <inner> |
showUserAuthorization(denied, force)
Shows the user authorization dialog.
|
| <inner> |
shutdown()
Shuts down the API
|
| <inner> |
signOut(args)
Signs out a registered device from CUCM:
|
| <inner> |
startConversation(conversation)
Start a conversation with a participant.
|
| <inner> |
startDiscovery(args)
Initiates service discovery based sign-in.
|
| <inner> |
switchPhoneMode(options)
Switch mode on a session that is already authorized.
|
| <inner> |
undock()
Undocks an external video window previously docked by $.fn.cwic-dock
Example use: |
| <inner> |
unregisterPhone(args)
Unregisters a phone from CUCM:
|
| <inner> |
updateConversation(update, id)
Updates an existing conversation.
|
| Event Attributes | Event Name and Description |
|---|---|
|
callTransferInProgress(event)
A call transfer is in progress.
|
|
|
conversationEnd(event, conversation)
A conversation has ended.
|
|
|
conversationIncoming(event, conversation, container)
A new conversation is being received, but has not yet started.
|
|
|
conversationStart(event, conversation, container)
A conversation has just started.
|
|
|
conversationUpdate(event, conversation, container)
One or more properties of a conversation have changed, such as state or participants.
|
|
|
error(event)
|
|
|
externalWindowEvent(event)
A property has changed on the external video window created by $.fn.cwic-showPreviewInExternalWindow or $.fn.cwic-showCallInExternalWindow.
|
|
|
invalidCertificate(event)
An invalid certificate detected.
|
|
|
mmDeviceChange(event)
A change to the list of local multimedia devices has occurred.
|
|
|
multimediaCapabilities(event)
Signals weather the multimedia capability is enabled or not.
|
|
|
ringtoneChange(event)
Ringtone changed
|
|
|
ringtonesListAvailable(event)
List of ringtones is available
|
|
|
ssoNavigateTo(event)
Signals when authentication with Identity Provider is required during the SSO process.
|
|
|
system(event)
Called when the phone changes state.
|
Namespace Detail
$.fn.cwic
CWIC is a jQuery plug-in to access the Cisco Web Communicator
Audio and Video media require the Cisco Web Communicator add-on to be installed
The event handlers are passed the conversation properties as a single object. For example:
Audio and Video media require the Cisco Web Communicator add-on to be installed
Fields overview
Methods overview
All cwic methods are called in the following manner$('#selector').cwic('method',parameters)Events overview
All events are part of the cwic namespace. For example:- conversationStart.cwic
- system.cwic
- error.cwic
Example conversation events:
These are conversation-related events that can be triggered by the SDK.The event handlers are passed the conversation properties as a single object. For example:
- Parameters:
- {String} method
- The name of the method to call
- {Variable} arguments
- trailing arguments are passed to the specific call see methods below
Method Detail
<inner>
{aboutObject}
about()
Versions, states and capabilities.
- Returns:
- {aboutObject}
<inner>
addPreviewWindow(args)
Assign a video window object to preview (self-view).
- Parameters:
- {Object} args
- arguments object
- {DOMWindow} args.window Optional
- DOM Window that contains the plug-in Object defaults to current window
- {String|Object} args.previewWindow
- ID or DOM element of preview window
- {Function} args.error Optional
- Called when arguments object is malformed, i.e. args.previewWindow ID or DOM element is non-existent or malformed
<inner>
cancelSSO()
Cancels ongoing Single Sign On procedure if internal 'canCancelSingleSignOn' capability is enabled.
'canCancelSingleSignOn' is enabled immediately before 'ssoNavigateTo.cwic' event is triggered. It is disabled again after the token is acquired or after 'cancelSSO' call.
<inner>
createVideoWindow(settings)
Creates an object that can be passed to startConversation, addPreviewWindow, or updateConversation('addRemoteVideoWindow').
The object is inserted into the element defined by the jQuery context - e.g. jQuery('#placeholder').cwic('createVideoWindow')
inserts the videowindow under jQuery('#placeholder')
NOTE: This function will just 'do nothing' and the success() callback will never be called if either of the following are true:
NOTE: This function will just 'do nothing' and the success() callback will never be called if either of the following are true:
- video is not supported on the platform, see aboutObject#capabilities:video
- video plugin objects are not supported in the browser, see aboutObject#capabilities:videoPluginObject
- Parameters:
- {Object} settings Optional
- Settings to use when creating the video render object
- {String} settings.id Optional, Default: generated
- The DOM ID of the element to be created
- {Function} settings.success Optional
- Called when the object is loaded and ready for use plug-in ID is passed as a parameter
- {String} settings.onload Optional
- Not recommended for video windows created in the same window as the main phone plug-in.
Mandatory in popup windows or iframes. The string must be the name of a function in the global scope, and the function must call parent or opener window._cwic_onPopupVideoPluginLoaded. This function will be called in the onload handler of the video object.
Single parameter is the videoplugin object that must be passed to the parent handler.
<inner>
dock(args)
Docks an external video window created by $.fn.cwic-showPreviewInExternalWindow or $.fn.cwic-showCallInExternalWindow.
Example use:
Example use:
- Parameters:
- {Object} args Optional
- Information about target element for video overlay
- {DOMWindow} args.window
- Window object in which the target element is located
- {DOMElement} args.element
- Target element for video overlay
- Since:
- 3.1.2
<inner>
endConversation(iDivert, id)
Ends a conversation. Triggers a conversationEnd event.
- Parameters:
- {boolean} iDivert
- If true, redirects the call to voice mail. See UCM documentation on the Immediate Divert (iDivert) feature for details. The call can be iDiverted only if call#capabilities contains 'canImmediateDivert',
- {String|Object} id
- A conversation identifier (String) or an Object containing an id property.
<inner>
getExternalWindowState()
Triggers an $.fn.cwic#event:externalWindowEvent to be sent to the application with the current state of the external window.
- Since:
- 3.1.0
<inner>
getMultimediaDevices()
Gets a list of objects describing the multimedia devices installed on a system.
- Since:
- 3.0.0
- Returns:
- a list of objects describing the multimedia devices with the following properties:
- deviceID: unique device ID
- deviceName: {string} human readable device name
- vendorID: {string} unique vendor ID
- productID: {string} vendor product ID
- hardwareID: {string} hardware dependent ID
- canRecord: {boolean} indicates whether this object can be used as an audio recording device
- canPlayout: {boolean} indicates whether this object can be used as an audio playout device
- canCapture: {boolean} indicates whether this object can be used as a video capture device
- canRing: {boolean} indicates whether this object can be used as a ringer device
- isDefault: {boolean} indicates whether this object represents the default device of the type indicated by the canRecord, canPlayout, and canCapture flags
- recordingName: {string} human readable name for the audio recording function of this device
- playoutName: {string} human readable name for the audio playout function of this device
- captureName: {string} human readable name for the video capture function of this device
- recordingID: {string} ID for the audio recording function of this device
- playoutID: {string} ID for the audio playout function of this device
- captureID: {string} ID for the video capture function of this device
- clientRecordingID: {string} the ID to pass to setRecordingDevice to select this device as the audio recording device
- clientPlayoutID: {string} the ID to pass to setPlayoutDevice to select this device as the audio playout device
- clientCaptureID: {string} the ID to pass to setCaptureDevice to select this device as the video capture device
- isSelectedRecordingDevice: {boolean} indicates whether this is the currently selected audio recording device
- isSelectedPlayoutDevice: {boolean} indicates whether this is the currently selected audio playout device
- isSelectedCaptureDevice: {boolean} indicates whether this is the currently selected video capture device
<inner>
getMultimediaDeviceVolume(device, callback(volume))
Gets the current volume value for particular device. Async function.
Works on Windows platform only.
- Parameters:
- {String} device
- Type of device. One of: "Speaker", "Microphone", "Ringer"
- {Function} callback(volume)
- Callback to be called with volume value
- Since:
- 4.0.0
<inner>
{String}
getUserAuthStatus()
Gets the current user authorization status.
- Since:
- 3.0.1
- Returns:
- {String} a value indicating the current user authorization status.
- "UserAuthorized" indicates the user has authorized the Cisco Web Communicator add-on and it is ready to use.
- "MustShowAuth" indicates the application must call $.fn.cwic-showUserAuthorization to show the user authorization dialog.
- "UserDenied" indicates the user has denied the application access to the Cisco Web Communicator add-on.
- "UserAuthPending" indicates the dialog box is currently displayed and the user has not yet selected "allow", "deny", or "always allow".
- "Unknown" indicates status cannot be determined because delay authorization feature is not supported by the current Cisco Web Communicator add-on. This case will trigger $.fn.cwic-errorMap.OperationNotSupported as well.
<inner>
hideExternalWindow()
Hides an external video window created by $.fn.cwic-showPreviewInExternalWindow or $.fn.cwic-showCallInExternalWindow.
- Since:
- 3.1.0
<inner>
init(options)
Wait for the document to be ready, and try to load the Cisco Web Communicator add-on.
If cwic was successfully initialized, call the options.ready handler,
passing some stored properties (possibly empty),
otherwise call the options.error handler
If cwic was successfully initialized, call the options.ready handler,
passing some stored properties (possibly empty),
otherwise call the options.error handler
- Parameters:
- {Object} options
- Is a set of key/value pairs to configure the phone registration. See $.fn.cwic-settings for options.
<inner>
manualSignIn()
Alias for $.fn.cwic-registerPhone
<inner>
registerPhone(args)
Register phone to CUCM (SIP register). Used for manual type of registration, in which connection parameters are manually configured (tftp, ccmcip, cti).
- Parameters:
- args
- A map with:
- {String} args.user
- The CUCM end user name (required)
- {String|Object} args.password
- String - clear password. Object - {encrypted: encoded password, cipher:'cucm'}
- {String|Object|Array} args.cucm
- The list of CUCM(s) to attempt to register with (required).
If String, it will be used as a TFTP, CCMCIP and CTI address.
If Array, a list of String or Object as described above. Three is the maximum number of addresses per server (TFTP, CCMCIP, CTI). - {String[]} args.cucm.tftp Optional
- TFTP addresses. Maximum three values.
- {String[]} args.cucm.ccmcip Optional
- CCMCIP addresses (will use tftp values if not present). Maximum three values.
- {String[]} args.cucm.cti Optional
- Since: 2.1.1
CTI addresses (will use tftp values if not present). Maximum three values. - {String} args.mode Optional
- Register the phone in this mode. Available modes are "SoftPhone" or "DeskPhone". Default of intelligent guess is applied after a device is selected.
- {Function} args.devicesAvailable(devices, phoneMode, callback) Optional
- Callback called after successful authentication.
If this callback is not specified, cwic applies the default device selection algorithm. An array of device objects is passed so the application can select the device.
To complete the device registration, call the callback function that is passed in to devicesAvailable as the third parameter. The callback function is defined in the API, but it must be called by the function that is specified as the devicesAvailable parameter. - {Function} args.error(err) Optional
- Callback called if the registration fails. $.fn.cwic-errorMapEntry is passed as parameter.
- {Boolean} args.forceRegistration Optional
- Specifies whether to forcibly unregister other softphone instances with CUCM. Default is false. See GracefulRegistration doc for more info.
- {Function} args.success(registration) Optional
- Callback called when registration succeeds. A registration object is passed to the callback:
registerPhone examples
<inner>
removePreviewWindow(args)
Remove a video window object from preview (self-view)
- Parameters:
- {Object} args
- arguments object
- {DOMWindow} args.window Optional
- DOM Window that contains the plug-in Object defaults to current window
- {String|Object} args.previewWindow
- id or DOM element of preview window
- {Function} args.error Optional
- Called when arguments object is malformed, i.e. args.previewWindow ID or DOM element is non-existent or malformed
<inner>
resetData()
Clears cached user and system data. Must be called before manual sign in if previous sign in type was discovery based.
Can only be called in signed out state.
<inner>
sendDTMF(digit, id)
Sends digit (String) as Dual-Tone Multi-Frequency (DTMF)
- Parameters:
- {String} digit
- Dual-Tone Multi-Frequency (DTMF) digit to send. Does not trigger any event.
- {String|Object} id Optional
- a {String} conversation identifier or an {Object} containing an id property
<inner>
setCaptureDevice(clientCaptureID:)
Sets the video capture device used by the Cisco Web Communicator. To set a device, pass the clientCaptureID from a device with the canCapture flag set to true.
- Parameters:
- {String} clientCaptureID:
- clientCaptureID retrieved from getMultimediaDevices()
- Since:
- 3.0.0
<inner>
setExternalWindowAlwaysOnTop(isAlwaysOnTop)
Controls whether external video windows created by $.fn.cwic-showPreviewInExternalWindow or
$.fn.cwic-showCallInExternalWindow are shown always on top (default) or not.
- Parameters:
- {Boolean} isAlwaysOnTop
- Set to false to remove the always on top property. Set to true to restore default behavior.
- Since:
- 3.1.0
<inner>
setExternalWindowShowControls(showControls)
Controls whether a overlaid controls are shown in external video window created by $.fn.cwic-showCallInExternalWindow or $.fn.cwic-showPreviewInExternalWindow.
- Parameters:
- {Boolean} showControls
- Set to false to turn off the overlaid call controls. Set to true to restore default behavior.
- Since:
- 4.0.0
<inner>
setExternalWindowShowSelfViewPip(showPipSelfView)
Controls whether a picture-in-picture preview (self-view) is shown when $.fn.cwic-showCallInExternalWindow is used to put a call in external video window.
- Parameters:
- {Boolean} showPipSelfView
- Set to false to turn off the picture-in-picture. Set to true to restore default behavior.
- Since:
- 3.1.0
<inner>
setExternalWindowTitle(title)
Sets the window title used in external video windows created by $.fn.cwic-showPreviewInExternalWindow or $.fn.cwic-showCallInExternalWindow.
- Parameters:
- {String} title
- A string value to be used as the window title for the exernal video window.
- Since:
- 3.1.0
<inner>
setMicrophoneVolume()
Sets microphone volume. Works on Windows platform only.
- Parameters:
- {String|Number} args.volume
- Volume to set (0 to 100)
- {Function} args.success
- Success callback
- {Function} args.error
- Error callback
- Since:
- 4.0.0
<inner>
setPlayoutDevice(clientPlayoutID:)
Sets the audio playout device used by the Cisco Web Communicator. To set a device, pass the clientPlayoutID from a device with the canPlayout flag set to true.
- Parameters:
- {String} clientPlayoutID:
- clientPlayoutID retrieved from getMultimediaDevices()
- Since:
- 3.0.0
<inner>
setPlayRingerOnAllDevices()
Sets all capable devices as ringers. Works on Windows platform only.
- Since:
- 4.0.0
<inner>
setRecordingDevice(clientRecordingID:)
Sets the audio recording device used by the Cisco Web Communicator. To set a device, pass the clientRecordingID from a device with the canRecord flag set to true.
- Parameters:
- {String} clientRecordingID:
- clientRecordingID retrieved from getMultimediaDevices()
- Since:
- 3.0.0
<inner>
setRingerDevice(clientRingerID:)
Sets the ringer device used by the Cisco Web Communicator. To set a device, pass the clientRingerID from a device with the canRing flag set to true.
- Parameters:
- {String} clientRingerID:
- clientRingerID retrieved from getMultimediaDevices()
- Since:
- 4.0.0
<inner>
setRingerVolume()
Sets ringer volume. Works on Windows platform only.
- Parameters:
- {String|Number} args.volume
- Volume to set (0 to 100)
- {Function} args.success
- Success callback
- {Function} args.error
- Error callback
- Since:
- 4.0.0
<inner>
setRingtone(ringtone)
Sets ringtone. Will trigger ringtoneChange.cwic event. Works on Windows platform only.
- Parameters:
- {String} ringtone
- ringtone name
- Since:
- 4.0.0
<inner>
setSpeakerVolume()
Sets speaker volume. Works on Windows platform only.
- Parameters:
- {String|Number} args.volume
- Volume to set (0 to 100)
- {Function} args.success
- Success callback
- {Function} args.error
- Error callback
- Since:
- 4.0.0
<inner>
showCallInExternalWindow(id)
Shows the call in an external video window. If an external video window already exists,
the current contents will be replaced by the video stream for the selected call. Otherwise, a new external window will be created.
To detect changes in the window state, for example the user closes the window, use $.fn.cwic#event:externalWindowEvent.
By default the external video window will have always on top property and will include a picture-in-picture preview (self-view). This can be changed using $.fn.cwic-setExternalWindowAlwaysOnTop and $.fn.cwic-setExternalWindowShowSelfViewPip, respectively.
If the user closes an external video window that contains a video call, the call will be ended. Use $.fn.cwic-hideExternalWindow to remove the window without interupting the call.
By default the external video window will have always on top property and will include a picture-in-picture preview (self-view). This can be changed using $.fn.cwic-setExternalWindowAlwaysOnTop and $.fn.cwic-setExternalWindowShowSelfViewPip, respectively.
If the user closes an external video window that contains a video call, the call will be ended. Use $.fn.cwic-hideExternalWindow to remove the window without interupting the call.
- Parameters:
- {String|Object} id Optional
- A {String} conversation identifier or an {Object} containing an id property.
- Since:
- 3.1.0
<inner>
showPreviewInExternalWindow()
Shows preview (self-view) in an external video window. If an external video window already exists,
the current contents will be replaced by the preview. Otherwise, a new external window will be created.
To detect changes in the window state, for example the user closes the window, use $.fn.cwic#event:externalWindowEvent.
By default the external video window will have always on top property. This can be changed using $.fn.cwic-setExternalWindowAlwaysOnTop.
If preview in picture-in-picture is enabled (see $.fn.cwic-setExternalWindowShowSelfViewPip) it will not be visible while the preview is in the full window.
Use $.fn.cwic-hideExternalWindow to remove the window.
By default the external video window will have always on top property. This can be changed using $.fn.cwic-setExternalWindowAlwaysOnTop.
If preview in picture-in-picture is enabled (see $.fn.cwic-setExternalWindowShowSelfViewPip) it will not be visible while the preview is in the full window.
Use $.fn.cwic-hideExternalWindow to remove the window.
- Since:
- 3.1.0
<inner>
showUserAuthorization(denied, force)
Shows the user authorization dialog. This API must only be called if the application has provided a delayedUserAuth callback
in the settings object provided to the init function, and the status returned by $.fn.cwic-getUserAuthStatus is "MustShowAuth" If the application
receives the $.fn.cwic-settings.delayedUserAuth callback, the user authorization state will always be "MustShowAuth" so the application can safely call
showUserAuthorization from within the delayedUserAuth callback without checking getUserAuthStatus.
- Parameters:
- {Function} denied
- A callback that will be called if the user selects "deny" from the user authorization dialog. If the user selects allow or always allow, the settings.ready callback will be called.
- {Boolean} force Optional, Default: false
- Since 3.1.0
Set true to force the dialog to display even if the page is currently hidden. Setting this may cause the dialog to appear when the page is not yet accessible to the user.
- Since:
- 3.0.1
<inner>
shutdown()
Shuts down the API
- Unregisters the phone
- Unbinds all cwic events handlers
- Clears all cwic data
- Releases the Cisco Web Communicator add-on instance
<inner>
signOut(args)
Signs out a registered device from CUCM:
- Ends any active call.
- In softphone mode, SIP unregisters, in deskphone mode, closes the CTI connection.
- Calls the optional complete callback
Note: This API is a preferred alternative to unregisterPhone API.
signOut examples:
- Parameters:
- args Optional
- Is a set of key/value pairs to configure the phone signOut.
- {function} args.complete Optional
- Callback called when sign out is successfully completed.
<inner>
startConversation(conversation)
Start a conversation with a participant.
If conversation contain both an ID and a state property, cwic assumes you want to answer that incoming conversation, in this case starting the passed conversation means accepting(answering) it.
If conversation contain both an ID and a state property, cwic assumes you want to answer that incoming conversation, in this case starting the passed conversation means accepting(answering) it.
- Parameters:
- {Object|call} conversation
- Can be a new object to start a new conversation or an existing call which you wish to answer.
- {Number} conversation.id
- Unique identifier of the conversation. Required when referencing an exising call.
- {participant} conversation.participant
- First remote participant of the call.
- {String} conversation.participant.recipient
- The phone number of the participant. Required when placing a new outbound call. This will be the dialed number for the call.
- {String} conversation.participant.name Optional
- The participant name.
- {String} conversation.participant.photosrc Optional
- A suitable value for the src attribute of an <img> element.
- {String} conversation.state Optional
- Current state of the conversation. Can be OffHook, Ringing, Connected, OnHook, Reorder.
- {Date} conversation.start Optional
- Start time. Defined on resolution update only.
- {Date} conversation.connect Optional
- Media connection time. Defined on resolution update only.
- {Object} conversation.videoResolution Optional
- Resolution of the video conversation, contains width and height properties. Defined on resolution update only.
- {String|Object} conversation.container Optional
- The HTML element which contains the conversation. Conversation events are triggered on this element. If String, specifies a jQuery selector If Object, specifies a jQuery wrapper of matched elements(s). By default container is $(this), that is the first element of the matched set startConversation is called on.
- {String} conversation.subject Optional
- The subject of the conversation to start.
- {Function} conversation.error(err) Optional
- A function to be called if the conversation cannot be started. $.fn.cwic-errorMapEntry is passed as parameter.
- {String} conversation.videoDirection Optional
- The video media direction: 'Inactive' or undefined (audio only by default), 'SendOnly', 'RecvOnly' or 'SendRecv'.
- {Object} conversation.remoteVideoWindow Optional
- The video object (must be of mime type application/x-cisco-cwc-videocall).
- {DOMWindow} conversation.window Optional
- DOM window that contains the remoteVideoWindow (default to this DOM window) required if specifying a video object on another window (popup/iframe).
<inner>
startDiscovery(args)
Initiates service discovery based sign-in. Before using this API, following callbacks must be defined in init API:
- emailRequired
- credentialsRequired
- signedIn
- Parameters:
- {Object} args
- A map with:
- {String} args.mode Optional
- Register the phone in this mode. Available modes are "SoftPhone" or "DeskPhone". Default of intelligent guess is applied after a device is selected.
- {Function} args.devicesAvailable(devices, phoneMode, selectDeviceCb) Optional
- Callback called after successful authentication.
If this callback is not specified, cwic applies the default device selection algorithm. An array of device objects is passed so the application can select the device.
To complete the device registration, call the selectDeviceCb(phoneMode, deviceName, lineDN) function that is passed in to devicesAvailable as the third parameter. lineDN argument is optional and it is valid only in deskphone mode. It is ignored in softphone mode. - {Boolean} args.forceRegistration Optional
- Specifies whether to forcibly unregister other softphone instances with CUCM. Default is false. See GracefulRegistration doc for more info.
- {Function} args.success(registration) Optional
- Callback called when registration succeeds. A registration object is passed to the callback
- {Function} args.error(errorMapEntry) Optional
- Callback called if the registration fails.
<inner>
switchPhoneMode(options)
Switch mode on a session that is already authorized. Can also be used for switching to different device in the same mode
- Parameters:
- options
- {Function} options.progress Optional
- A handler called when the mode switch has passed pre-conditions.
If specified, the handler is called when the switchMode operation starts. - {Function} options.success(registration) Optional
- A handler called when mode switch complete with registration as a parameter
- {Function} options.error(err) Optional
- A handler called when the mode switch fails on pre-conditions. $.fn.cwic-errorMapEntry is passed as parameter.
- {string} options.mode Optional
- The new mode 'SoftPhone'/'DeskPhone'. Defaults to SoftPhone. If you want to change a property on a desk phone, such as the line, you must explicitly set this parameter to 'DeskPhone'.
- {string} options.device Optional
- Name of the device (e.g. SEP012345678, ECPUSER) to control. If not specified and switching from SoftPhone to DeskPhone mode, it defaults to picking first available. If not specified and switching from DeskPhone to SoftPhone mode, it defaults to output of predictDevice function (see $.fn.cwic-settings.predictDevice). If 'first available' is desired result in this case, output of custom predictDevice function should be empty string ('').
- {string} options.line Optional
- Phone number of a line valid for the specified device (e.g. '0000'). defaults to picking first available
- {Boolean} options.forceRegistration Optional
- Specifies whether to forcibly unregister other softphone instances with CUCM. Default is false. See GracefulRegistration doc for more info.
<inner>
undock()
Undocks an external video window previously docked by $.fn.cwic-dock
Example use:
Example use:
- Since:
- 3.1.2
<inner>
unregisterPhone(args)
Unregisters a phone from CUCM:
- Ends any active call if this is the last instance or forceLogout is set to true.
- In softphone mode, SIP unregisters, in deskphone mode, closes the CTI connection.
- Calls the optional complete handler (always called).
- Parameters:
- args
- Is a set of key/value pairs to configure the phone unregistration.
- {function} args.complete Optional
- Callback called when unregistration is successfully completed.
If specified, the handler is called only in the case where the phone was already registered. - {boolean} args.forceLogout:
- If true, end the phone session even if registered in other instances. unregisterPhone examples
<inner>
updateConversation(update, id)
Updates an existing conversation.
This function controls the call allowing the following operations
This function controls the call allowing the following operations
- hold call
- resume call
- mute call
- unmute call
- mute audio only
- mute video only
- unmute audio only
- unmute video only
- add video window for remote sender
- remove video window for remote sender
- update video preference on a call video escalate/de-escalate
- conference two calls together
- transfer a call
- establish a conversation between clients A and B.
- call "transferCall" API to transfer a conversation to the number of client C. A conversation between clients A and C is established.
- Now, client A have an option to complete an ongoing call transfer. If the call transfer is completed, conversation between clients B and C is established and client A is put out from both conversations. To cancel call transfer, endConversation should be called.
- Parameters:
- {String|Object} update
- Update a started conversation. update can be:
A String: hold, resume, mute, unmute, muteAudio, muteVideo, unmuteAudio, unmuteVideo.
An Object: contains one or more writable conversation properties to update e.g. videoDirection.
Triggers a conversationUpdate event. - {String|Object} id
- A conversation identifier (String) or Object containing an id property
Event Detail
callTransferInProgress(event)
A call transfer is in progress. It signals that an ongoing call transfer can be completed or canceled.
The application should implement this event to attach "completeTransfer" handler, if the higher level API does not fit specific needs.
Important note: This event could be triggered multiple times for one call transfer. (be careful not to create memory leaks with event handlers)
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {Function} event.completeTransfer
- Function to be called to complete ongoing call transfer
- Since:
- 4.0.0
conversationEnd(event, conversation)
A conversation has ended. The conversation was terminated by the local user, all participants left the conversation, or an error occurred (media failure for example).
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {call} conversation
conversationIncoming(event, conversation, container)
A new conversation is being received, but has not yet started. The newly created conversation container is passed as an extra event data.
The application is responsible for attaching the container to the DOM and for managing the container lifetime.
In the case the new conversation is accepted by calling startConversation, a conversationStart event is triggered afterwards.
Defined in: supplementaldocs.js.
The application is responsible for attaching the container to the DOM and for managing the container lifetime.
In the case the new conversation is accepted by calling startConversation, a conversationStart event is triggered afterwards.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {call} conversation
- {jQueryNodeArray} container
conversationStart(event, conversation, container)
A conversation has just started. Note the conversation may not be connected yet, for example it is in the Alerting state.
The conversation container is passed as an extra event data.
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {call} conversation
- {DomNode} container
conversationUpdate(event, conversation, container)
One or more properties of a conversation have changed, such as state or participants.
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {call} conversation
- {jQueryNodeArray} container
error(event)
Defined in: supplementaldocs.js.
- Parameters:
- {Object|$.fn.cwic-errorMapEntry} event
- An arbitrary error event or pre-defined cwic error object.
- {Object} event.code
- {String} event.message Optional
- {String[]} event.details Optional
- An array of additional information.
externalWindowEvent(event)
A property has changed on the external video window created by $.fn.cwic-showPreviewInExternalWindow or $.fn.cwic-showCallInExternalWindow.
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {Object} event.externalWindowState
- {Number} event.externalWindowState.callId
- The call#callId of a call associated with the external video window. -1 if no call is associated. See also $.fn.cwic-showCallInExternalWindow.
- {Boolean} event.externalWindowState.showing
- When true, the external video window is displayed, possibly minimized or behind other windows. See also $.fn.cwic-hideExternalWindow.
- {Boolean} event.externalWindowState.selfViewPip
- When true, the external video window will display a picture-in-picture preview (self-view). Note the picture-in-picture preview will not be visible if preview is also in the full window. See also $.fn.cwic-setExternalWindowShowSelfViewPip.
- {Boolean} event.externalWindowState.alwaysOnTop
- When true, the external video window will be set to always display on top of other windows. See also $.fn.cwic-setExternalWindowAlwaysOnTop.
- {Boolean} event.externalWindowState.preview
- When true, the external video window is showing preview (self-view) in the full window. See also $.fn.cwic-showPreviewInExternalWindow.
- {Boolean} event.externalWindowState.docking
- When true, the external video window will be in docked state. See also $.fn.cwic-dock.
- {String} event.externalWindowState.title
- The text used for the external video window's title bar. See also $.fn.cwic-setExternalWindowTitle
- Since:
- 3.1.0
invalidCertificate(event)
An invalid certificate detected.
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {Function} event.respond(fingerprint,accept)
- Function to be called to reject or accept advertised invalid certificate.
- {Object} event.info
- Additional info about advertised invalid certificate
- {String} event.info.certFingerprint
- Certificate fingerprint
- {String} event.info.certSubjectCN
- Certificate Subject Common Name
- {String} event.info.referenceId
- {Array} event.info.invalidReasons
- Array of invalid reasons
- {String} event.info.subjectCertificateData
- {String} event.info.intermediateCACertificateData
- {Boolean} event.info.allowUserToAccept
- If true, certificate can be accepted with repond function
- Since:
- 4.0.0
mmDeviceChange(event)
A change to the list of local multimedia devices has occurred.
The application should use $.fn.cwic-getMultimediaDevices to acquire the updated list of devices.
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- Since:
- 3.0.0
multimediaCapabilities(event)
Signals weather the multimedia capability is enabled or not. Multimedia services are enabled only in authenticated state.
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {Boolean} event.multimediaCapability
- Since:
- 4.0.0
ringtoneChange(event)
Ringtone changed
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {String} event.ringtone
- New ringtone name
- Since:
- 4.0.0
ringtonesListAvailable(event)
List of ringtones is available
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {Array} event.ringtones
- List of available ringtones
- Since:
- 4.0.0
ssoNavigateTo(event)
Signals when authentication with Identity Provider is required during the SSO process.
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {String} event.url
- URL to navigate to from popup/iFrame to continue with SSO process.
- Since:
- 4.0.0
system(event)
Called when the phone changes state.
Defined in: supplementaldocs.js.
Defined in: supplementaldocs.js.
- Parameters:
- {Object} event
- {Object} event.phone
- {String} event.phone.status
- One of
- "eConnectionTerminated"
- "eIdle"
- "eRegistering"
- "eReady"
- {Boolean} event.phone.ready
- true if phone is ready (status "eReady"), false if it is logged out or in the process of registering or recovering
- {registration} event.phone.registration
- An updated copy of the registration object passed to $.fn.cwic-registerPhone
