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

Class Proxy

AbstractDatagramProtocol --+        
                           |        
            DatagramProtocol --+    
                               |    
                            Base --+
                                   |
                                  Proxy

Known Subclasses:
RegisterProxy

SIP proxy.
Method Summary
  __init__(self, host, port)
Create new instance.
  _cantForwardRequest(self, error, message)
  deliverResponse(self, responseMessage)
Deliver response.
  getVia(self)
Return value of Via header for this proxy.
  gotResponse(self, message, addr)
Called with responses that are addressed at this server.
  handle_request_default(self, message, (srcHost, srcPort))
Default request handler.
  handle_response(self, message, addr)
Default response handler.
  responseFromRequest(self, code, request)
Create a response to a request message.
    Inherited from Base
  datagramReceived(self, data, addr)
  sendMessage(self, destURL, message)
Send a message.
    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
NoneType locator = None                                                                  
    Inherited from AbstractDatagramProtocol
str noisy = 'sure, why not'
int numPorts = 0                                                                     
NoneType transport = None                                                                  

Method Details

__init__(self, host=None, port=5060)
(Constructor)

Create new instance.
Parameters:
host - our hostname/IP as set in Via headers.
port - our port as set in Via headers.
Overrides:
twisted.protocols.sip.Base.__init__

deliverResponse(self, responseMessage)

Deliver response.

Destination is based on topmost Via header.

getVia(self)

Return value of Via header for this proxy.

gotResponse(self, message, addr)

Called with responses that are addressed at this server.

handle_request_default(self, message, (srcHost, srcPort))

Default request handler.

Default behaviour for OPTIONS and unknown methods for proxies is to forward message on to the client.

Since at the moment we are stateless proxy, thats basically everything.
Overrides:
twisted.protocols.sip.Base.handle_request_default

handle_response(self, message, addr)

Default response handler.
Overrides:
twisted.protocols.sip.Base.handle_response

responseFromRequest(self, code, request)

Create a response to a request message.

Class Variable Details

locator

Type:
NoneType
Value:
None                                                                  

Generated by Epydoc 2.0 on Sat Sep 13 04:20:38 2003 http://epydoc.sf.net