-
Notifications
You must be signed in to change notification settings - Fork 31
Noise Removal for Incoming PSTN Calls
Developers can enable far-end Noise removal for Incoming PSTN or phone calls. Generally, PSTN callers won't have a Noise removal feature on their device, and by enabling this feature, noise can be removed and the SDK user will hear better and clear incoming sound.
This feature is available from v3.9.0 onwards.
This feature is available for WxC(WebexCalling) and CUCM calls only
The below APIs are made available to developers to use the Noise Removal feature for incoming calls.
This API can be used to enable or disable the Noise removal feature. The callback indicates if the API call is successful or not. Actual result of the API is notified in onReceivingNoiseInfoChanged
.
call.enableReceivingNoiseRemoval(enable, callback)
This callback is notified as part of the CallObserver set using Call.setObserver()
API.
The ReceivingNoiseInfo
object has two boolean values namely
-
isNoiseDetected
: Indicates if any noise is detected in the incoming call. This can be used to indicate noise in audio at the remote end.enableReceivingNoiseRemoval
API needs to be called to remove detected noise. -
isNoiseRemovalEnabled
: Indicates if the noise removal feature is enabled. If true, then the noise from the incoming call will be removed.
The onReceivingNoiseInfoChanged callback will be fired in the following cases:
-
Initially, when the call is connected, with both
isNoiseDetected
andisNoiseRemovalEnabled
as false. This indicates the availability of incoming noise removal feature for the current call object. -
Subsequently, whenever values of
isNoiseDetected
orisNoiseRemovalEnabled
changes. For eg: Callback gets fired when the noise removal feature is enabled or disabled usingenableReceivingNoiseRemoval
or when background noise is detected.
val mediaOption = MediaOption.audioOnly()
webex.phone.dial("+1800123456", mediaOption, CompletionHandler { result ->
if (result.isSuccessful) {
// Dial api is successful
val call = result.data
call?.setObserver(object : CallObserver {
override fun onReceivingNoiseInfoChanged(info: ReceivingNoiseInfo) {
// Use the info object to take further actions
}
})
} else {
// Dial failed
}
})
This API can be used to get the ReceivingNoiseInfo
object
val infoObject = call.getReceivingNoiseInfo()