C# Class SIPSorcery.Servers.SIPProxyCore

Show file Open project: sipsorcery/sipsorcery Class Usage Examples

Public Properties

Property Type Description
PublicIPAddress System.Net.IPAddress

Public Methods

Method Description
SIPProxyCore ( SIPMonitorLogDelegate proxyLogger, SIPTransport sipTransport, string scriptPath, string appServerEndPointsPath ) : NUnit.Framework

Private Methods

Method Description
GotRequest ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest ) : void

From RFC3261: Stateless Proxy Request Processing: For each target, the proxy forwards the request following these 1. Make a copy of the received request 2. Update the Request-URI 3. Update the Max-Forwards header field 4. Optionally add a Record-route header field value 5. Optionally add additional header fields 6. Postprocess routing information 7. Determine the next-hop address, port, and transport 8. Add a Via header field value 9. Add a Content-Length header field if necessary 10. Forward the new request See sections 12.2.1.1 and 16.12.1.2 in the SIP RFC for the best explanation on the way the Route header works.

GotResponse ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPResponse sipResponse ) : void

From RFC3261: Stateless Proxy Response Processing: When a response arrives at a stateless proxy, the proxy MUST inspect the sent-by value in the first (topmost) Via header field value. If that address matches the proxy, (it equals a value this proxy has inserted into previous requests) the proxy MUST remove that header field value from the response and forward the result to the location indicated in the next Via header field value. The proxy MUST NOT add to, modify, or remove the message body. Unless specified otherwise, the proxy MUST NOT remove any other header field values. If the address does not match the proxy, the message MUST be silently discarded.

SendMonitorEvent ( SIPMonitorEvent monitorEvent ) : void
SendMonitorEvent ( SIPMonitorEventTypesEnum eventType, string message, SIPEndPoint localEndPoint, SIPEndPoint remoteEndPoint, SIPEndPoint dstEndPoint ) : void

Method Details

SIPProxyCore() public method

public SIPProxyCore ( SIPMonitorLogDelegate proxyLogger, SIPTransport sipTransport, string scriptPath, string appServerEndPointsPath ) : NUnit.Framework
proxyLogger SIPMonitorLogDelegate
sipTransport SIPSorcery.SIP.SIPTransport
scriptPath string
appServerEndPointsPath string
return NUnit.Framework

Property Details

PublicIPAddress public property

public IPAddress,System.Net PublicIPAddress
return System.Net.IPAddress