> For the complete documentation index, see [llms.txt](https://docs.mikopbx.com/mikopbx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mikopbx.com/mikopbx/faq/softphones/configuring-webrtc-client-sipml5.md).

# Настройка WebRTC клиента SIPML5

## Настройка АТС <a href="#nastrojka_ats" id="nastrojka_ats"></a>

1. Создайте новую учетную запись [**сотрудника**](https://docs.mikopbx.com/mikopbx/manual/telephony/extensions.md).
2. Перейдите в **Система → Общие настройки → SIP** и включите переключатель «**Использовать WebRTC**».

Это автоматически создаёт выделенный WebRTC endpoint для каждого внутреннего номера (например, `204-WS`), что позволяет работать одновременно по протоколам PJSIP и WebRTC. Никаких дополнительных настроек для отдельных номеров не требуется.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2F4r4NFSQnwVfOfqoXDNUF%2FwebrtcBtn.png?alt=media&amp;token=412f9df2-aaa8-4707-80ef-f1acf95e1b27" alt=""><figcaption><p>Переключатель "Использовать WebRTC"</p></figcaption></figure>

3. В разделе [«**Общие настройки**»](https://docs.mikopbx.com/mikopbx/manual/system/general-settings.md) укажите адрес STUN сервера. Например, **stun.sipnet.ru**.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2Fjl5EjRP6AXA7braGijoq%2FstunAddress.png?alt=media&amp;token=525bcbdf-eeac-40cd-92bb-9b00b0560033" alt=""><figcaption><p>STUN сервер</p></figcaption></figure>

4. Проверьте WebSocket соединение, открыв в браузере следующий адрес:
   * **Локальная сеть (без SSL):** `http://АДРЕС_АТС:8088/asterisk/ws`
   * **С SSL сертификатом:** `https://АДРЕС_АТС:8089/asterisk/ws`

Если Asterisk ответил — настройка прошла успешно.

> **Примечание:** Для подключения через интернет необходим доверенный SSL сертификат, чтобы браузер разрешил доступ к микрофону. Рекомендуем использовать [Модуль Let's Encrypt](https://docs.mikopbx.com/mikopbx/modules/miko/module-get-ssl-lets-encrypt.md).

## Настройка WebRTC клиента <a href="#nastrojka_web_rtc_klienta" id="nastrojka_web_rtc_klienta"></a>

1. Откройте демо sipml5 в браузере: перейдите по ссылке "[Enjoy our live demo](https://www.doubango.org/sipml5/call.htm?svn=252)".
2. Заполните основные поля:

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2F96hjDfVSCJeLbgn9hWDr%2Fimage.png?alt=media&amp;token=936f0ef4-02c3-41dc-984d-0e9e7579a084" alt=""><figcaption></figcaption></figure>

| Поле                 | Значение                                                               |
| -------------------- | ---------------------------------------------------------------------- |
| **Display Name**     | Любое имя                                                              |
| **Private Identity** | `ВНУТРЕННИЙ_НОМЕР` (например, `204`)                                   |
| **Public Identity**  | `sip:ВНУТРЕННИЙ_НОМЕР-WS@АДРЕС_АТС` (например, `sip:204-WS@192.0.2.1`) |
| **Password**         | SIP пароль учетной записи                                              |
| **Realm**            | `АДРЕС_АТС`                                                            |

3. Нажмите **«Expert mode?»** и укажите адрес WebSocket сервера:

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2Fljg9ffCyyC8IMhheQ08d%2Fimage.png?alt=media&amp;token=9578908a-82dc-416f-8e2e-718f7d0ffe4d" alt=""><figcaption></figcaption></figure>

| Тип подключения          | WebSocket Server URL                     |
| ------------------------ | ---------------------------------------- |
| Локальная сеть (без SSL) | `ws://192.0.2.1:8088/asterisk/ws`        |
| С SSL сертификатом       | `wss://pbx.example.com:8089/asterisk/ws` |

4. Нажмите **Login**. Теперь можно совершать звонки.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mikopbx.com/mikopbx/faq/softphones/configuring-webrtc-client-sipml5.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
