twisted.protocols.sip.Base

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

## Class Base

    AbstractDatagramProtocol --+
                               |
                DatagramProtocol --+
                                   |
                                  Base

Known Subclasses:
  `Proxy`

Base class for SIP clients and servers.

Method Summary
| `__init__(self)`
| `_fixupNAT(self, message, (srcHost, srcPort))`
| `addMessage(self, msg)`
| `datagramReceived(self, data, addr)`
| ``deliverResponse`(self, responseMessage)` Deliver response.
| ``handle_request`(self, message, addr)` Override to define behavior for requests received
| ``handle_response`(self, message, addr)` Override to define behavior for responses received.
| ``responseFromRequest`(self, code, request)` Create a response to a request message.
| ``sendMessage`(self, destURL, message)` Send a message.
Inherited from DatagramProtocol
| ``connectionRefused`(self)` Called due to error from write in connected mode.
Inherited from AbstractDatagramProtocol
| ``__getstate__`(self)`
| ``doStart`(self)` Make sure startProtocol is called.
| ``doStop`(self)` Make sure stopProtocol is called.
| ``makeConnection`(self, transport)` Make a connection to a transport and a server.
| ``startProtocol`(self)` Called when a transport is connected to this protocol.
| ``stopProtocol`(self)` Called when the transport is disconnected.

Class Variable Summary
`int` | `debug` = 0
`int` | `PORT` = 5060
Inherited from AbstractDatagramProtocol
`int` | `noisy` = 1
`int` | `numPorts` = 0
`NoneType` | `transport` = None

Method Details

### deliverResponse(self, responseMessage) Deliver response. Destination is based on topmost Via header.

### handle_request(self, message, addr) Override to define behavior for requests received Parameters: `message` (type=`Message`) `addr` (type=`tuple`)

### handle_response(self, message, addr) Override to define behavior for responses received. Parameters: `message` (type=`Message`) `addr` (type=`tuple`)

### responseFromRequest(self, code, request) Create a response to a request message.

### sendMessage(self, destURL, message) Send a message. Parameters: `destURL` - `URL`. This should be a *physical* URL, not a logical one. `message` - The message to send.

Class Variable Details

    ### debug Type: `int` Value:
        0

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

Generated by Epydoc 2.0 on Sat May 15 20:08:23 2004 | http://epydoc.sf.net