C# 클래스 SIPSorcery.Servers.SIPProxyScriptFacade

파일 보기 프로젝트 열기: sipsorcery/sipsorcery 1 사용 예제들

공개 메소드들

메소드 설명
DispatcherLookup ( SIPRequest sipRequest ) : SIPEndPoint
DispatcherLookup ( SIPResponse sipResponse ) : SIPEndPoint
GetAppServer ( ) : SIPEndPoint
GetDefaultSIPEndPoint ( SIPProtocolsEnum protocol ) : SIPEndPoint
Log ( string message ) : void
Resolve ( SIPRequest sipRequest ) : SIPDNSLookupResult
Resolve ( SIPURI sipURI ) : SIPDNSLookupResult
Resolve ( SIPResponse sipResponse ) : SIPEndPoint
Respond ( SIPRequest sipRequest, SIPResponseStatusCodesEnum responseCode, string reasonPhrase ) : void

Helper method for dynamic proxy runtime script.

SIPProxyScriptFacade ( SIPMonitorLogDelegate proxyLogger, SIPTransport sipTransport, SIPProxyDispatcher dispatcher, GetAppServerDelegate getAppServer ) : NUnit.Framework
SendExternal ( SIPEndPoint receivedOnEP, SIPEndPoint dstSIPEndPoint, SIPRequest sipRequest, string proxyBranch, IPAddress publicIPAddress ) : void

Used to send a request from an internal server agent to an external SIP user agent. The difference between this method and the SendTransparent method is that this one will set Via headers in accordance with RFC3261.

SendExternal ( SIPResponse sipResponse, SIPEndPoint localSIPEndPoint ) : void
SendExternal ( SIPResponse sipResponse, SIPEndPoint localSIPEndPoint, IPAddress publicIPAddress ) : void
SendInternal ( SIPEndPoint receivedFromEP, SIPEndPoint receivedOnEP, SIPResponse sipResponse, SIPEndPoint localSIPEndPoint ) : void
SendInternal ( SIPEndPoint receivedFromEP, SIPEndPoint receivedOnEP, string dstSocket, SIPRequest sipRequest, string proxyBranch, string sendFromSocket ) : void

Used to send a SIP request received from an external user agent to an internal SIP server agent.

SendTransparent ( SIPEndPoint receivedFromEP, SIPEndPoint receivedOnEP, SIPResponse sipResponse, SIPEndPoint localSIPEndPoint, SIPEndPoint dstSIPEndPoint, string proxyBranch ) : void

This method is the equivalent to the same named method for sending SIP requests. The two methods are used to allow the Proxy to deliver requests to external SIP agents with only a SINGLE Via header due to a small number of providers rejecting requests with more than one Via header.

SendTransparent ( SIPEndPoint receivedFromEP, SIPEndPoint receivedOnEP, SIPResponse sipResponse, SIPEndPoint localSIPEndPoint, string dstSIPEndPoint, string proxyBranch ) : void
SendTransparent ( SIPEndPoint dstSIPEndPoint, SIPRequest sipRequest, IPAddress publicIPAddress ) : void

Forwards a SIP request through the Proxy. This method differs from the standard Send in that irrespective of whether the Proxy is receiving and sending on different sockets only a single Via header will ever be allowed on the request. It is then up to the response processing logic to determine from which Proxy socket to forward the request and to add back on the Via header for the end agent. This method is only ever used for requests destined for EXTERNAL SIP end points.

비공개 메소드들

메소드 설명
AdjustContactHeader ( SIPHeader sipHeader, SIPEndPoint localSIPEndPoint, IPAddress publicIPAddress ) : void
IsDestinationValid ( SIPRequest sipRequest, SIPEndPoint dstSIPEndPoint ) : bool
IsDestinationValid ( SIPRequest sipRequest, string dstSIPEndPoint ) : bool

메소드 상세

DispatcherLookup() 공개 메소드

public DispatcherLookup ( SIPRequest sipRequest ) : SIPEndPoint
sipRequest SIPSorcery.SIP.SIPRequest
리턴 SIPSorcery.SIP.SIPEndPoint

DispatcherLookup() 공개 메소드

public DispatcherLookup ( SIPResponse sipResponse ) : SIPEndPoint
sipResponse SIPSorcery.SIP.SIPResponse
리턴 SIPSorcery.SIP.SIPEndPoint

GetAppServer() 공개 메소드

public GetAppServer ( ) : SIPEndPoint
리턴 SIPSorcery.SIP.SIPEndPoint

GetDefaultSIPEndPoint() 공개 메소드

public GetDefaultSIPEndPoint ( SIPProtocolsEnum protocol ) : SIPEndPoint
protocol SIPProtocolsEnum
리턴 SIPSorcery.SIP.SIPEndPoint

Log() 공개 메소드

public Log ( string message ) : void
message string
리턴 void

Resolve() 공개 메소드

public Resolve ( SIPRequest sipRequest ) : SIPDNSLookupResult
sipRequest SIPSorcery.SIP.SIPRequest
리턴 SIPDNSLookupResult

Resolve() 공개 메소드

public Resolve ( SIPURI sipURI ) : SIPDNSLookupResult
sipURI SIPSorcery.SIP.SIPURI
리턴 SIPDNSLookupResult

Resolve() 공개 메소드

public Resolve ( SIPResponse sipResponse ) : SIPEndPoint
sipResponse SIPSorcery.SIP.SIPResponse
리턴 SIPSorcery.SIP.SIPEndPoint

Respond() 공개 메소드

Helper method for dynamic proxy runtime script.
public Respond ( SIPRequest sipRequest, SIPResponseStatusCodesEnum responseCode, string reasonPhrase ) : void
sipRequest SIPSorcery.SIP.SIPRequest
responseCode SIPResponseStatusCodesEnum
reasonPhrase string
리턴 void

SIPProxyScriptFacade() 공개 메소드

public SIPProxyScriptFacade ( SIPMonitorLogDelegate proxyLogger, SIPTransport sipTransport, SIPProxyDispatcher dispatcher, GetAppServerDelegate getAppServer ) : NUnit.Framework
proxyLogger SIPMonitorLogDelegate
sipTransport SIPSorcery.SIP.SIPTransport
dispatcher SIPProxyDispatcher
getAppServer GetAppServerDelegate
리턴 NUnit.Framework

SendExternal() 공개 메소드

Used to send a request from an internal server agent to an external SIP user agent. The difference between this method and the SendTransparent method is that this one will set Via headers in accordance with RFC3261.
public SendExternal ( SIPEndPoint receivedOnEP, SIPEndPoint dstSIPEndPoint, SIPRequest sipRequest, string proxyBranch, IPAddress publicIPAddress ) : void
receivedOnEP SIPSorcery.SIP.SIPEndPoint The proxy SIP end point the request was received on.
dstSIPEndPoint SIPSorcery.SIP.SIPEndPoint
sipRequest SIPSorcery.SIP.SIPRequest The SIP request to send.
proxyBranch string The branch parameter for the top Via header that has been pre-calculated by the proxy core.
publicIPAddress System.Net.IPAddress
리턴 void

SendExternal() 공개 메소드

public SendExternal ( SIPResponse sipResponse, SIPEndPoint localSIPEndPoint ) : void
sipResponse SIPSorcery.SIP.SIPResponse
localSIPEndPoint SIPSorcery.SIP.SIPEndPoint
리턴 void

SendExternal() 공개 메소드

public SendExternal ( SIPResponse sipResponse, SIPEndPoint localSIPEndPoint, IPAddress publicIPAddress ) : void
sipResponse SIPSorcery.SIP.SIPResponse
localSIPEndPoint SIPSorcery.SIP.SIPEndPoint
publicIPAddress System.Net.IPAddress
리턴 void

SendInternal() 공개 메소드

public SendInternal ( SIPEndPoint receivedFromEP, SIPEndPoint receivedOnEP, SIPResponse sipResponse, SIPEndPoint localSIPEndPoint ) : void
receivedFromEP SIPSorcery.SIP.SIPEndPoint
receivedOnEP SIPSorcery.SIP.SIPEndPoint
sipResponse SIPSorcery.SIP.SIPResponse
localSIPEndPoint SIPSorcery.SIP.SIPEndPoint
리턴 void

SendInternal() 공개 메소드

Used to send a SIP request received from an external user agent to an internal SIP server agent.
public SendInternal ( SIPEndPoint receivedFromEP, SIPEndPoint receivedOnEP, string dstSocket, SIPRequest sipRequest, string proxyBranch, string sendFromSocket ) : void
receivedFromEP SIPSorcery.SIP.SIPEndPoint The SIP end point the proxy received the request from.
receivedOnEP SIPSorcery.SIP.SIPEndPoint The SIP end point the proxy received the request on.
dstSocket string The internal socket to send the request to.
sipRequest SIPSorcery.SIP.SIPRequest The SIP request to send.
proxyBranch string The branch to set on the Via header when sending the request. The branch should be calculated /// by the proxy core so that looped requests can be detected.
sendFromSocket string The proxy socket to send the request from.
리턴 void

SendTransparent() 공개 메소드

This method is the equivalent to the same named method for sending SIP requests. The two methods are used to allow the Proxy to deliver requests to external SIP agents with only a SINGLE Via header due to a small number of providers rejecting requests with more than one Via header.
public SendTransparent ( SIPEndPoint receivedFromEP, SIPEndPoint receivedOnEP, SIPResponse sipResponse, SIPEndPoint localSIPEndPoint, SIPEndPoint dstSIPEndPoint, string proxyBranch ) : void
receivedFromEP SIPSorcery.SIP.SIPEndPoint The socket the response was received from.
receivedOnEP SIPSorcery.SIP.SIPEndPoint The proxy socket the response was received on.
sipResponse SIPSorcery.SIP.SIPResponse The response being forwarded.
localSIPEndPoint SIPSorcery.SIP.SIPEndPoint The proxy socket to forward the request from.
dstSIPEndPoint SIPSorcery.SIP.SIPEndPoint The internal destination socket to forward the response to.
proxyBranch string The branch parameter from the top Via header that needs to be reused when forwarding the response.
리턴 void

SendTransparent() 공개 메소드

public SendTransparent ( SIPEndPoint receivedFromEP, SIPEndPoint receivedOnEP, SIPResponse sipResponse, SIPEndPoint localSIPEndPoint, string dstSIPEndPoint, string proxyBranch ) : void
receivedFromEP SIPSorcery.SIP.SIPEndPoint
receivedOnEP SIPSorcery.SIP.SIPEndPoint
sipResponse SIPSorcery.SIP.SIPResponse
localSIPEndPoint SIPSorcery.SIP.SIPEndPoint
dstSIPEndPoint string
proxyBranch string
리턴 void

SendTransparent() 공개 메소드

Forwards a SIP request through the Proxy. This method differs from the standard Send in that irrespective of whether the Proxy is receiving and sending on different sockets only a single Via header will ever be allowed on the request. It is then up to the response processing logic to determine from which Proxy socket to forward the request and to add back on the Via header for the end agent. This method is only ever used for requests destined for EXTERNAL SIP end points.
public SendTransparent ( SIPEndPoint dstSIPEndPoint, SIPRequest sipRequest, IPAddress publicIPAddress ) : void
dstSIPEndPoint SIPSorcery.SIP.SIPEndPoint The destination SIP socket to send the request to.
sipRequest SIPSorcery.SIP.SIPRequest The SIP request to send.
publicIPAddress System.Net.IPAddress
리턴 void