|
# Handling Calls With UI using **Reve** Voice SDK
|
|
# Handling Calls With UI using **Reve** Voice SDK
|
|
|
|
|
|
After calling the `SIPWrapper.startSIP()` method VOIP Calling is available to you through the method
|
|
After calling the `SIPWrapper.startSIP()` method VOIP Calling is available to you through the method
|
|
|
|
>Kotlin
|
|
```kotlin
|
|
```kotlin
|
|
CallHandler.makeCall()
|
|
ReveSdkCallHandler.makeCall()
|
|
```
|
|
```
|
|
|
|
>java
|
|
|
|
```java
|
|
|
|
ReveSdkCallHandler.Companion.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.
|
|
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 the method
|
|
After Listeners are correctly implemented you can use your UI to start your calls with the method
|
|
|
|
>Kotlin
|
|
|
|
>Kotlin
|
|
```kotlin
|
|
```kotlin
|
|
CallHandler.makeCall(phoneNumber:String)
|
|
ReveSdkCallHandler.makeCall(phoneNumber:String)
|
|
|
|
```
|
|
|
|
>Java
|
|
|
|
```java
|
|
|
|
ReveSdkCallHandler.Companion.makeCall(phoneNumber:String)
|
|
```
|
|
```
|
|
This method can be called and the you can get the relevant call related info through the Listeners.
|
|
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 the following method
|
|
After you have started a call with makeCall method, you can end this call by invoking the the following method
|
|
|
|
>Kotlin
|
|
```kotlin
|
|
```kotlin
|
|
CallHandler.endCall()
|
|
ReveSdkCallHandler.endCall()
|
|
|
|
```
|
|
|
|
>Java
|
|
|
|
```java
|
|
|
|
ReveSdkCallHandler.Companion.endCall()
|
|
```
|
|
```
|
|
|
|
|
|
Finally you can accept incoming calls by invoking the method
|
|
Finally you can accept incoming calls by invoking the method
|
|
```kotlin
|
|
>Kotlin
|
|
callHandler.acceptCall(callID)
|
|
```kotlin
|
|
|
|
ReveSdkCallHandler.acceptCall(callID)
|
|
|
|
```
|
|
|
|
>Java
|
|
|
|
```java
|
|
|
|
ReveSdkCallHandler.Companion.acceptCall(callID)
|
|
```
|
|
```
|
|
You can find the callID through the **SDKServiceListener** *(See [Listeners Guide](Configuring-Listeners))*
|
|
You can find the callID through the **SDKServiceListener** *(See [Listeners Guide](Configuring-Listeners))*
|
|
|
|
|
... | @@ -33,38 +54,68 @@ You can use the following methods to achieve the aforementioned call features. |
... | @@ -33,38 +54,68 @@ You can use the following methods to achieve the aforementioned call features. |
|
|
|
|
|
|
|
|
|
To mute call
|
|
To mute call
|
|
```kotlin
|
|
>Kotlin
|
|
CallHandler.setCallMute(true)
|
|
```kotlin
|
|
|
|
ReveSdkCallHandler.setCallMute(true)
|
|
```
|
|
```
|
|
|
|
>Java
|
|
|
|
```java
|
|
|
|
ReveSdkCallHandler.Companion.setCallMute(true)
|
|
|
|
```
|
|
To unmute call
|
|
To unmute call
|
|
|
|
|
|
```kotlin
|
|
>Kotlin
|
|
CallHandler.setCallMute(false)
|
|
```kotlin
|
|
|
|
ReveSdkCallHandler.setCallMute(false)
|
|
```
|
|
```
|
|
|
|
>Java
|
|
|
|
```java
|
|
|
|
ReveSdkCallHandler.Companion.setCallMute(false)
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To hold call
|
|
To hold call
|
|
```kotlin
|
|
>Kotlin
|
|
CallHandler.holdCall(true)
|
|
```kotlin
|
|
|
|
ReveSdkCallHandler.holdCall(true)
|
|
```
|
|
```
|
|
|
|
>Java
|
|
|
|
```java
|
|
|
|
ReveSdkCallHandler.Companion.holdCall(true)
|
|
|
|
```
|
|
To unhold call
|
|
To unhold call
|
|
|
|
|
|
```kotlin
|
|
>Kotlin
|
|
CallHandler.holdCall(false)
|
|
```kotlin
|
|
|
|
ReveSdkCallHandler.holdCall(false)
|
|
```
|
|
```
|
|
|
|
>Java
|
|
|
|
```java
|
|
|
|
ReveSdkCallHandler.Companion.holdCall(false)
|
|
|
|
```
|
|
|
|
|
|
To turn on speaker
|
|
To turn on speaker
|
|
```kotlin
|
|
>Kotlin
|
|
CallHandler.setSpeakerOn(true)
|
|
```kotlin
|
|
|
|
ReveSdkCallHandler.setSpeakerOn(true)
|
|
```
|
|
```
|
|
|
|
>Java
|
|
|
|
```java
|
|
|
|
ReveSdkCallHandler.Companion.setSpeakerOn(true)
|
|
|
|
```
|
|
To turn off speaker
|
|
To turn off speaker
|
|
|
|
|
|
```kotlin
|
|
>Kotlin
|
|
CallHandler.setSpeakerOn(false)
|
|
```kotlin
|
|
|
|
ReveSdkCallHandler.setSpeakerOn(false)
|
|
```
|
|
```
|
|
|
|
>Java
|
|
|
|
```java
|
|
|
|
ReveSdkCallHandler.Companion.setSpeakerOn(false)
|
|
|
|
```
|
|
|
|
|
|
<!-- #### Incoming calls
|
|
<!-- #### 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. -->
|
|
You can get the incoming call id from `ListenersProvider.sdkServiceListener` Then you can invoke ReveSdkCallHandler.acceptCall(callId) to accept the current incoming call. -->
|
|
|
|
|
|
|
|
|