new WebClient()
#WEBCLIENT
WebClient class
Methods
-
checkWebphoneState(serverAddress, webphoneId, callback)
-
Returns the state of the specified webphone.
Parameters:
Name Type Description serverAddressstring The IP Address of the computer running Ozeki Phone System XE. webphoneIdstring The ID of the webphone. callbackcheckWebPhoneStateCallback The callback which handles the response initated from checkWebphoneState. -
connect(serverAddress, token, properties)
-
Connects the WebClient to Ozeki Phone System XE.
Parameters:
Name Type Argument Default Description serverAddressstring The IP Address of the computer running Ozeki Phone System XE. tokenstring The securityToken generated for this WebClient. propertiesObject <optional>
{} Additional connection properties. -
createCall(dialedNumber, callType) → {Call}
-
Returns a new Call object with the specified target phone number.
Parameters:
Name Type Argument Default Description dialedNumberstring The target phone number. callTypeCallType <optional>
CallType.AUDIO The type of the call. Returns:
A new Call object- Type
- Call
-
disconnect()
-
Disconnects the WebClient from Ozeki Phone System XE
-
getCallHistory(filters)
-
Initiates a call history query request to Ozeki Phone System XE. Can only be used if the connected client has the required privilege. The WebClient will fire the event onCallHistoryInfoReceived once the query result is received.
Parameters:
Name Type Description filtersObject The filter properties. Possible filter properties: pageNumber {number} (paginate option: retrieve the entries on the specified page) pageRows {number} (paginate option: retrieve the specified number of entries in one page) general {string} (general search query string) callerId {string} source {string} dialedNumber {string} destination {string} sessionState {SessionState} -
onCallHistoryInfoReceived(callback)
-
This event occurs when the result of the query initiated from the getCallHistory function has been received.
Parameters:
Name Type Description callbackonCallHistoryReceivedCallback The callback which receives the call history records. -
onClientStateChanged(callback)
-
This event occurs when the state of the client changes.
Parameters:
Name Type Description callbackonClientStateChangedCallback The callback which handles the clientStateChanged event. -
onConnectionStateChanged(callback)
-
This event occurs when the state of the connection changes.
Parameters:
Name Type Description callbackonConnectionStateChangedCallback The callback which handles the connectionStateChanged event. -
onErrorOccured(callback)
-
This event occurs if an error message has been received from Ozeki Phone System XE.
Parameters:
Name Type Description callbackonErrorOccuredCallback The callback which handles the error message. -
onExtensionInfoReceived(callback)
-
This event occurs when the WebClient receives information about an extension.
Parameters:
Name Type Description callbackonExtensionInfoReceivedCallback The callback which receives the created Extension class instance. - Source:
-
onExtensionRemoved(callback)
-
This event occurs when the WebClient receives information about an extension which has been removed.
Parameters:
Name Type Description callbackonExtensionRemovedCallback The callback which receives the ID of the removed extension. - Source:
-
onIncomingCall(callback)
-
This event occurs when the WebClient receives an incoming call.
Parameters:
Name Type Description callbackonIncomingCallCallback The callback which receives the created Call object. -
onSessionClosed(callback)
-
This event occurs when an active session has been closed.
Parameters:
Name Type Description callbackonSessionClosedCallback The callback which handles the session closed event. -
onSessionCreated(callback)
-
This event occurs if a new Session has been created e.g. a new session has started in Ozeki Phone System XE.
Parameters:
Name Type Description callbackonSessionCreatedCallback The callback which receives the created session. -
onUserInfoReceived(callback)
-
This event occurs when the WebClient receives information about a user.
Parameters:
Name Type Description callbackonUserInfoReceivedCallback The callback which receives the created User class instance. - Source:
-
onUserRemoved(callback)
-
This event occurs when the WebClient receives information about a user being removed from Ozeki Phone Sytem XE.
Parameters:
Name Type Description callbackonUserRemovedCallback The callback which handles the user removal. - Source:
-
onWebphoneStateReceived(callback)
-
This event occurs when the state of the webphone is received.
Parameters:
Name Type Description callbackonWebphoneStateReceivedCallback The callback which handles the webphoneStateReceived event. - Source:
-
setupCall(caller, callee)
-
Creates a call between two extensions configured in Ozeki Phone System XE.
Parameters:
Name Type Description callerstring The phone number of the caller. calleestring the phone number of the callee. - Source:
Throws:
Will throw an exception if the caller of callee parameters are not defined.