Skip to content

Commit 887f08f

Browse files
authored
Update manage-calls-web.md
Adding section about hold/resume API
1 parent 134a194 commit 887f08f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

articles/communication-services/how-tos/calling-sdk/includes/manage-calls/manage-calls-web.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,27 @@ The `incomingCall` event includes an `incomingCall` instance that you can accept
113113

114114
When starting/joining/accepting a call with video on, if the specified video camera device is being used by another process or if it is disabled in the system, the call will start with video off, and a cameraStartFailed: true call diagnostic will be raised.
115115

116+
## Hold and resume call
117+
118+
> [!NOTE]
119+
> At any given moment of time, there should be only 1 active call ( in `Connected` state, with active media ). All other calls should be put on hold by a user, or programatically by application. This is common in scenarios like contact centers, where a user may need to handle multiple outbound and inbound calls, all inactive calls should be put on hold, and user should interact with others only in active call
120+
121+
To hold or resume the call, you can use the `hold` and `resume` asynchronous APIs:
122+
123+
To hold the call
124+
```js
125+
await call.hold();
126+
```
127+
When `hold` API will resolve, call state will be set to 'LocalHold' , if this is a 1:1 call, other participant will be also put on hold, and state of the call from the perspective of that participant will be set to 'RemoteHold', That participant may further put it's call on hold, which would result in state change to 'LocalHold'
128+
If this is a group call - hold is just a local operation, it won't hold the call for other participants of that call.
129+
To fully resume that call all users who initiated hold must resume it.
130+
131+
To resume call from hold:
132+
```
133+
await call.resume();
134+
```
135+
When `resume` API will resolve, call state will be set again to 'Connected'
136+
116137
## Mute and unmute
117138

118139
To mute or unmute the local endpoint, you can use the `mute` and `unmute` asynchronous APIs:

0 commit comments

Comments
 (0)