Network Deployment (Distributed operating systems), v8.0 > Administer applications and their environment > Administer Session Initiation Protocol (SIP) applications > Administer SIP applications
Configure multihomed hosting
The SIP container can accept from the SIP proxy a list of outbound interfaces and expose it to any SIP application.
Multihomed hosting is configured at the WebSphere SIP proxy after the multihomed environment is set up. The multihome topology may include setting up multiple networks (routers, switches, etc.), multiple load balancers (if more than one proxy server needs to be configured for each virtual IP), and multiple network cards on each of the available proxy servers. After you install the network cards and configure the loopback addresses, set up a separate SIP proxy channel chain in each SIP proxy for each available network interface.
Attention: You can only configure the SIP proxy server to support multiple interfaces. The SIP container does not support this capability.
Multihoming allows you to have a single application communicate with different user agent clients (UAC) and user agent servers (UAS) on different networks.
The application queries the SIP container to determine the list of available outbound interfaces using standard procedures defined by JSR 289. This is done through a context attribute that is maintained in the container (through protocol exchanges with all the available SIP proxies). This attribute is javax.servlet.sip.SipServlet.OUTBOUND_INTERFACES, defined to be javax.servlet.sip.outboundInterfaces. This attribute contains all the available interfaces. The sample code in the Example section shows how to access the attribute from the application.
After the interfaces on each SIP proxy are configured, follow the steps in the procedure to control the routing of outbound messages. If more than one proxy is being used, it is important that each proxy be configured identically.
When an application does not specify an interface to use for sending outbound requests, the default interfaces are used by the proxy. IBM recommends that you set the default interfaces for every protocol. See step 5 for more information.
The administrator can optionally set three SIP proxy custom properties that define the chain name that define the appropriate interface to use if the SIP application does not call the setOutboundInterface method. If these custom properties are not set and the setOutboundInterface method is not used, the interface that will be used for outbound requests cannot be definitively determined.
The following procedure applies to a topology that contains a single proxy setup for multihomed hosting with more than one network interface.
Procedure
- In the administrative console, expand Servers > Server Types and click WebSphere proxy servers > proxy_name .
- Under Proxy Settings, expand SIP Proxy Server Settings and click SIP proxy server transports.
- On the Transport Chain panel, delete existing transport chain or chains that contain proxy host names that use an asterisk (*).
- Add new transport chain names and specify the IP address or host name associated with the interface that the chain is configured to use. Proxy multihomed configurations require you to configure a transport for each proxy interface. When using proxy servers with a load balancer, ensure a transport for TCP exists along with the desired transport type for SIP traffic. For example, when a proxy server uses two interfaces, then a minimum of six proxy transport chains are required. Each proxy interface will have a UDP transport chain (2) configured using the load balancer cluster alias IP address, TCP transport chain (2), and specific transport chain (2) of desired protocol (UDP, TLS, etc.) to run SIP traffic.
- On the Transport chain panel, click New. The Create New Transport Chain wizard initializes. During the transport chain creation process, add a unique Transport chain name and select the proxy protocol template (UDP, TCP, or Secure) from the Transport chain template menu.
- Click Next.
- Select the Use existing port or Create a new port option. For new ports, provide the port name, host name, and port number. For the Host value, specify the IP address or specific host name. Do not use an asterisk (*) for the Host value.
- Click Next for Step 2.
- Review the summary of actions and click Finish for Step 3.
- At the top of the panel, click Save to save the changes to the master configuration and resynchronize with the nodes, if applicable.
- Specify the default chain name to use on the proxy server. From the SIP proxy settings panel, custom properties can be set up to specify the appropriate default interface for each protocol. These interfaces are used to send outbound requests when an application does not specify which interface to use.
- In the administrative console, expand Servers > Server Types and click WebSphere proxy servers > proxy_name .
- Under Proxy Settings , expand SIP Proxy Server Settings and click SIP proxy settings > Custom properties.
- Enter the appropriate chain name previously configured in step 4 (not the interface or host name) to configure the transports section of the SIP proxy settings. There is one custom property for each transport type.
Custom Property Name Description defaultUDPChainName The default UDP chain name to use when setOutboundInterface is not called. defaultTCPChainName The default TCP chain name to use when setOutboundInterface is not called. defaultTLSChainName The default TLS chain name to use when setOutboundInterface is not called. - Recycle the proxy server.
Results
You have successfully configured SIP multihomed hosting, which enables the applications to route outbound SIP requests through more than a single outbound interface.
Example
The following sample code demonstrates how to acquire the available outbound interfaces and set the appropriate outbound interface on the session object.
.... import javax.servlet.sip.SipServlet; import javax.servlet.sip.SipSession; .... protected void doInvite(SipServletRequest req1) throws ServletException, IOException { ... // This block of code handles setting of the outbound interface. SipSession sipSession = req1.getSession(); javax.servlet.ServletContext context = getServletContext(); java.util.List list = (java.util.List)context.getAttribute(javax.servlet.sip.SipServlet. OUTBOUND_INTERFACES); SipURI uri = getProtocolInterface ("udp", list); if (uri != null) { InetSocketAddress inetSocketAddr = new InetSocketAddress(uri.getHost(), uri.getPort()); sipSession .setOutboundInterface(inetSocketAddr); } ... } // This method simply pulls out the first interface in the list for the specified protocol private SipURI getProtocolInterface(String transport, List outboundInterfaceList) { SipURI uri = null; Iterator iterator = outboundInterfaceList.iterator(); while (iterator.hasNext()) { SipURI tempUri = (SipURI)iterator.next(); if (tempUri.getTransportParam().equals(transport) == true) { uri = tempUri; break; } } return (uri); }
Multihomed hosting
SIP proxy settings