SIP API Developer's Guide

Exit Print View

Updated: July 2014
 
 

SIP Message Sending Function

int sip_sendmsg()sip_conn_object_t obj, sip_msg_t sip_msg, sip_dialog_t sip_dialog, uint32_t flags

The sip_sendmsg() function sends a SIP message to the SIP stack and, subsequently, to the peer. The function passes the connection object that is specified by the value of the obj parameter along with the message that is specified by the value of the sip_msg parameter. This function provides the dialog that is associated with the specified SIP message, if that dialog exists and the SIP stack is maintaining dialogs. This function uses flags to indicate any special processing that the stack needs to do for the specified SIP message. The values of flags are the result of a boolean OR operation performed on the following attributes:

SIP_SEND_STATEFUL

Send the request or response statefully. The stack creates and maintains a transaction for the request or response in compliance with section 17 of RFC 3261.

SIP_DIALOG_ON_FORK

When this flag is set, the stack creates multiple dialogs when the application forks the request. This flag is only meaningful when the stack maintains dialogs. When this flag is not set, only the first dialog creating request creates a dialog.