﻿# phone.checkGroupCall

Check which of the specified source IDs the server still recognizes as joined to a group call. This method can be used with all group call types, see [here »](/api/group-calls.md#maintaining-group-call-connections) for more info.

After joining the main connection with [phone.joinGroupCall](/method/phone.joinGroupCall.md), pass its non-zero SSRC/source ID to this method periodically. If a presentation connection is also active, include the separate source registered using [phone.joinGroupCallPresentation](/method/phone.joinGroupCallPresentation.md).

The method returns the subset of the supplied sources that are still joined. A missing source means that the corresponding connection must be recreated and joined again; it does not indicate whether media packets are currently flowing. If the method returns `GROUPCALL_JOIN_MISSING`, the main connection must be rejoined.

```tl
---functions---
phone.checkGroupCall#b59cf977 call:InputGroupCall sources:Vector<int> = Vector<int>;
```

### Parameters

| Name | Type | Description |
| --- | :---: | --- |
| **call** | [InputGroupCall](/type/InputGroupCall.md) | Group call whose WebRTC connections should be checked |
| **sources** | [Vector](/type/Vector%20t)&lt;[int](/type/int.md)&gt; | Non-zero SSRC/source IDs of the caller's main and presentation connections |

### Result
[Vector](/type/Vector%20t)&lt;[int](/type/int.md)&gt;

### Only users can use this method

### Possible errors

| Code | Type | Description |
| --- | --- | --- |
| 400 | GROUPCALL\_INVALID | The specified group call is invalid. |
| 400 | GROUPCALL\_JOIN\_MISSING | You haven't joined this group call. |

### Related pages

#### [Group calls](/api/group-calls.md)
How to start, join and manage group calls and video chats.

#### [phone.joinGroupCall](/method/phone.joinGroupCall.md)
Join any [group call type »](/api/group-calls.md#group-call-types). Conference calls additionally require the [E2E joining flow »](/api/end-to-end/group-calls.md#joining-a-call).

The `params` field must contain a join payload generated by the local tgcalls group-call engine. It contains a random non-zero audio `ssrc`, ICE `ufrag` and `pwd`, DTLS `fingerprints`, and, when publishing video, `ssrc-groups`.

For example, a join payload without published video has the following shape:

```json
{
  "ssrc": 123456789,
  "ufrag": "...",
  "pwd": "...",
  "fingerprints": [{
    "hash": "sha-256",
    "fingerprint": "...",
    "setup": "passive"
  }]
}
```

When joining an RTMP-mode call, generate the payload without published video source groups.

#### [phone.joinGroupCallPresentation](/method/phone.joinGroupCallPresentation.md)
Start screen sharing in a non-RTMP video chat/livestream or conference. Presentations are not supported in live stories or RTMP-mode video chats/livestreams, see [here »](/api/group-calls.md#presentations) for more in