Class SipBodyBuilder
Class for building and attaching the contents body of a SIP request or a SIP response message.
Inherited Members
Namespace: SipLib.Body
Assembly: SipLib.dll
Syntax
public class SipBodyBuilder
Remarks
Follow these steps to use this class:
- Create an instance of this class.
- Call the AddContent() method for each content block that needs to be added.
- Call the AttachMessageBody() method with a SIPMessage object to attach the body to.
Methods
| Edit this page View SourceAddContent(string, string, string?, string?)
Adds a new content block to the list of contents.
Declaration
public void AddContent(string contentType, string content, string? contentID, string? contentDisposition)
Parameters
Type | Name | Description |
---|---|---|
string | contentType | Value of the Content-Type header. For example: application/sdp. Required. |
string | content | Sting containing the content to add to the message body. Required. |
string | contentID | Value of the Content-ID header. Optional, may be null. |
string | contentDisposition | Value of the Content-Disposition header. Optional, may be null. |
AttachMessageBody(SIPMessage)
Builds the body of the SIP message from the ContentsList and attaches it to the request body and sets the Content-Type and Content-Length headers in the SIP message.
Declaration
public void AttachMessageBody(SIPMessage Msg)
Parameters
Type | Name | Description |
---|---|---|
SIPMessage | Msg | SIP request message to add the contents to. |