C# 클래스 SIPLib.SIP.Message

This class is used to represent a SIP message (both request and response messages).
파일 보기 프로젝트 열기: richardspiers/C-Sharp-Sip-Lib 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
StatusCodeType StatusCodes
had_lr bool

공개 메소드들

메소드 설명
CreateRequest ( string method, SIPURI uri, Dictionary
headers = null, string content = "" ) : Message

Creates a SIP request message based on the passed in parameters.

CreateResponse ( int responseCode, string responseText, Dictionary
headers = null, string content = "", Message originalRequest = null ) : Message

Creates a SIP response based on the passed in parameters.

Dup ( ) : Message

Creates a clone of this Header object.

First ( string name ) : SIPLib.SIP.Header

Helper function to return the first instance of a particular header.

InsertHeader ( SIPLib.SIP.Header header, string method = "replace" ) : void

Inserts a header into the SIP message by either replacing the existing header, appending it at the end of its own header list, or inserting at the front of its own header list depending on the method specified.

Is1XX ( ) : bool

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)

Is2XX ( ) : bool

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)

Is3XX ( ) : bool

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)

Is4XX ( ) : bool

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)

Is5XX ( ) : bool

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)

Is6XX ( ) : bool

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)

Is7XX ( ) : bool

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)

IsFinal ( ) : bool

Determines whether this instance is final (response code >= 200).

Message ( ) : System

Initializes a new, empty instance of the T:SIPLib.SIP.Message class.

Message ( string value ) : System

Initializes a new instance of the T:SIPLib.SIP.Message class based on a input string.

Parse ( string value ) : void

Parses the input string into a SIP message object.

PopulateMessage ( Message m, Dictionary
headers = null, string content = "" ) : Message

Populates the message - inserts the input list of headers into the message

ToString ( ) : string

Returns a System.String that represents this instance. For easy printing / reading.

비공개 메소드들

메소드 설명
HandleVia ( List
headers ) : string

Creates the multi line representation of the via header list.

Init ( ) : void

Initilises the Message private variables.

메소드 상세

CreateRequest() 공개 정적인 메소드

Creates a SIP request message based on the passed in parameters.
public static CreateRequest ( string method, SIPURI uri, Dictionary
headers = null, string content = "" ) : Message
method string The SIP method to use.
uri SIPURI The destination URI used in the first line.
headers Dictionary
The SIP headers.
content string The SIP body content.
리턴 Message

CreateResponse() 공개 정적인 메소드

Creates a SIP response based on the passed in parameters.
public static CreateResponse ( int responseCode, string responseText, Dictionary
headers = null, string content = "", Message originalRequest = null ) : Message
responseCode int The response code (200 etc.)
responseText string The response text (OK etc.)
headers Dictionary
The SIP headers.
content string The SIP body content.
originalRequest Message The original request.
리턴 Message

Dup() 공개 메소드

Creates a clone of this Header object.
public Dup ( ) : Message
리턴 Message

First() 공개 메소드

Helper function to return the first instance of a particular header.
public First ( string name ) : SIPLib.SIP.Header
name string The name.
리턴 SIPLib.SIP.Header

InsertHeader() 공개 메소드

Inserts a header into the SIP message by either replacing the existing header, appending it at the end of its own header list, or inserting at the front of its own header list depending on the method specified.
public InsertHeader ( SIPLib.SIP.Header header, string method = "replace" ) : void
header SIPLib.SIP.Header The header to insert.
method string The method - "replace", "append" or "insert". "replace" is the default.
리턴 void

Is1XX() 공개 메소드

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)
public Is1XX ( ) : bool
리턴 bool

Is2XX() 공개 메소드

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)
public Is2XX ( ) : bool
리턴 bool

Is3XX() 공개 메소드

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)
public Is3XX ( ) : bool
리턴 bool

Is4XX() 공개 메소드

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)
public Is4XX ( ) : bool
리턴 bool

Is5XX() 공개 메소드

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)
public Is5XX ( ) : bool
리턴 bool

Is6XX() 공개 메소드

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)
public Is6XX ( ) : bool
리턴 bool

Is7XX() 공개 메소드

Helper function to indicate type of SIP response message (Informational, Successful, ClientFailure etc.)
public Is7XX ( ) : bool
리턴 bool

IsFinal() 공개 메소드

Determines whether this instance is final (response code >= 200).
public IsFinal ( ) : bool
리턴 bool

Message() 공개 메소드

Initializes a new, empty instance of the T:SIPLib.SIP.Message class.
public Message ( ) : System
리턴 System

Message() 공개 메소드

Initializes a new instance of the T:SIPLib.SIP.Message class based on a input string.
public Message ( string value ) : System
value string The SIP message as a string.
리턴 System

Parse() 공개 메소드

Parses the input string into a SIP message object.
public Parse ( string value ) : void
value string The value.
리턴 void

PopulateMessage() 공개 정적인 메소드

Populates the message - inserts the input list of headers into the message
public static PopulateMessage ( Message m, Dictionary
headers = null, string content = "" ) : Message
m Message The message being populated.
headers Dictionary
The headers to insert.
content string The SIP body content.
리턴 Message

ToString() 공개 메소드

Returns a System.String that represents this instance. For easy printing / reading.
public ToString ( ) : string
리턴 string

프로퍼티 상세

StatusCodeType 공개적으로 프로퍼티

The status code type (Informational, Successful, ClientFailure etc.)
public StatusCodes StatusCodeType
리턴 StatusCodes

had_lr 공개적으로 프로퍼티

Indication of loose routing.
public bool had_lr
리턴 bool