# Configuring the SIP server

There are two aspects to configuring the SIP server.

- The first is the mode in which it is going to be run. For Windows, the software is run as either a Windows service or from the command line. For Linux and Solaris, the software can be run as either a daemon or from the command line.

- The second aspect of configuration is the programmable options that specify the behavior of the SIP stack.

## Command line options

The following table describes the command line options that dictate how the SIP server is run:

Option | Description
register | Registers SIP as a Windows service.
unregister | Unregisters SIP as a Windows service.
start | Starts the SIP server as a background process.
stop | Stops the SIP server.
cmask | Changes the console mask of a running SIP server. Initially, this mask is set with the -v option.
fmask | Changes the log file mask of a running SIP server. Initially, this mask is set with the -V option.

The following table describes the command line options for the SIP server that are used when running in manual mode:

Option | Description
-h, -H, -? | Displays a list of options.
-f config_file | Specifies a configuration file name to override the defaults.
-d parm value | Sets parameters from the command line instead of from a configuration file.
-s | Reads the standard configuration file.
-L | Logs status information to a file.
-D | Prints configuration to stdout.
-v mask_value | Specifies the status information displayed for debugging purposes. Specify mask_value by using a single hexadecimal value or by combining hexadecimal values using the OR operator. Use -h to display a list of options. This option is used in manual mode and causes logging to stdout.
Mask | Description
0x00000001 | Critical errors.
0x00000002 | Not critical warnings.
0x00000004 | General configuration information.
0x00000100 | SIP events (incoming messages).
0x00000200 | SIP commands (outgoing messages).
0x00000400 | SIP state changes.
0x00000800 | SIP addresses from messages.
0x00004000 | SIP SDP from messages.
0x00008000 | SIP REGISTER information.
0x00100000 | NCC commands (API calls).
0x00200000 | NCC events.
0x00400000 | NCC state errors.
0x04000000 | Miscellaneous debugging.
0x08000000 | Licensing information.
0x10000000 | SIP low-level subscription events.
0x20000000 | SIP low-level transport events.
0x40000000 | NCC low-level communication events.
0x80000000 | Some debugging output.
-V mask_value | Same as lowercase -v except this option controls logging to the log file.

## Configuration parameters

The SIP stack configuration parameters are described in the following table. These parameters can be specified on the command line if you are running the SIP server manually, or in a configuration file when you run the SIP server as a service or daemon. If the SIP server is running as a service or a daemon, this configuration file must be named nccsip.cfg and must be placed in the cfg directory under the oam directory. The configuration file is an ASCII text file that contains a number of keywords and associated values. The keywords are organized into logical groups. The following table describes these keywords:

Keywords | Type | Default | Description
general.PRACKSupport | Bit mask | 0x00 | Type of PRACK support. Valid values: 0x00 - PRACK is not supported. 0x01 - PRACKs are used if supported header from the remote side indicated to use PRACKs. 0x02 - Set required header to use PRACK.
general.sendProtocolEvent | Boolean | False | Determines whether received SIP messages generate NCCEVN_PROTOCOL_EVENTs. Valid values: True - Generates NCCEVN_PROTOCOL_EVENT for all received SIP messages that have extra information, except those automatically handled by the SIP stack. The extra information is contained in the buffer attached to NCCEVN_PROTOCOL_EVENT. False - Only generates NCCEVN_PROTOCOL_EVENT for received SIP messages that have extra information, and that do not cause a change in call state. If an incoming message causes a change in call state and the general.sendDataInEvents keyword is set to a non-zero value, then extra information from the message is returned in the buffer of the associated NCC event. Note: If you are not sure about the NCC reported events, run the ctasip demo application.
general.manualAck | Boolean | False | Enables nccAcknowledgeCall to send an acknowledgement (ACK) in the sequence INVITE/200 OK/ACK. Valid values are: True - Application is responsible for sending ACK. False - SIP stack automatically generates ACK and nccAcknowledgeCall is unavailable.
general.manualPRACK | Boolean | False | Enables nccSendPrack and nccSendPrackResponse. Valid values: True - Application is responsible for sending PRACK or its acknowledgement. False - SIP stack automatically generates PRACK and the acknowledgement to PRACK. Note: general.PRACKSupport must not be 0 (zero) for this option to be valid.
general.numOutboundOnly | Integer | 0 | Number of outbound only channels.
general.sendDataInEvents | Bit mask | 0 | Specifies what data from SIP messages is sent inside NCC event buffers. Bit 0 (0x0000001) - Send the request URI from the INVITE message as the information element SIP_IE_REQUEST_URI. Bit 1 (0x0000002) - Send the SIP message body as the information element SIP_IE_BODY. Bit 2 (0x0000004) - Send unrecognized SIP message headers in the information element SIP_IE_OTHER_HEADER. Bit 3 (0x00000008) – Send the Call-ID header in the information element SIP_IE_CALL_ID. Bit 4 (0x00000010) – Send the CSeq header in the information element SIP_IE_CSEQ. Bit 5 (0x00000020) – Send the Content-Length header in the information element SIP_IE_CONTENT_LENGTH. Bit 6 (0x00000040) – Send the Content-Type header in the information element SIP_IE_CONTENT_TYPE. Bit 7 (0x00000080) - Send the To header in the SIP IE SIP_IE_TO_HEADER. Bit 8 (0x00000100) - Send the From header in the SIP IE SIP_IE_FROM_HEADER. Note: Setting general.sendDataInEvents to a non-zero value only has an effect when general.sendProtocolEvent is False.
general.maxRegClients | Integer | 16 | Specifies the number of simultaneous users that can be registered.
general.maxSubscriptions | Integer | 256 | Number of subscriptions the stack can simultaneously create. Subscriptions are used in the transfer process.
general.disconnectDelay | Integer | 0 | Amount of time in milliseconds to delay a disconnect event. This delay ensures that media stop events will come before a disconnect event is received.
general.rportInVia | Boolean | False | Indicates whether or not to add an rport parameter to the Via header.
general.noCtxtRejectCause | Integer | 403 | Response code that the SIP server will reply with if no more application contexts are available. This code is also sent if no applications are running. Valid range for this response is 400 through 699.
general.replaces | Boolean | False | Indicates if replaces header is supported. Must be enabled to have full functionality for nccTransferCall.
general.traceSizeLimitMb | Integer | 0 | Maximum size in megabytes for the SIP log. A value of 0 implies no limit on the size.
general.incomingReferSupport | Boolean | False | Specifies if an incoming REFER is automatically rejected by nmssip. False = Incoming REFER is rejected with a 501 Not Implemented message. True = Incoming REFER is presented to the application for processing.
log.file | String | OS specific | Directs status information to the specified directory. See Logging.
log.maskFile | Integer | 0 | Verbosity mask for logging to a file. See the -V option for nmssip.
log.maskConsole | Integer | 0 | Verbosity mask for logging to the console. See the -v option for nmssip.
options.sendAutoResponse | Boolean | False | Enabling/disabling automatic responses to OPTIONS methods.
options.allow | String |  | Parameter used in the OPTIONS automatic responses for the allow header, for example: options.allow = INVITE,ACK
options.accept | String |  | Parameter used in the OPTIONS automatic responses for the accept header, for example: options.accept = application/sdp
options.acceptEnc | String |  | Parameter used in the OPTIONS automatic responses for the acceptEnc header, for example: options.acceptEnc = gzip
options.language | String |  | Parameter used in the OPTIONS automatic responses for the language header, for example: options.language = en
options.supported | String |  | Parameter used in the OPTIONS automatic responses for the supported header, for example: options.supported = 100rel
outProxy.address | String |  | Address of the outbound proxy to use. If this address is set, the outProxy.hostName parameter is ignored.
outProxy.hostName | String |  | Hostname where the outbound proxy resides. For example, sipproxy.company.com.
outProxy.port | Integer | 5060 | Port for the outbound proxy to use.
outProxy.transport | String | UDP | Transport mechanism for the outbound proxy to use (either UDP or TCP).
tcp.address | String | 0.0.0.0 | TCP address that SIP uses.
tcp.port | Integer | 5060 | TCP port that SIP uses.
timer.cancelGeneralNoResponse | Integer | 32000 | Timeout for a response to a CANCEL request not including canceling an INVITE.
timer.cancelInviteNoResponse | Integer | 32000 | Timeout for a response to a CANCEL request sent after an INVITE.
timer.generalLinger | Integer | 32000 | Timer that the stack uses after sending a final response to be able to resend the response in case a retransmission of the initial request is received.
timer.generalRequestTimeout | Integer | 32000 | Timeout for a response to a general request.
timer.inviteLinger | Integer | 32000 | Timer that the stack uses after sending an ACK for an INVITE final response to resend the ACK in response to a retransmission of the OK response.
timer.provisional | Integer | 180000 | Timeout value to wait for a final response after a provisional response is received for an INVITE. A value of 0 (zero) means no timer is set.
timer.retransmissionT1 | Integer | 500 | RFC 3261 defined timer.
timer.retransmissionT2 | Integer | 4000 | RFC 3261 defined timer.
timer.retransmissionT4 | Integer | 5000 | RFC 3261 defined timer.
udp.port | Integer | 5060 | UDP port that SIP uses.
udp.address | String | 0.0.0.0 | UDP address that SIP uses.

## Sample configuration file

# Any line beginning with a # is a comment line
udp.port = 5062
general.PRACKSupport = 1
general.sendProtocolEvents = false
general.manualACK = true
general.manualPRACK = false