JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
SIPAPI Developer's Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  SIP Overview

2.  Oracle Solaris SIP Internals

SIP Stack Initialization

Generic Stack Parameters

Upper Layer Registrations

Connection Manager Interfaces

Custom Header Table

Header Management Layer

Writing Parsers For Custom Headers

Transaction Management Layer

Transaction Creation And Maintenance

Transaction Creation and ACK Signal Generation

Transaction Deletion

Transaction Lookup

Transaction Timers

Transaction And Network Errors

Dialog Management Layer

UAC Dialog Creation

UAS Dialog Creation

Dialog Caching

Dialog Termination, Deletion, and Notification

Message Formatting Layer

Receiving Messages

Sending Messages

Connection Manager

Connection Object

Caching a Connection Object

Freeing a Connection Object

Sending Messages

Receiving Messages

Transaction Layer and I/O Errors

Timer Management Layer

Generating Call-ID, From and To tags, Branch-ID and Cseq

Multithreading Support

3.  Multithreading and URI Support

4.  SIP API Functions

A.  Examples of Use

B.  Programming with the SIP API

C.  Transaction Timers

Index

SIP Stack Initialization

An application initializes the stack before performing any other tasks. The initialization parameters can be broadly subdivided into the following four types:

After initializing the stack, an application creates requests by using the interfaces that are provided by the header management layer. Applications send requests by using the message formatting layer's interface. Applications receive incoming requests and responses after initializing the stack and pass the requests and responses to the stack for processing.

Generic Stack Parameters

SIP version

SIP_STACK_VERSION defines the SIP stack version.

Stack flags

SIP_STACK_DIALOGS instructs the stack to maintain dialogs. If this flag is not set, the stack does not maintain any dialog information.

Upper Layer Registrations

Upper layer receive routine

The stack uses this function to deliver SIP messages to the application. Applications must register this routine.

Application specific timeout and un-timeout routines

The application can define timeout and un-timeout routines for the stack to use. Applications must define both routines or neither routine. If the application does not define these routines, the stack uses the built-in timeout routines.

Transactions error notifications

The application can register an error notification routine. The stack invokes the error notification routine when the transaction layer encounters a network error while the transaction layer is sending a SIP message. If the application does not register an error notification routine, the stack will not send notifications in case of a network error.

Dialog delete notification

If the stack is configured to maintain dialogs, the application can register a callback routine. The stack invokes the callback routine when a dialog is deleted. If the application does not register a callback routine, the stack will not send notifications when a dialog is deleted.

Transaction state transition notifications

An application can register a routine that is invoked when a transaction changes state. The routine is invoked with the transaction handle, the message that resulted in the transition, and the previous and current states. If an application does not register this routine, the stack will not send notifications when a transaction changes state.

Dialog state transition notifications

If the stack is configured to maintain dialogs, the application can register a callback routine. The stack invokes the callback routine when a dialog changes state. The callback routine is invoked with the dialog handle, the message that resulted in the transition, and the previous and current state. If an application does not register this routine, the stack will not send notifications when a dialog changes state.

Connection Manager Interfaces

Applications must register the interfaces in this section with the SIP library.

Send routine

The stack calls this routine to send SIP messages.

Hold/Release functions

The application must provide functions to increment and decrement reference counts on a connection object.

Connection attributes.

The application must register functions to query the following attributes of a connection object:

is_stream

The connection is a byte-stream

is_reliable

The connection is reliable

remote address

Remote endpoint information

local address

Local endpoint information

transport

The transport type

The application can register the following timer attributes that the API uses to obtain timer values for a connection object:

Timer1

This value defines the RTT estimate

Timer2

This value defines the maximum retrieval interval for non-INVITE requests and INVITE responses

Timer4

This value defines the maximum duration that a message remains in the network

TimerD

This value defines the wait time for response retransmits

If an application does not specify values for these timer attributes, the stack uses default values.

Custom Header Table

An application can register a table of custom headers with the library. The table must include parsing functions for those headers. The application can include standard headers in the table. If the application includes standard headers in the custom header table, the stack uses the parsing functions that are defined in the custom header table instead of the built-in parsing functions.