Skip Navigation Links | |
Exit Print View | |
SIPAPI Developer's Guide Oracle Solaris 11.1 Information Library |
2. Oracle Solaris SIP Internals
Writing Parsers For Custom Headers
Transaction Creation And Maintenance
Transaction Creation and ACK Signal Generation
Transaction And Network Errors
Dialog Termination, Deletion, and Notification
Transaction Layer and I/O Errors
Generating Call-ID, From and To tags, Branch-ID and Cseq
3. Multithreading and URI Support
An application initializes the stack before performing any other tasks. The initialization parameters can be broadly subdivided into the following four types:
Generic stack parameters
Upper layer registrations
Connection manager interfaces
Custom header table
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.
SIP_STACK_VERSION defines the SIP stack version.
SIP_STACK_DIALOGS instructs the stack to maintain dialogs. If this flag is not set, the stack does not maintain any dialog information.
The stack uses this function to deliver SIP messages to the application. Applications must register this routine.
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.
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.
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.
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.
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.
Applications must register the interfaces in this section with the SIP library.
The stack calls this routine to send SIP messages.
The application must provide functions to increment and decrement reference counts on a connection object.
The application must register functions to query the following attributes of a connection object:
The connection is a byte-stream
The connection is reliable
Remote endpoint information
Local endpoint information
The transport type
The application can register the following timer attributes that the API uses to obtain timer values for a connection object:
This value defines the RTT estimate
This value defines the maximum retrieval interval for non-INVITE requests and INVITE responses
This value defines the maximum duration that a message remains in the network
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.
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.