local.server
Class Proxy

java.lang.Object
  |
  +--local.server.ServerEngine
        |
        +--local.server.Registrar
              |
              +--local.server.Proxy
All Implemented Interfaces:
org.zoolu.sip.provider.SipProviderListener
Direct Known Subclasses:
StatefulProxy

public class Proxy
extends Registrar

Class Proxy implement a Proxy SIP Server. It extends class Registrar. A Proxy can work as simply SIP Proxy, or it can handle calls for registered users.


Fields inherited from class local.server.Registrar
as, AUTHENTICATION_SCHEMES, AUTHENTICATION_SERVER_CLASSES, authentication_service, AUTHENTICATION_SERVICE_CLASSES, AUTHENTICATION_SERVICES, location_service, LOCATION_SERVICE_CLASSES, LOCATION_SERVICES
 
Fields inherited from class local.server.ServerEngine
log, Loop_Tag, server_profile, sip_provider
 
Constructor Summary
protected Proxy()
          Costructs a void Proxy
  Proxy(org.zoolu.sip.provider.SipProvider provider, ServerProfile server_profile)
          Costructs a new Proxy that acts also as location server for registered users.
 
Method Summary
protected  org.zoolu.sip.address.SipURL getPhoneTarget(org.zoolu.sip.address.SipURL request_uri)
          Tries to find the target for a username or phone URL not registered within the location service.
protected  boolean isPhoneNumber(java.lang.String str)
          Whether the String is a phone number.
static void main(java.lang.String[] args)
          The main method.
 void processRequestToLocalServer(org.zoolu.sip.message.Message msg)
          When a new request is received for the local server.
 void processRequestToLocalUser(org.zoolu.sip.message.Message msg)
          When a new request message is received for a local user
 void processRequestToRemoteUA(org.zoolu.sip.message.Message msg)
          When a new request message is received for a remote UA
 void processResponse(org.zoolu.sip.message.Message resp)
          When a new response message is received
protected  org.zoolu.sip.message.Message updateProxingRequest(org.zoolu.sip.message.Message msg)
          Processes the Proxy headers of the request.
protected  org.zoolu.sip.message.Message updateProxingResponse(org.zoolu.sip.message.Message resp)
          Processes the Proxy headers of the response.
 
Methods inherited from class local.server.Registrar
getTargets, updateRegistration
 
Methods inherited from class local.server.ServerEngine
getLocalDomains, isResponsibleFor, isResponsibleFor, onReceivedMessage, validateRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Proxy

protected Proxy()
Costructs a void Proxy

Proxy

public Proxy(org.zoolu.sip.provider.SipProvider provider,
             ServerProfile server_profile)
Costructs a new Proxy that acts also as location server for registered users.
Method Detail

processRequestToLocalServer

public void processRequestToLocalServer(org.zoolu.sip.message.Message msg)
When a new request is received for the local server.
Overrides:
processRequestToLocalServer in class Registrar

processRequestToLocalUser

public void processRequestToLocalUser(org.zoolu.sip.message.Message msg)
When a new request message is received for a local user
Overrides:
processRequestToLocalUser in class Registrar

processRequestToRemoteUA

public void processRequestToRemoteUA(org.zoolu.sip.message.Message msg)
When a new request message is received for a remote UA
Overrides:
processRequestToRemoteUA in class Registrar

updateProxingRequest

protected org.zoolu.sip.message.Message updateProxingRequest(org.zoolu.sip.message.Message msg)
Processes the Proxy headers of the request. Such headers are: Via, Record-Route, Route, Max-Forwards, etc.

processResponse

public void processResponse(org.zoolu.sip.message.Message resp)
When a new response message is received
Overrides:
processResponse in class Registrar

updateProxingResponse

protected org.zoolu.sip.message.Message updateProxingResponse(org.zoolu.sip.message.Message resp)
Processes the Proxy headers of the response. Such headers are: Via, ..

getPhoneTarget

protected org.zoolu.sip.address.SipURL getPhoneTarget(org.zoolu.sip.address.SipURL request_uri)
Tries to find the target for a username or phone URL not registered within the location service.

isPhoneNumber

protected boolean isPhoneNumber(java.lang.String str)
Whether the String is a phone number.

main

public static void main(java.lang.String[] args)
The main method.