Package twisted :: Package protocols :: Module sip |
[frames | no frames]

## Module twisted.protocols.sip

Session Initialization Protocol.

Documented in RFC 2543. [Superceded by 3261]

Classes
`Base` | Base class for SIP clients and servers.
`BasicAuthorizer` | Authorizer for insecure Basic (base64-encoded plaintext) authentication.
`DigestAuthorizer` |
`DigestedCredentials` | Yet Another Simple Digest-MD5 authentication scheme
`IAuthorizer` |
`IContact` | A user of a registrar or proxy
`ILocator` | Allow looking up physical address for logical URL.
`InMemoryRegistry` | A simplistic registry for a specific domain.
`IRegistry` | Allows registration of logical->physical URL mapping.
`Message` | A SIP message.
`MessagesParser` | A SIP messages parser.
`Proxy` | SIP proxy.
`RegisterProxy` | A proxy that allows registration for a specific domain.
`Registration` |
`Request` | A Request for a URI
`Response` | A Response to a URI Request
`URL` | A SIP URL.
`Via` | A SIP Via header.

Exceptions
`RegistrationError` | Registration was not possible.
`SIPError` |

Function Summary
| ``cleanRequestURL`(url)` Clean a URL from a Request line.
| `DigestCalcHA1(pszAlg, pszUserName, pszRealm, pszPassword, pszNonce, pszCNonce)`
| `DigestCalcResponse(HA1, pszNonce, pszNonceCount, pszCNonce, pszQop, pszMethod, pszDigestUri, pszHEntity)`
| ``parseAddress`(address, clean)` Return (name, uri, params) for From/To/Contact header.
| ``parseURL`(url)` Return string into URL object.
| ``parseViaHeader`(value)` Parse a Via header, returning Via class instance.
| `unq(s)`

Variable Summary
`dict` | `longHeaders` = `{'c': 'content-type', 'e': 'content-encodi...`
`int` | `PORT` = 5060
`dict` | `shortHeaders` = `{'to': 't', 'content-length': 'l', 'conta...`
`dict` | `specialCases` = `{'call-id': 'Call-ID', 'cseq': 'CSeq', 'w...`
`dict` | `statusCodes` = `{400: 'Bad Request', 401: 'Unauthorized', ...`

Function Details

### cleanRequestURL(url) Clean a URL from a Request line.

### parseAddress(address, clean=0) Return (name, uri, params) for From/To/Contact header. Parameters: `clean` - remove unnecessary info, usually for From and To headers.

### parseURL(url) Return string into URL object. URIs are of of form 'sip:user@example.com'.

### parseViaHeader(value) Parse a Via header, returning Via class instance.

Variable Details

    ### longHeaders Type: `dict` Value:
        {'c': 'content-type',
         'e': 'content-encoding',
         'f': 'from',
         'i': 'call-id',
         'l': 'content-length',
         'm': 'contact',
         's': 'subject',
         't': 'to',
        ...

    ### PORT Type: `int` Value:
        5060

    ### shortHeaders Type: `dict` Value:
        {'call-id': 'i',
         'contact': 'm',
         'content-encoding': 'e',
         'content-length': 'l',
         'content-type': 'c',
         'from': 'f',
         'subject': 's',
         'to': 't',
        ...

    ### specialCases Type: `dict` Value:
        {'call-id': 'Call-ID', 'cseq': 'CSeq', 'www-authenticate': 'WWW-Authen\
        ticate'}

    ### statusCodes Type: `dict` Value:
        {100: 'Trying',
         180: 'Ringing',
         181: 'Call Is Being Forwarded',
         182: 'Queued',
         200: 'OK',
         300: 'Multiple Choices',
         301: 'Moved Permanently',
         302: 'Moved Temporarily',
        ...

Generated by Epydoc 2.0 on Sat Oct 25 00:54:46 2003 | http://epydoc.sf.net