|
|
# Handling Calls With UI using **Reve** Voice SDK
|
|
|
|
|
|
After calling the `SIPWrapper.startSIP()` method VOIP Calling is available to you through `CallHandler.makeCall()` and other similar methods. But Even if you have access to the call functionalites, you need to Make your UI work according to the background tasks. The Listeners Interfaces **SDKSIPListener** and **SDKServiceListener** are used for that reason. See [Listeners Guide](Configuring-Listeners) to correctly Implement Listeners.
|
|
|
After calling the `SIPWrapper.startSIP()` method VOIP Calling is available to you through the method
|
|
|
```kotlin
|
|
|
CallHandler.makeCall()
|
|
|
```
|
|
|
But Even if you have access to the call functionalites, you need to Make your UI work according to the background tasks. The Listeners Interfaces **SDKSIPListener** and **SDKServiceListener** are used for that reason. See [Listeners Guide](Configuring-Listeners) to correctly Implement Listeners.
|
|
|
|
|
|
After Listeners are correctly implemented you can use your UI to start your calls with ```CallHandler.makeCall(phoneNumber:String)``` function can be called and the you can get the relevant call related info through the Listeners.
|
|
|
After Listeners are correctly implemented you can use your UI to start your calls with the method
|
|
|
```kotlin
|
|
|
CallHandler.makeCall(phoneNumber:String)
|
|
|
```
|
|
|
This method can be called and the you can get the relevant call related info through the Listeners.
|
|
|
|
|
|
After you have started a call with makeCall method, you can end this call by invoking the `callHandler.endCall()` method.
|
|
|
After you have started a call with makeCall method, you can end this call by invoking the the following method
|
|
|
```kotlin
|
|
|
CallHandler.endCall()
|
|
|
```
|
|
|
|
|
|
Finally you can accept incoming calls by invoking the method
|
|
|
```kotlin
|
|
|
callHandler.acceptCall(callID)
|
|
|
```
|
|
|
You can find the callID through the **SDKServiceListener** *(See [Listeners Guide](Configuring-Listeners))*
|
|
|
|
|
|
#### In call Functionalities
|
|
|
While a call is going on three features of calls can also be found in this SDK.
|
|
|
You can
|
|
|
1. Mute your Microphone,
|
|
|
2. Hold your Call &
|
|
|
3. Turn on the Speaker.
|
|
|
You can use the following methods to achieve the aforementioned call features.
|
|
|
|
|
|
|
|
|
To mute call
|
|
|
```kotlin
|
|
|
CallHandler.setCallMute(true)
|
|
|
```
|
|
|
To unmute call
|
|
|
|
|
|
```kotlin
|
|
|
CallHandler.setCallMute(false)
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
To hold call
|
|
|
```kotlin
|
|
|
CallHandler.holdCall(true)
|
|
|
```
|
|
|
To unhold call
|
|
|
|
|
|
```kotlin
|
|
|
CallHandler.holdCall(false)
|
|
|
```
|
|
|
|
|
|
To turn on speaker
|
|
|
```kotlin
|
|
|
CallHandler.setSpeakerOn(true)
|
|
|
```
|
|
|
To turn off speaker
|
|
|
|
|
|
```kotlin
|
|
|
CallHandler.setSpeakerOn(false)
|
|
|
```
|
|
|
|
|
|
<!-- #### Incoming calls
|
|
|
You can get the incoming call id from `ListenersProvider.sdkServiceListener` Then you can invoke callHandler.acceptCall(callId) to accept the current incoming call. -->
|
|
|
|
|
|
Finally you can accept incoming calls by invoking `callHandler.acceptCall(callID)` method. You can find the callID through the **SDKServiceListener** *(See [Listeners Guide](Configuring-Listeners))*
|
|
|
|
|
|
#### Incoming calls
|
|
|
You can get the incoming call id from `ListenersProvider.sdkServiceListener` Then you can invoke callHandler.acceptCall(callId) to accept the current incoming call. |