Messages¶
- class sipmessage.Message¶
- class sipmessage.Request(method: str, uri: URI, body: bytes = b'')¶
A SIP request.
- property accept: list[MediaType] | None¶
The Accept header values.
A None value indicates the header is absent, while an empty list indicates that no formats are acceptable.
- property authorization: AuthCredentials | None¶
The Authorization header value.
- property proxy_authenticate: AuthChallenge | None¶
The Proxy-Authenticate header value.
- property proxy_authorization: AuthCredentials | None¶
The Proxy-Authorization header value.
- property www_authenticate: AuthChallenge | None¶
The WWW-Authenticate header value.
- class sipmessage.Response(code: int, phrase: str, body: bytes = b'')¶
A SIP response.
- property accept: list[MediaType] | None¶
The Accept header values.
A None value indicates the header is absent, while an empty list indicates that no formats are acceptable.
- property authorization: AuthCredentials | None¶
The Authorization header value.
- headers: Headers¶
The response headers in raw form. It is usually better to use the typed accessors.
- property proxy_authenticate: AuthChallenge | None¶
The Proxy-Authenticate header value.
- property proxy_authorization: AuthCredentials | None¶
The Proxy-Authorization header value.
- property www_authenticate: AuthChallenge | None¶
The WWW-Authenticate header value.
- class sipmessage.Headers¶
A dictionary-like storage of SIP headers with support for multiple values.
- get(key: str, default: str | None = None) str | None¶
Return the first value for the given header or default.