In order to allow softphone to interact with voice provider, it expects client library adapter to follow certain contract and implement following methods.
Initializes voice provider client/device to receive or initiate a voice call. Initialization includes validation of arguments, initializing voice provider client library and notifying result on callback.
initialize(params, callback)params: Javascript object of properties required to initialize device using voice provider library.
callback: Wrapper library is expected to notify status of initialization or any event from voice provider on this callback.
where callback method has following interface.
callback(event, payload)Execute voice provider library to mute agent call. Throws exception if request fails.
muteCall()Execute voice provider library to unmute agent call. Throws exception if request fails.
unmuteCall()Execute voice provider library to send tones. Throws exception if request fails.
sendDTMFDigits(digits)tone: string representing tone pressed on dialpad.
Execute voice provider library to terminate softphone. Throws exception if request fails.
terminate()