SIP API Developer's Guide

Exit Print View

Updated: July 2014
 
 

Receiving Messages

The Connection Manager delivers new packets to the stack by calling the sip_process_new_packet(). After processing the message, the stack calls the receive callback function to pass the message to the application. The application must register the receive callback function with the stack at initialization. The stack frees the message and releases the connection object when the application's receive function returns. To queue a message, an application must manage the reference counts on the connection object as described in the Caching Connection Objects section. The application uses the sip_hold_msg() and sip_free_msg() functions to manage a SIP message's reference counts.