NIST implementation of the JAIN-SIP interfaces. JAIN-SIP (see
www.javasoft.com JSR 32) is a low level JAVA standard protocol wrapper
for the stack and message packages. It allows you to access the stack and
messages in a standard fashion and delivers events to an application under
certain conditions. Its intended use is to build portable User Agents,
proxy servers and low level protocol test tools. It is constructed
from underying NIST SIP objects by embedding these in wrapper objects.
The JAIN implementation includes a transaction layer.
You must choose a transaction model when configuring the stack.
There are two possible transaction models:
applicationManaged Transactions:
The stack tracks outstanding transactions and informs the application
layer throught a transaction timeout notification for each outstanding
transaction. That is the application gets a timeout notification on an
exponentially decaying time tick for each transaction for which no final
response has been received. For stateless behavior, you can configure
the stack to not delvier timeout notifications and so the underlying
transaction state becomes irrelevant. Specify this using:
gov.nist.jainsip.stack.transactionModel=applicationManaged
stackManaged Transactions:
The stack implements chapter 17 of the SIP Spec. The transaction state machine
is fully managed by the stack. The JAIN transaction layer is a wrapper
around the NIST-SIP transaction layer (contributed by Jeff Keyser).
Applications receive a timeout when a transaction does not complete in
the expected time. Specify this using:
gov.nist.jainsip.stack.transactionModel=systemManaged
Stack configuration
JAIN does not define a standard way in which to configure the
stack. The stack is configured via a property file. The property
file itself is specified as a property and is supplied to the
application using -Dgov.nist.jainsip.stack.configuration=configuration
switch. The property configuration file contains several stack
configuration parameters. These can be overridden by the properties
that appear on the command line.
Here are the properties that can be specified either as part of the
command line using the -DpropertyName= switch or in the configuration
file.
-
gov.nist.jainsip.stack.transactionModel=transactionModel
This parameter must be set to either systemManaged or applicationManaged.
This parameter is mandatory.
-
gov.nist.jainsip.stack.authenticationMethod=methodName methodClass [parms]
specifies a supported authentication method. Default is authentication
disabled.
-
gov.nist.jainsip.stack.traceLevel=level
Specifies the debug trace level (32 is the max trace level). 16 traces
all messages going through the stack. Default is 0 (no tracing).
-
gov.nist.jainsip.stack.enableUDP=port# (integer)
Specifies that UDP is supported on port#. The stack will start a
thread to listen for incoming udp messages at this port #
Default is 5060.
-
gov.nist.jainsip.stack.enableTCP=port# (integer)
Specifies that TCP is supported on port#. The stack will start a
thread to accept TCP connections at this port #.
-
gov.nist.jainsip.stack.defaultTransport=transport (String)
Specifies what transport to use for Via headers in outgoing request
messages. The transport tells the recipient of the message what transport
to use when responding to the message.
-
gov.nist.jainsip.stack.stackName=name
Specifies an identifying string for the stack. You can use this
to indicate a functional description of the stack.
-
gov.nist.jainsip.stack.stackHostName=name
Specify a DNS name for this stack. This can be a domain name or
a fully qualified host name. This is used for constructing outgoing
From headers. Ignored if you are constructing your own from headers.
-
gov.nist.jainsip.stack.stackAddress=address
Address of host where stack resides. The stack will start a thread to
listen for incoming messages at this IP address.
This is a required parameter.
-
gov.nist.jainsip.stack.serverLog=logfileName
File name where the log (trace) is written.
-
gov.nist.jainsip.stack.debugLog=logfileName
File where a debug trace is gathered. Be sure to send us this when
reporting bugs.
-
gov.nist.jainsip.stack.badMessageLog=logfileName
File where messages which incur parse errors that are severe enough
to abort furthrer processing are logged.
-
gov.nist.jainsip.stack.enableRecordRoute=boolean
Add the record route header when forwarding requests.
This property can be set to true or false. Default is false.
-
gov.nist.jainsip.stack.accessLogViaRMI=boolean
Log all messages that pass through the stack and make the log
accessible via RMI. Default is false. You need to enable this
to use the traceviewer to examine the trace.
-
gov.nist.jainsip.stack.rmiRegistryPort=portNumber (integer)
The port on which the rmi registry runs. This is used for accessing
the log via RMI (See tools/traceviewerapp for the trace visualizer).
The default (1099) will be used if nothing is specified.
-
gov.nist.jainsip.stack.rmiPort=portNumber (integer)
The port on which the RMI service runs. You dont need to specify anything
to just use the default.
-
gov.nist.jainsip.stack.traceLifeTime=seconds
Seconds for which to keep the trace around for remote access. After
this time, the trace is not available for remote access.
-
gov.nist.jainsip.stack.defaultRoute=string
Set the default route (used by gov.nist.sip.stack.DefaultRouter).
This has the form hostName:port/Transport.
The router is consulted to get a list of addresses in order of priority
that are tried in order to send an outgoing message.
-
gov.nist.jainsip.stack.defaultRouter=className
set a default router. The defaultRoute string is passed to the
defaultRouter. See gov.nist.sip.stack.Router for what the router is
supposed to do. A default router (gov.nist.sip.stack.defaultRouter)
is used if nothing is specified here. You can choose to implement your
own router or use one of the standard ones i.e. DNSRouter, ProxyRouter
or DefaultRouter that are provided in the gov.nist.sip.stack
package. Acknowledgement: The DNSRouter was contributed by Jeff Keyser.
-
gov.nist.jainsip.stack.duplicateWindow=seconds
set a duplicate elimiation window. Duplicates requests that arrive
in this window are dropped. If you do not want duplicate detection,
set this to 0 (the default is 32 seconds). This is ignored for
systemManagedTransactions.
-
gov.nist.jainsip.stack.generateRouteHeader=boolean
automatically generate route headers from record-route headers. Route
headers are not generated for CANCEL and ACK requests.
-
gov.nist.jainsip.stack.singleThreaded=boolean
Default value is false (i.e. stack is multi-threaded). indicates to
the stack that only a single thread should be started for processing
UDP requests. This takes less resources and ensures First Come
First Serve processing (no concurrency) but could starve the server
if the worker thread gets blocked while running the listener.
Feature requested by Lamine Brahimi (IBM Zurich). Identical effect
as setting the threadPoolSize to 1 below.
-
gov.nist.jainsip.stack.threadPoolSize=integer
Limit the number of pre-allocated threads for processing incoming UDP
messages messages. Setting this to 1 is the same as singleThreaded
(above). Default is inifinity (i.e. a thread is started for each
incoming message and exits after processing is complete). Feature
suggested by Niklas Uhrberg.
-
gov.nist.jainsip.stack.maxConnections=integer
max number of simultaneous TCP connections handled by this stack. Default
is "infinity". Feature suggested by Niklas Uhrberg.
-
gov.nist.jainsip.stack.maxTimeoutNotifications=integer
Default value is 8. Max number of timeout notifications for a given
outstanding transaction (before the transaction stops delivering these
notifications to the application). You can set this to 0 if you
dont want timeout notifications to be delivered to your application
at all (makes sense if you are building a stateless proxy). Feature
requested by Andreas Byström (e-horizon). This is ingored if the
transaction model is systemManaged
-
gov.nist.jainsip.stack.outgoingMessageHook=className
A class that allows you to add additional headers to outgoing messages
(for generated responses). This is used primarily for adding extension
headers.
Here is an example properties file:
gov.nist.jainsip.stack.stackName="My Stack"
gov.nist.jainsip.stack.traceLevel=32
gov.nist.jainsip.stack.stackHostName=nist.gov
gov.nist.jainsip.stack.serverLog=myLogfile
gov.nist.jainsip.stack.stackAddress=129.6.55.64
gov.nist.jainsip.stack.enableUDP=5060
gov.nist.jainsip.stack.enableTCP=5060
gov.nist.jainsip.stack.defaultRoute=is2.antd.nist.gov:5060/UDP
gov.nist.jainsip.stack.accessLogViaRMI=true
gov.nist.jainsip.stack.transactionModel=systemManaged