Session Initiation Protocol (SIP)
voip.sip.Dialog
dataclass
Peer-to-peer SIP relationship between two user agents RFC 3261 §12.
Subclass Dialog to implement call handling. Set the subclass as
dialog_class on the SIP session for inbound calls:
class MyDialog(Dialog):
def call_received(self) -> None:
self.ringing()
self.answer(session_class=MyCall)
class MySession(SessionInitiationProtocol):
dialog_class = MyDialog
For outbound calls:
dialog = Dialog(sip=my_sip_session)
await dialog.dial("sip:bob@biloxi.com", session_class=MyCall)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sip
|
SessionInitiationProtocol | None
|
The parent protocol the session belongs to. |
None
|
Source code in voip/sip/dialog.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
call_received()
Called when an INVITE is received from the remote party.
Override in subclasses to answer, ring, or reject the call.
The base implementation rejects with a busy signal.
Source code in voip/sip/dialog.py
103 104 105 106 107 108 109 110 111 112 113 | |
hangup_received()
Called when the remote party sends a BYE.
Override in subclasses to perform teardown.
Source code in voip/sip/dialog.py
115 116 117 118 119 120 | |
ringing()
Send a ringing signal to the remote party.
This is optional but recommended for good user experience. If not called, the caller will hear silence until the call is accepted or rejected.
Source code in voip/sip/dialog.py
122 123 124 125 126 127 128 129 130 | |
answer(*, session_class, **session_kwargs)
Accept the inbound call and start a multimedia session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session_class
|
type[Session]
|
Session subclass to create for this call. |
required |
**session_kwargs
|
Any
|
Extra keyword arguments forwarded to |
{}
|
Source code in voip/sip/dialog.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
reject(status_code=types.SIPStatus.BUSY_HERE)
Reject the inbound call with the given status code.
Common status codes include
- BUSY_HERE: The remote party will hear a busy signal.
- DECLINE: The remote party will hear a decline signal.
- DOES_NOT_EXIST_ANYWHERE: The remote party will hear a "The person you are trying to reach…" message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status_code
|
SIPStatus
|
SIP response status code (default: 486 Busy Here). |
BUSY_HERE
|
Source code in voip/sip/dialog.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
dial(target, *, session_class, **session_kwargs)
async
Initiate an outbound call to target.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
SipURI
|
SIP or tel URI of the remote party (e.g. |
required |
session_class
|
type[Session]
|
Session subclass to create for this call. |
required |
**session_kwargs
|
Any
|
Extra keyword arguments forwarded to |
{}
|
Source code in voip/sip/dialog.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | |
bye()
async
End the call and terminate the dialog and multimedia session.
Source code in voip/sip/dialog.py
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
voip.sip.SessionInitiationProtocol
dataclass
Bases: Protocol
SIP User Agent Client (UAC) over TLS/TCP [RFC 3261].
Handles SIP message parsing, carrier registration, and transaction management.
Example
You can use the handler like any asyncio.Protocol in Python.
import asyncio
from voip.sip import SessionInitiationProtocol
async def main():
loop = asyncio.get_running_loop()
transport, protocol = await loop.create_connection(
SessionInitiationProtocol,
'0.0.0.0', 5060)
try:
await asyncio.Future()
finally:
transport.close()
asyncio.run(main())
However, this example is incomplete, since the protocol will require some arguments, like a reference to the RTP protocol and an AOR.
Note
The support is limited to UAC (client mode). This library currently does not implement server (UAS) functionality.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
aor
|
SipURI
|
SIP Address of Record (AOR) to register with the carrier. |
required |
rtp
|
RealtimeTransportProtocol
|
Shared RTP mux for call media. |
required |
dialog_class
|
type[Dialog]
|
Dialog
|
|
keepalive_interval
|
timedelta
|
Keep-alive ping interval. Should be between 30 and 90 seconds. |
timedelta(seconds=30)
|
Source code in voip/sip/protocol.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | |
Types
voip.sip.SipURI
Bases: str
A parsed SIP or SIPS URI per RFC 3261 §19.1.
Format: sip:user:password@host:port;uri-parameters?headers
Behaves as a plain str holding the canonical URI, so instances can be
stored in header dicts unchanged. The parse classmethod decodes a raw
SIP URI string into structured fields. IPv6 addresses in the host part
must be enclosed in square brackets per RFC 2732
(e.g. sip:alice@[::1]:5060); the stored host is the bare address
without brackets.
Examples:
>>> SipURI.parse("sip:alice@example.com")
'sip:alice@example.com:5060'
>>> SipURI.parse("sips:+15551234567@carrier.com:5061")
'sips:%2B15551234567@carrier.com:5061'
>>> SipURI.parse("sip:alice@[::1]:5060")
'sip:alice@[::1]:5060'
Source code in voip/sip/types.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | |
parse(value)
classmethod
Parse a SIP or SIPS URI string into a SipUri instance.
Returns:
| Type | Description |
|---|---|
SipURI
|
Parsed |
Raises:
| Type | Description |
|---|---|
ValueError
|
When the URI is malformed (missing scheme, invalid characters, unclosed IPv6 bracket, empty host, or invalid port). |
Source code in voip/sip/types.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
voip.sip.CallerID
Bases: str
SIP From/To header value with structured access and privacy-safe repr.
Behaves as a plain str so it is wire-format compatible and can be
stored in header dicts unchanged. repr() returns a short anonymized
form that shows only the last four characters of the user part and the
carrier domain — useful for log messages.
Examples:
>>> str(CallerID('"08001234567" <sip:08001234567@telefonica.de>;tag=abc'))
'"08001234567" <sip:08001234567@telefonica.de>;tag=abc'
>>> repr(CallerID('"08001234567" <sip:08001234567@telefonica.de>;tag=abc'))
'***4567@telefonica.de'
>>> repr(CallerID('sip:alice@example.com'))
'*lice@example.com'
Source code in voip/sip/types.py
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |
display_name
property
Display name from the From/To header, if present.
host
property
Carrier domain extracted from the SIP URI.
tag
property
Dialog tag parameter value, if present.
uri
property
Parsed SIP or tel URI embedded in the header value, if present.
user
property
SIP user part (phone number or username).
voip.sip.SIPStatus
Bases: IntEnum
SIP Status Codes based on RFC 3261.
Source code in voip/sip/types.py
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 | |
ADDRESS_INCOMPLETE = (484, 'Address Incomplete')
class-attribute
instance-attribute
This status code indicates that the server has received a final response for the transaction which it is still attempting to complete, but has an invalid value for one or more of the header fields included in the request message.
ALTERNATIVE_SERVICE = (380, 'Alternative Service')
class-attribute
instance-attribute
The server has fulfilled a request for the service indicated by the URI.
AMBIGUOUS = (485, 'Ambiguous')
class-attribute
instance-attribute
This status code indicates that the server cannot decide on a response to the request because multiple responses are possible.
BAD_EXTENSION = (420, 'Bad Extension')
class-attribute
instance-attribute
This status code indicates that the server does not recognize the value of any of the parameters that it needs to understand in the request.
BAD_GATEWAY = (502, 'Bad Gateway')
class-attribute
instance-attribute
The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.
BAD_REQUEST = (400, 'Bad Request')
class-attribute
instance-attribute
The request has bad syntax or cannot be fulfilled due to bad syntax.
BUSY_EVERYWHERE = (600, 'Busy Everywhere')
class-attribute
instance-attribute
The server is not able to process the request because it is busy. For example, this error might be given if a server is overloaded with requests and is unable to process one of the requests.
BUSY_HERE = (486, 'Busy Here')
class-attribute
instance-attribute
This status code indicates that the server is busy here.
CALL_IS_BEING_FORWARDED = (181, 'Call Is Being Forwarded')
class-attribute
instance-attribute
The called party is being alerted of the call, but the call is not yet established.
CALL_TRANSACTION_DOES_NOT_EXIST = (481, 'Call/Transaction Does Not Exist')
class-attribute
instance-attribute
This status code indicates that the server has received a final response for the transaction which it is still attempting to complete.
DECLINE = (603, 'Decline')
class-attribute
instance-attribute
The call has been declined.
DOES_NOT_EXIST_ANYWHERE = (604, 'Does Not Exist Anywhere')
class-attribute
instance-attribute
The server has received a final response for the transaction which it is still attempting to complete, but has received a termination request for that transaction from a server which it does not control.
EXTENSION_REQUIRED = (421, 'Extension Required')
class-attribute
instance-attribute
This status code indicates that the server requires the client to identify itself (usually, using the Contact header field) before it will proceed with the request.
FORBIDDEN = (403, 'Forbidden')
class-attribute
instance-attribute
The server understood the request but refuses to fulfill it.
GONE = (410, 'Gone')
class-attribute
instance-attribute
The requested resource is no longer available at the server and no longer exists.
INTERVAL_TOO_BRIEF = (423, 'Interval Too Brief')
class-attribute
instance-attribute
This status code indicates that the server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.
LOOP_DETECTED = (482, 'Loop Detected')
class-attribute
instance-attribute
This status code indicates that the server has detected an infinite loop while processing the request.
MESSAGE_TOO_LARGE = (513, 'Message Too Large')
class-attribute
instance-attribute
The server is unwilling to process the request because its header fields are too large.
METHOD_NOT_ALLOWED = (405, 'Method Not Allowed')
class-attribute
instance-attribute
The method specified in the Request-URI is not allowed for the resource identified by the request URI.
MOVED_PERMANENTLY = (301, 'Moved Permanently')
class-attribute
instance-attribute
The requested resource has been assigned a new permanent URI and any future references to this resource ought to use one of the returned URIs.
MOVED_TEMPORARILY = (302, 'Moved Temporarily')
class-attribute
instance-attribute
The requested resource is temporarily unavailable and the server is asking the client to try again later.
MULTIPLE_CHOICES = (300, 'Multiple Choices')
class-attribute
instance-attribute
The requested resource has multiple representations, each with its own specific location.
NOT_ACCEPTABLE = (406, 'Not Acceptable')
class-attribute
instance-attribute
The server cannot produce a response matching the Accept headers.
NOT_ACCEPTABLE_ANYWHERE = (606, 'Not Acceptable')
class-attribute
instance-attribute
The server is not able to produce a response which is acceptable to the client, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default reason phrase.
NOT_ACCEPTABLE_HERE = (488, 'Not Acceptable Here')
class-attribute
instance-attribute
This status code indicates that the server is not able to produce a response which is acceptable to the client, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default reason phrase.
NOT_FOUND = (404, 'Not Found')
class-attribute
instance-attribute
The requested resource could not be found.
NOT_IMPLEMENTED = (501, 'Not Implemented')
class-attribute
instance-attribute
The server does not support the functionality required to fulfill the request.
OK = (200, 'OK')
class-attribute
instance-attribute
The request has succeeded.
PAYMENT_REQUIRED = (402, 'Payment Required')
class-attribute
instance-attribute
Further action is required.
PROXY_AUTHENTICATION_REQUIRED = (407, 'Proxy Authentication Required')
class-attribute
instance-attribute
The client must authenticate itself with the proxy.
QUEUED = (182, 'Queued')
class-attribute
instance-attribute
The called party is being alerted of the call, but the call is not yet established.
REQUEST_ENTITY_TOO_LARGE = (413, 'Request Entity Too Large')
class-attribute
instance-attribute
The server will not accept the request, because the entity of the request is too large.
REQUEST_PENDING = (491, 'Request Pending')
class-attribute
instance-attribute
This status code indicates that the server has received a final response for the transaction which it is still attempting to complete, but has not yet delivered that response to the client.
REQUEST_TERMINATED = (487, 'Request Terminated')
class-attribute
instance-attribute
This status code indicates that the server has received a final response for the transaction which it is still attempting to complete, but has received a termination request for that transaction from the client.
REQUEST_TIMEOUT = (408, 'Request Timeout')
class-attribute
instance-attribute
The server timed out waiting for the request.
REQUEST_URI_TOO_LONG = (414, 'Request-URI Too Long')
class-attribute
instance-attribute
The server will not accept the request, because the Request-URI is too long.
RINGING = (180, 'Ringing')
class-attribute
instance-attribute
The called party is being alerted of the call.
SERVER_INTERNAL_ERROR = (500, 'Server Internal Error')
class-attribute
instance-attribute
The server encountered an unexpected condition which prevented it from fulfilling the request.
SERVER_TIME_OUT = (504, 'Server Time-out')
class-attribute
instance-attribute
The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI (e.g., HTTP, FTP, LDAP) or some other auxiliary server (e.g., DNS) it needed to access in attempting to complete the request.
SERVICE_UNAVAILABLE = (503, 'Service Unavailable')
class-attribute
instance-attribute
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
SESSION_PROGRESS = (183, 'Session Progress')
class-attribute
instance-attribute
The called party is being alerted of the call, but the call is not yet established.
TEMPORARILY_UNAVAILABLE = (480, 'Temporarily Unavailable')
class-attribute
instance-attribute
This status code indicates that the server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
TOO_MANY_HOPS = (483, 'Too Many Hops')
class-attribute
instance-attribute
This status code indicates that the server has exceeded the maximum number of hops allowed in the request URI.
TRYING = (100, 'Trying')
class-attribute
instance-attribute
The request is being processed. No final response is available yet.
UNAUTHORIZED = (401, 'Unauthorized')
class-attribute
instance-attribute
The request requires user authentication.
UNDECIPHERABLE = (493, 'Undecipherable')
class-attribute
instance-attribute
This status code indicates that the server was unable to decrypt a message after performing the necessary decryption(s).
UNSUPPORTED_MEDIA_TYPE = (415, 'Unsupported Media Type')
class-attribute
instance-attribute
The server will not accept the request, because the media type of the request is unsupported.
UNSUPPORTED_URI_SCHEME = (416, 'Unsupported URI Scheme')
class-attribute
instance-attribute
The server will not accept the request, because the URI scheme of the request is unsupported.
USE_PROXY = (305, 'Use Proxy')
class-attribute
instance-attribute
The requested resource is available only through a proxy, the address for which is provided in the response.
VERSION_NOT_SUPPORTED = (505, 'Version Not Supported')
class-attribute
instance-attribute
The server does not support, or refuses to support, the protocol version that was used in the request message.
voip.sdp.types
SDP field types as defined by RFC 4566.
Attribute
dataclass
Bases: ByteSerializableObject
Attribute field (a=) as defined by RFC 4566 §5.13.
Source code in voip/sdp/types.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | |
Bandwidth
dataclass
Bases: ByteSerializableObject
Bandwidth field (b=) as defined by RFC 4566 §5.8.
Source code in voip/sdp/types.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
ConnectionData
dataclass
Bases: ByteSerializableObject
Connection data field (c=) as defined by RFC 4566 §5.7.
Source code in voip/sdp/types.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
Field
Bases: Protocol
SDP field descriptor protocol.
Source code in voip/sdp/types.py
25 26 27 28 29 30 31 32 33 34 35 36 | |
parse(value)
staticmethod
Parse a raw SDP line value.
Source code in voip/sdp/types.py
34 35 36 | |
IntField
dataclass
Descriptor for SDP fields that parse and serialize as integers.
Source code in voip/sdp/types.py
53 54 55 56 57 58 59 60 61 62 63 64 | |
MediaDescription
dataclass
Bases: ByteSerializableObject
Media description section (m=) as defined by RFC 4566 §5.14.
Source code in voip/sdp/types.py
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | |
apply_attribute(attr)
Apply a media-level a= attribute, returning True if consumed.
Handles a=rtpmap and a=fmtp by updating the matching
RTPPayloadFormat entry. Other attributes go to attributes.
Source code in voip/sdp/types.py
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | |
get_format(pt)
Return the RTPPayloadFormat for payload type pt, or None.
Source code in voip/sdp/types.py
353 354 355 356 | |
Origin
dataclass
Bases: ByteSerializableObject
Origin field (o=) as defined by RFC 4566 §5.2.
Source code in voip/sdp/types.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
PayloadTypeSpec
Bases: NamedTuple
Typed specification for a static RTP payload type (RFC 3551 §6).
Source code in voip/sdp/types.py
202 203 204 205 206 207 208 209 210 | |
RTPPayloadFormat
dataclass
Bases: ByteSerializableObject
RTP payload format descriptor (RFC 3551 §6 / RFC 4566 §6).
Codec parameters from a=rtpmap are merged in by the SDP parser.
Static payload types fall back to the StaticPayloadType table.
Dynamic payload types (PT ≥ 96) require an explicit a=rtpmap.
Serialises to the a=rtpmap value when codec fields are present.
Source code in voip/sdp/types.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | |
frame_size
property
Samples per standard 20 ms RTP frame.
For static payload types the value comes from StaticPayloadType.
For dynamic payload types (e.g. Opus, PT ≥ 96) it is derived from
sample_rate assuming a 20 ms packetisation interval.
from_pt(pt)
classmethod
Create an RTPPayloadFormat from a payload type number.
Source code in voip/sdp/types.py
313 314 315 316 | |
StaticPayloadType
Bases: PayloadTypeSpec, Enum
Static RTP payload types as defined by RFC 3551 §6.
Each member's value is a PayloadTypeSpec carrying the
payload type number, sample rate, canonical encoding name, channel count,
and frame size. Use from_pt to look up a member by its PT number.
Source code in voip/sdp/types.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
from_pt(pt)
classmethod
Look up a static payload type by its PT number.
Source code in voip/sdp/types.py
255 256 257 258 259 260 261 | |
StrField
dataclass
Descriptor for SDP fields that parse and serialize as plain strings.
Source code in voip/sdp/types.py
39 40 41 42 43 44 45 46 47 48 49 50 | |
Timing
dataclass
Bases: ByteSerializableObject
Timing field (t=) as defined by RFC 4566 §5.9.
Source code in voip/sdp/types.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |