Google Groups Home
Help | Sign in
Recent pages and files
Mobicents SIP Services    

Mobicents SIP Services

 

 

1. Overview

   High availability, scalability,modularity easy management - these drove this design of sip services. Availability is something that is common with SLEE specs and is secured by container itself - along with scalability.

Reason to have basic set of services modular is quite simple - often users have their own components or want to create some part from scratch. Its easier to use defined set of interfaces to interact with different blocks rather than writing everything from scratch.


To achieve this we made simple split according to block usage into:

  • ProxySbb
  • LocationSbb
  • RegistrarSbb

 

1.1 ProxySbb, service and itnerface

Is first logical building block of this set. It is an entry point for processed messages, it receives SIP messages and depending on their content makes routing decissionsAs it is it does not provide any special interface - except one that is required by sip ra and SLEE contract.


1.2 LocationSbb and interface

 LocationSbb is second logical block. As it provides service that can be of potential use to more than proxy it is standalone service. Its purpose is to store and manage location inforamtion passed in various ways - for instance in REGISTER messages. It utilizes

 four classes from org.mobicents.slee.services.sip.common package which declare contract on handling and exposing location information. Those four classes are:


  • LocationInterface - defines contract between location storage and location user:

 

/**
     * Adds new contact binding for particular user..
     * @param sipAddress - user address of record sip:ala@ma.kota.w.domu.com
     * @param contactAddress - contact address - sip:+381243256
     * @param comment - possible comment note
     * @param expiresDelta - long - miliseconds for which this contact is to remain valid
     * @param q - q parameter
     * @param id - call id
     * @param seq - seq numbers
     * @return - bidning created in this operation
     * @throws LocationServiceException
     */
    public RegistrationBinding addUserLocation(String sipAddress,String contactAddress, String comment,
            long expiresDelta, float q, String id, long seq) throws LocationServiceException;

    /**
     * Returns set of user that have registered - set contains adress of record fro each user, something like sip:ala@kocia.domena.com
     * @return
     */
    public Set<String> getRegisteredUsers();
    /**
     * Returns map which contians mapping contactAddress->registrationBinding for particular user - address of record sip:nie@ma.mnie.tu
     * @param sipAddress
     * @return
     * @throws LocationServiceException
     */
    public Map<String,RegistrationBinding> getUserBindings(String sipAddress) throws LocationServiceException;
    /**
     * Removes contact address from user bindings.
     * @param sipAddress - sip:ala@kocia.domena.au
     * @param contactAddress - sip:+481234567890
     * @throws LocationServiceException
     */
    public void removeBinding(String sipAddress, String contactAddress)throws LocationServiceException;

 

  • LocationSbbLocalObject - simply extends LocationInterface - this sbb local object should be implemented by location sbb, allowing sync access to location information
  • LocationServiceException - simple exception that indicates problem in backend storage - acces to wrong data or malfunction of storing mechanism.
  • RegistrationBinding - defines getters for registration information  container.

 

LocationSbb is used by all other componets to access and store information regarding users - in case of SIP Services, users is Proxy and Registrar. Both depends on LocationInterface methods.

 

1.3 RegistrarSbb and interface

One might think that registrar is obsolete because location performs all the tasks. However its nto so easy in telco world. First thing here is taht someone has to unwrapp information from sip message, second - it might need some more processing. For instance someone might have a need to do a credit controll on registration to monitor user activities. Thats why LocationSbb takes care of storing logic and allows users to introduce some other logic into Registrar(One thing that is not here yet is callback on expiration of user information, but till know there has not been demand on it).


2. Overall diagram

 

 

NOTE:

1. Currenly LocationSbb uses cache to store all information

 

 

3. Configuration - Management

 

3.1 ProxySbb

Proxy Sbb  configuration options are exposed via JMX MBean. It is registered under object name "slee:sipproxyconfigurator=only_human". It provides following methods(fields):

/**
     * List of supported uri schemes by this proxy/ accepted uri schemes
     * @return
     */
    public String[] getSupportedURISchemes();
    /**
     * List of domains for which this proxy should act.
     * @return
     */
    public String[] getLocalDomainNames();
    /**
     * This is only called to fill in the via header.
     *
     * @return the sipHostName by local host lookup or by consulting
     * the load balancer.
     *
     */
    public String getSipHostname();
    /**
     * Port for communication
     * @return
     */
    public int getSipPort();
   
    /**
     * Transport used by this proxy
     * @return
     */
    public String[] getSipTransports();

/**
     * If proxy supports more than sips and sip uri schemes this is the method to add them.
     * @param schemeToAdd
     */
    public void addSupportedURIScheme(String schemeToAdd);
    /**
     * This method removes uri scheme from allowed set
     * @param schemeToRemove
     */
    public void removeSupportedURIScheme(String schemeToRemove);
    
    /**
     * Adds local domain - domain which after addition is considered to be served by this proxy. After add operation proxy resolves all contacts localy, allow to register.
     * @param localDomainToAdd
     */
    public void addLocalDomain(String localDomainToAdd);
    /**
     * Removes domain from local set.
     * @param localDomainToRemove
     */
    public void removeLocalDomain(String localDomainToRemove);
    
    /**
     * Sets this sip host name, in case of multiple interfaces and names its mandatory.
     * @param sipHostName
     */
    public void setSipHostName(String sipHostName);

    /**
     * Sets port on which proxy should work
     * @param port
     */
    public void setSipPort(int port);
    
    /**
     * Sets set of allowed transports
     * @param transport
     */
    public void setSipTransports(String[] transport);

    /**
     * Currently commented out code. Adds host through which messages must pass through after leaving this proxy
     * @param pos
     * @param host
     */
    public void addMustPassThrough(int pos,String host);
    public void removeMustPassThrough(int pos);
    public void removeMustPassThrough(String host);

   

 

All above values can be configured via sbb-jar.xml file with use of enviroment entries. They are defined as follows:


        <env-entry>
            <description>
                name of MBean that holds this configuration
            </description>
            <env-entry-name>configuration-MBEAN</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>only_human</env-entry-value>
        </env-entry>
        <env-entry>
            <description>accepted uri schemes</description>
            <env-entry-name>configuration-URI-SCHEMES</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>sip;sips</env-entry-value>
        </env-entry>
        <env-entry>
            <description>Local domain names</description>
            <env-entry-name>configuration-LOCAL-DOMAINS</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>nist.gov;mobicents.org</env-entry-value>
        </env-entry>



configuration-MBEAN allows to change MBean name, it has to create, with conjunction with static prefix, valid Object Name. Allowe values could look like: "v1Reg,type=test" or just "v1Reg".

Names are selfexplanatory - they should match setter/getters from MBean. Provided values are defaults, are always picked up when service is created.


3.2 RegistrarSbb

Registrar configuration is quite plain, as there was no demand on more complex options. JMX MBean allows to controll accepted values of min/max expires SIP headers - thus controlling minimal and maximal registration time. MBean is registered under object name "slee:sipregistrarconfigurator=v1RegistrarConf". Here are method signatures:

 

    public long getSipRegistrationMinExpires();
    public void setSipRegistrationMinExpires(long minExpires);
    public long getSipRegistrationMaxExpires();
    public void setSipRegistrationMaxExpires(long maxExpires); 
 

 

One can also configure those options along with MBean suffix from sbb-jar.xml file with config options:

        <env-entry>
            <description>
                name of MBean that holds this configuration
            </description>
            <env-entry-name>configuration-MBEAN</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>v1RegistrarConf</env-entry-value>
        </env-entry>
        <env-entry>
            <description>Maxmimum registration time [s]</description>
            <env-entry-name>configuration-MAX-EXPIRES</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>3600</env-entry-value>
        </env-entry>
        <env-entry>
            <description>Minimum registration time [s]</description>
            <env-entry-name>configuration-MIN-EXPIRES</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>60</env-entry-value>
        </env-entry>


Names are selfexplanatory - they should match setter/getters from MBean. Provided values are defaults, are always picked up when service is created. configuration-MBEAN allows to change MBean name, it has to create, with conjunction with static prefix, valid Object Name. Allowe values could look like: "v1Reg,type=test" or just "v1Reg"


3.3 LocationSbb

LocationSbb is component responsible for storing registration information. Logicaly it is resonable to asume that it will allow to browse its data via JMX. So far this is only requierement that has been set for this component management. MBean is registered under oobject name "". It exposes following methods:


    public static final String MBEAN_NAME_PREFIX="slee:siplocationservice=";
    
    /**
     *
     * @return Set with registered users. It contains entries like "sip:316471@kocia.domena.au" or "sip:mobicents@gmail.com"
     */
    public Set<String> getRegisteredUsers();
    /**
     *
     * @param record - address of record, value like "sip:mobicents@gmail.com" this is passed in from and to header of REGISTER reqeust
     * @return
     */
    public Set<String> getContacts(String record);
    
    /**
     * Returns time in miliseconds left till certain contact expires, if there is some error it return Long.MIN_VALUE.
     *
     * @param record
     * @param contact - must be exact value put into register. See return values of getContacts
     * @return
     */
    public long getExpirationTime(String record, String contact);
    
    /**
     * Number of registered users.
     * @return
     */
    public int getRegisteredUserCount();

 

 In sbb-jar.xml one can define specific name of MBean via enviroment entries:

        <env-entry>
            <description>
                name of MBean that holds this configuration
            </description>
            <env-entry-name>configuration-MBEAN</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>v1RegistrarConf</env-entry-value>
        </env-entry>

 

configuration-MBEAN allows to change MBean name, it has to create, with conjunction with static prefix, valid Object Name. Allowe values could look like: "v1Reg,type=test" or just "v1Reg"

 

 

Version: 
Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google