SIP API Developer's Guide

Stack Initialization Function

int sip_stack_init(sip_stack_int_t *stack_init);

This function initializes the SIP stack. This is the stack initialization structure:

typedef struct sip_stack_init_s {
        int                     sip_version;
        uint32_t                sip_stack_flags;
        sip_io_pointers_t       *sip_io_pointers;
        sip_ulp_pointers_t      *sip_ulp_pointers;
        sip_header_function_t   *sip_function_table;
}sip_stack_init_t;

The structure has the following elements:

sip_version

The value of this variable is equal to the value of the SIP_STACK_VERSION attribute.

sip_stack_flags

Set the value of this variable to SIP_STACK_DIALOGS to make the stack manage dialogs.

sip_io_pointers

The values in this field provide the connection manager interfaces.

sip_ulp_pointers

The values in this field contain the upper layer registrations. Upper layer registrations are functions that the application must register with the stack during initialization.

sip_function_table

The values in this field are the custom headers that the application registers and the parsing functions that are associated with those headers. The application can specify the following elements for each custom header:

  • header_name

  • header_short_name (optional)

  • header_parse_func

  • header_check_compliance (optional)

  • header_is_equal (optional)

  • header_free