Administering Session Initiation Protocol (SIP) on Liberty
You can configure SIP on Liberty by adding and configuring elements in the server.xml file.
Before you begin
Install the sipServlet-1.1 feature in your Liberty server. For more information, see Adding and removing Liberty features.
About this task
This task describes how to manually configure SIP for Liberty in your server.xml file. Alternatively, you can configure SIP by using the developer tools, which automatically enable all configurations in the server.xml file. For more information, see WebSphere® Developer Tools > Developing > Developing SIP applications.
Procedure
- In the server.xml file, configure
the SIP container by adding a sipContainer element.
<sipContainer invalidateSessionOnShutdown="true" msgArrivalTimeAttr="true" markInternalResponse="true"></sipContainer>
- Configure the SIP stack by adding a sipStack element. You can configure behavior such as automatic responses, message information, and connection
reuse.
SIP timers provide a mechanism for session expiration. You can set values for the SIP timers that are different from default values that are specified in RFC 3261 by specifying the timer attributes on the sipStack element.<sipStack hideMessageBody="true" hideMessageReqUri="true" auto100OnInvite="false" auto482OnMergedRequests="true" forceConnectionReuse="false" acceptNonUtf8Bytes="true" pathMtu="1600" compactHeaders="API"> <commaSeparatedHeaders>Comma separated headers</commaSeparatedHeaders> <hideMessageHeaders>iup</hideMessageHeaders> <sipQuotedParameters>Require</sipQuotedParameters> </sipStack>
<sipStack timerT1="500" timerT2="4000" timerT4="5000" timerA="500" timerB="32000" timerD="32000" timerE="500" timerF="32000" timerG="500" timerH="32000" timerI="5000" timerJ="32000" timerK="5000"></sipStack>
- Configure the SIP application router by adding a sipApplicationRouter element. When you configure a SIP application router, you can either
use the default application router (DAR) or create a custom application
router. The DAR component uses a configuration text file that is modeled
as a Java™ properties file to
define the order in which the application router sends SIP requests
to applications.
If you do not configure an application router and are manually deploying your applications, applications are triggered in the order that the applications were deployed. If you deploy multiple applications through the server.xml file, you cannot define the application order.
- To use the DAR component with a DAR configuration file, specify
the location of the DAR .properties file on the sipDarConfiguration attribute
of the sipApplicationRouter element.
<sipApplicationRouter sipDarConfiguration="pathToDar.properties"></sipApplicationRouter>
- To use a custom application router, configure the router in
the server.xml file:
- Add the bells-1.0 feature to the server.xml
file.
For more information, see the documentation for bells-1.0.<featureManager> <feature>bells-1.0</feature> </featureManager>
- In the server.xml file, add your custom application
router JAR file as a shared library and add the bell configuration
for thejavax.servlet.sip.ar.spi.SipApplicationRouterProvider service.
For more information about shared libraries, see Shared libraries<library id="carLib" name="carLib" description="Custom App Router Library"> <file name="pathToJar.jar"></file> </library> <bell libraryRef="carLib"> <service>javax.servlet.sip.ar.spi.SipApplicationRouterProvider</service> </bell>
- On the sipApplicationRouter element, set the carProvider attribute
to the full name of the custom application router provider class.
<sipApplicationRouter carProvider="example.example"></sipApplicationRouter>
- Add the bells-1.0 feature to the server.xml
file.
<sipApplicationRouter carProvider="example.example" sipNoRouteErrorCode="403"></sipApplicationRouter>
- To use the DAR component with a DAR configuration file, specify
the location of the DAR .properties file on the sipDarConfiguration attribute
of the sipApplicationRouter element.
- Configure the SIP endpoints by adding a sipEndpoint element. You can configure custom ports, hosts, and binding behavior. Any SIP endpoint that you
configure overrides the default endpoint.
<sipEndpoint host="localhost" sipTCPPort="5060" bindRetries="60" bindRetriesDelay="5000"></sipEndpoint>
Note: Transport Layer Security (TLS) is disabled by default. To enable TLS for your SIP container, enable and configure SSL communication for your Liberty server. For more information, see Enabling SSL communication in Liberty. - Configure SIP performance by adding a sipTasksDispatcher element. You can configure the number of SIP tasks that can be run concurrently. A SIP application task
is a sequence of application code that is serially executed on the SIP container on a single thread.
For example, the application implementation of a SipServlet.doInvite() method or a
SipTimerListener.timeout() method are each considered a single task if the
application code that is called from these methods is executed serially on a managed Liberty thread that is provided by the container.
The actual maximum number of concurrent SIP tasks is limited by the maximum number of managed Liberty threads.
<sipContainer> <sipTasksDispatcher concurrentContainerTasks="15"/> </sipContainer>
- If you want to resolve SIP URIs by using Domain Name System
(DNS) Naming Authority Pointer (NAPTR) records, configure a domain
resolver.
- Add and configure a domainResolver element. If you configure this element, SIP URIs are resolved through DNS into the IP address, port,
and transport protocol of the next hop to contact.Note: SIP does not support use of DNS procedures for a server to send a response to a back-up client if the primary client fails.
<domainResolver dnsAutoResolve="true"> <dnsServers>dns.server.com</dnsServers> </domainResolver>
- Configure your DNS server to work with the SIP container. The following example is a BIND db file for configuring RFC
3263 support on a DNS server.
; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") ; Copyright (C) 2001 Internet Software Consortium. ; ; Permission to use, copy, modify, and distribute this software for any ; purpose with or without fee is hereby granted, provided that the above ; copyright notice and this permission notice appear in all copies. ; ; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH ; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY ; AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, ; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM ; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ; PERFORMANCE OF THIS SOFTWARE. ; $Id: include.db,v 1.2.206.1 2004/03/06 10:22:13 marka Exp $ ; Test $INCLUDE current domain name and origin semantics example.com. 43200 IN SOA ns.example.com. email.example.com. ( 2003032001 10800 3600 604800 86400 ) ; example.com. 43200 IN NS ns.example.com. ; ns.example.com. 43200 IN A 10.0.0.20 sipserver1.example.com. 43200 IN A 10.0.0.21 sipserver2.example.com. 43200 IN A 10.0.0.22 sipserver3.example.com. 43200 IN A 10.0.0.23 ; router.example.com. 43200 IN CNAME sipserver3 ; sipserver1.example.com. 43200 IN AAAA fec0:0:0:0:0:0:0:abcd sipserver2.example.com. 43200 IN AAAA fec0:0:0:0:0:0:0:abba ; _sip._udp.example.com. 43200 IN SRV 2 0 5060 sipserver1.example.com. _sip._udp.example.com. 43200 IN SRV 2 0 5060 sipserver2.example.com. _sip._tcp.example.com. 43200 IN SRV 1 4 5060 sipserver1.example.com. _sip._tcp.example.com. 43200 IN SRV 1 2 5060 sipserver2.example.com. _sips._tcp.example.com. 43200 IN SRV 0 1 5061 sipserver1.example.com. _sips._tcp.example.com. 43200 IN SRV 0 0 5061 sipserver2.example.com. ; example.com. 43200 IN NAPTR 0 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. example.com. 43200 IN NAPTR 1 0 "s" "SIP+D2T" "" _sip._tcp.example.com. example.com. 43200 IN NAPTR 2 0 "s" "SIP+D2U" "" _sip._udp.example.com.
- Add and configure a domainResolver element. If you configure this element, SIP URIs are resolved through DNS into the IP address, port,
and transport protocol of the next hop to contact.

File name: twlp_sip_adm.html