Headers¶
- class sipmessage.Address(uri: ~sipmessage.uri.URI, name: str = '', parameters: ~sipmessage.parameters.Parameters = <factory>)¶
An address as used in Contact, From, Reply-To and To headers.
- parameters: Parameters¶
The parameters of the address.
- classmethod parse(value: str) Address¶
Parse the given string into an
Addressinstance.If parsing fails, a
ValueErroris raised.
- class sipmessage.AuthChallenge(scheme: str, parameters: ~sipmessage.auth.AuthParameters = <factory>)¶
A WWW-Authenticate or Proxy-Authenticate header, used to convey an authentication challenge.
- parameters: AuthParameters¶
The authentication parameters.
- classmethod parse(value: str) AuthChallenge¶
Parse the given string into an
AuthChallengeinstance.If parsing fails, a
ValueErroris raised.
- class sipmessage.AuthCredentials(scheme: str, parameters: AuthParameters | None = None, token: str | None = None)¶
An Authorization, Proxy-Authorization header, used to convey authentication credentials.
- parameters: AuthParameters | None = None¶
The authentication parameters.
- classmethod parse(value: str) AuthCredentials¶
Parse the given string into an
AuthCredentialsinstance.If parsing fails, a
ValueErroris raised.
- class sipmessage.AuthParameters(**kwargs: str)¶
A mapping of
AuthChallengeorAuthCredentialsparameters.- classmethod parse(value: str) AuthParameters¶
Parse the given string into a
AuthParametersinstance.If parsing fails, a
ValueErroris raised.
- replace(**changes: str) AuthParameters¶
Return a copy of the parameters, updated with the given changes.
- class sipmessage.CSeq(sequence: int, method: str)¶
A CSeq header, used to identity and order transactions.
- classmethod parse(value: str) CSeq¶
Parse the given string into an
CSeqinstance.If parsing fails, a
ValueErroris raised.
- class sipmessage.MediaType(mime_type: str, parameters: ~sipmessage.parameters.Parameters = <factory>)¶
A media type as used in Accept and Content-Type headers.
- parameters: Parameters¶
The parameters of the media type.
- classmethod parse(value: str) MediaType¶
Parse the given string into a
MediaTypeinstance.If parsing fails, a
ValueErroris raised.
- class sipmessage.Parameters(**kwargs: str | None)¶
A mapping of
Address,MediaType,URIorViaparameters.- classmethod parse(value: str) Parameters¶
Parse the given string into a
Parametersinstance.If parsing fails, a
ValueErroris raised.
- replace(**changes: str | None) Parameters¶
Return a copy of the parameters, updated with the given changes.
- class sipmessage.URI(scheme: str, host: str, user: str | None = None, password: str | None = None, port: int | None = None, parameters: ~sipmessage.parameters.Parameters = <factory>)¶
A SIP, SIPS or TEL URI as described by RFC3261 and RFC3966.
- property global_phone_number: str | None¶
The global phone number (E.164) of this URI, if described by the URI.
This is one of the possibilities for the userinfo part described in RFC3261, with telephone-subscriber in RFC2806:
> userinfo = user | telephone-subscriber > telephone-subscriber = global-phone-number | local-phone-number
The phone number is returned without any visual separators.
- parameters: Parameters¶
Parameters affecting a request constructed from the URI.
- classmethod parse(value: str) URI¶
Parse the given string into a
URIinstance.If parsing fails, a
ValueErroris raised.
- class sipmessage.Via(transport: str, host: str, port: int | None = None, parameters: ~sipmessage.parameters.Parameters = <factory>)¶
A Via header, indicating a reponse location for a transaction.
- parameters: Parameters¶
The parameters of the address.
- classmethod parse(value: str) Via¶
Parse the given string into a
Viainstance.If parsing fails, a
ValueErroris raised.