-
Notifications
You must be signed in to change notification settings - Fork 28
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.
1. public func enableReceivingNoiseRemoval(shouldEnable: Bool, completionHandler: @escaping (ReceivingNoiseRemovalEnableResult) -> Void)
This API can be used to enable or disable the Noise removal feature. Callback indicates if the API call is successful or not. Actual result of the API is notified in onReceivingNoiseInfoChanged
.
call.enableReceivingNoiseRemoval(shouldEnable: !receivingNoiseInfo.isNoiseRemovalEnabled) { result in
switch result {
case .NoError:
print("enable/disable ReceivingNoiseRemoval success")
case .NotSupported:
print("NotSupported")
case .InternalError:
print("InternalError")
}
}
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 presence of noise in audio at 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 availability of incoming noise removal feature for the current call object. -
Subsequently, whenever values of
isNoiseDetected
orisNoiseRemovalEnabled
changes. For eg: Callback gets fired when noise removal feature is enabled or disabled usingenableReceivingNoiseRemoval
or when background noise is detected.
call.onReceivingNoiseInfoChanged = { info in
}
This API can be used to get the ReceivingNoiseInfo
object
val infoObject = call.receivingNoiseInfo