> 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. Создайте новую учетную запись [**сотрудника**](/mikopbx/manual/telephony/extensions.md).
2. Перейдите в **Система → Общие настройки → SIP** и включите переключатель «**Использовать WebRTC**».

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

<figure><img src="/files/lusMSekAJENORuG1zxOD" alt=""><figcaption><p>Переключатель "Использовать WebRTC"</p></figcaption></figure>

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

<figure><img src="/files/FGcKXpKpk8DM5tgqhHBm" alt=""><figcaption><p>STUN сервер</p></figcaption></figure>

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

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

> **Примечание:** Для подключения через интернет необходим доверенный SSL сертификат, чтобы браузер разрешил доступ к микрофону. Рекомендуем использовать [Модуль Let's Encrypt](/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="/files/5TkMmmmuJikt4K5JUEDI" 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="/files/G5m7lRfh2I9HOyYDJEim" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
