C# 클래스 SIPLib.SIP.Proxy

This class is used to build a SIP proxy. It extends the Useragent class to allow correct handling of messages when acting as a SIP proxy.
상속: SIPLib.SIP.UserAgent
파일 보기 프로젝트 열기: richardspiers/C-Sharp-Sip-Lib

공개 메소드들

메소드 설명
CreateRequest ( string method, object dest, bool stateless = false, bool recordRoute = false, Dictionary
headers = null, List
route = null ) : Message

Creates a SIP request.

CreateTransaction ( Message request ) : Transaction

Simply passed the request on to the receivedRequest function when acting as a proxy.

Error ( Transaction transaction, string error ) : void

Raises an error (Service unavailable etc)

IsLocal ( SIPURI uri ) : bool

Determines whether the specified URI is local.

Proxy ( SIPStack stack, Message request, bool server ) : System

Initializes a new instance of the T:SIPLib.SIP.Proxy class.

ReceivedRequest ( Transaction transaction, Message request ) : void

Receives the SIP request, modifies headers and passes on to the stack.

ReceivedResponse ( Transaction transaction, Message response ) : void

Receives the SIP response

SendCancel ( ) : void

Sends a SIP cancel request

SendRequest ( Message request ) : void

Sends the SIP request.

SendResponse ( object response, string responseText = "", string content = "", string contentType = "", bool createDialog = true ) : void

Sends a SIP response.

비공개 메소드들

메소드 설명
GetBranch ( Transaction transaction ) : SIPLib.SIP.ProxyBranch

Returns the branch ID for the specified transaction.

RetryNextCandidate ( SIPLib.SIP.ProxyBranch branch ) : void

Retries the next candidate to send to.

SendResponseIfPossible ( ) : void

Sends a SIP response if possible.

TimeOut ( Transaction transaction ) : void

Handles request timeouts

메소드 상세

CreateRequest() 공개 메소드

Creates a SIP request.
public CreateRequest ( string method, object dest, bool stateless = false, bool recordRoute = false, Dictionary
headers = null, List
route = null ) : Message
method string The SIP method.
dest object The dest (either Address or string[]).
stateless bool if set to true [act as a stateless proxy].
recordRoute bool if set to true [record the SIP route].
headers Dictionary
The SIP headers to use.
route List
The route.
리턴 Message

CreateTransaction() 공개 메소드

Simply passed the request on to the receivedRequest function when acting as a proxy.
public CreateTransaction ( Message request ) : Transaction
request Message The request.
리턴 Transaction

Error() 공개 메소드

Raises an error (Service unavailable etc)
public Error ( Transaction transaction, string error ) : void
transaction Transaction The transaction.
error string The error.
리턴 void

IsLocal() 공개 메소드

Determines whether the specified URI is local.
public IsLocal ( SIPURI uri ) : bool
uri SIPURI The URI.
리턴 bool

Proxy() 공개 메소드

Initializes a new instance of the T:SIPLib.SIP.Proxy class.
public Proxy ( SIPStack stack, Message request, bool server ) : System
stack SIPStack The SIP stack to use.
request Message The incoming request to proxy.
server bool if set to true [server].
리턴 System

ReceivedRequest() 공개 메소드

Receives the SIP request, modifies headers and passes on to the stack.
public ReceivedRequest ( Transaction transaction, Message request ) : void
transaction Transaction The transaction.
request Message The request.
리턴 void

ReceivedResponse() 공개 메소드

Receives the SIP response
public ReceivedResponse ( Transaction transaction, Message response ) : void
transaction Transaction The transaction.
response Message The response.
리턴 void

SendCancel() 공개 메소드

Sends a SIP cancel request
public SendCancel ( ) : void
리턴 void

SendRequest() 공개 메소드

Sends the SIP request.
public SendRequest ( Message request ) : void
request Message The request.
리턴 void

SendResponse() 공개 메소드

Sends a SIP response.
public SendResponse ( object response, string responseText = "", string content = "", string contentType = "", bool createDialog = true ) : void
response object The response.
responseText string The response text.
content string The SIP body content.
contentType string Type of the content.
createDialog bool Always false for a Proxy.
리턴 void