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:
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.
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.