Metadata-Version: 2.4
Name: janus-sip-plugin
Version: 3.0.0
Summary: Typed async client for the Janus SIP plugin
Author-email: Leydotpy <leydotpy.dev@gmail.com>
License-Expression: MIT
Project-URL: Documentation, https://janus.conf.meetecho.com/docs/sip.html
Project-URL: JanusGateway, https://janus.conf.meetecho.com/
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: AsyncIO
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: janus-api-core<4,>=3
Requires-Dist: pydantic<3,>=2.12
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: build>=1.2; extra == "test"

# janus-sip-plugin

An independently installable, fully typed async client for
`janus.plugin.sip`. It depends on `janus-api-core` and does not install any
other named Janus plugin.

```python
from janus_api.models.base import Jsep
from janus_sip_plugin import SipPlugin

sip = SipPlugin(session=session)
await sip.attach()
await sip.register_account(
    "sip:alice@example.com",
    secret="password",
    proxy="sip:registrar.example.com",
)
await sip.call(
    "sip:bob@example.com",
    Jsep(type="offer", sdp=offer_sdp),
)
```

Registration validates SIP/SIPS URIs, authentication choice, guest/helper
semantics, transport conflicts, and registration lifetime. A normal account
requires exactly one of `secret` and `ha1_secret`; `authuser` overrides the URI
username for digest authentication. Guest calls can provide credentials on the
`call` request. Helpers use the master account's returned `master_id`.

The client covers every documented SIP operation: registration, calls,
offerless-invite progress/accept flows, renegotiation, decline/hangup,
hold/unhold, MESSAGE, INFO/DTMF, subscriptions, blind/attended transfers,
recording, keyframes, and RTP forwarders. JSEP remains in the outer Janus
envelope and is never mixed into plugin data; `update()` automatically marks
its JSEP as a Janus renegotiation. RTP-forwarder helpers expose the optional
`unique_id` and configured `admin_key` controls from the current gateway.

Models follow the official [SIP API](https://janus.conf.meetecho.com/docs/sip.html)
and the current Janus implementation. Outbound objects reject unknown fields;
inbound events retain future fields and unknown event variants.
