C# Class SIPSorcery.Servers.RegistrarCore

The registrar core is the class that actually does the work of receiving registration requests and populating and maintaining the SIP registrations list. From RFC 3261 Chapter "10.2 Constructing the REGISTER Request" - Request-URI: The Request-URI names the domain of the location service for which the registration is meant. - The To header field contains the address of record whose registration is to be created, queried, or modified. The To header field and the Request-URI field typically differ, as the former contains a user name. [ed Therefore: - The Request-URI inidcates the domain for the registration and should match the domain in the To address of record. - The To address of record contians the username of the user that is attempting to authenticate the request.] Method of operation: - New SIP messages received by the SIP Transport layer and queued before being sent to RegistrarCode for processing. For requests or response that match an existing REGISTER transaction the SIP Transport layer will handle the retransmit or drop the request if it's already being processed. - Any non-REGISTER requests received by the RegistrarCore are responded to with not supported, - If a persistence is being used to store registered contacts there will generally be a number of threads running for the persistence class. Of those threads there will be one that runs calling the SIPRegistrations.IdentifyDirtyContacts. This call identifies expired contacts and initiates the sending of any keep alive and OPTIONs requests.
ファイルを表示 Open project: sipsorcery/sipsorcery Class Usage Examples

Public Properties

Property Type Description
Stop bool

Public Methods

Method Description
AddRegisterRequest ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest registerRequest ) : void
RegistrarCore ( SIPTransport sipTransport, SIPRegistrarBindingsManager registrarBindingsManager, SIPAssetGetDelegate getSIPAccount, GetCanonicalDomainDelegate getCanonicalDomain, bool mangleUACContact, bool strictRealmHandling, SIPMonitorLogDelegate proxyLogDelegate, SIPSorcery.Servers.SIPUserAgentConfigurationManager userAgentConfigs, SIPAuthenticateRequestDelegate sipRequestAuthenticator, string switchboarduserAgentPrefix, SIPAssetPersistor customerPersistor ) : NUnit.Framework
Start ( int threadCount ) : void

Private Methods

Method Description
FireProxyLogEvent ( SIPMonitorEvent monitorEvent ) : void
GetAuthReqdResponse ( SIPRequest sipRequest, string nonce, string realm ) : SIPResponse
GetBindingExpiry ( List bindings, string bindingURI ) : int
GetContactHeader ( List bindings ) : List

Gets a SIP contact header for this address-of-record based on the bindings list.

GetErrorResponse ( SIPRequest sipRequest, SIPResponseStatusCodesEnum errorResponseCode, string errorMessage ) : SIPResponse
GetOkResponse ( SIPRequest sipRequest ) : SIPResponse
GetRequestedExpiry ( SIPRequest registerRequest ) : int
ProcessRegisterRequest ( string threadName ) : void
Register ( SIPTransaction registerTransaction ) : RegisterResultEnum

Method Details

AddRegisterRequest() public method

public AddRegisterRequest ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest registerRequest ) : void
localSIPEndPoint SIPSorcery.SIP.SIPEndPoint
remoteEndPoint SIPSorcery.SIP.SIPEndPoint
registerRequest SIPSorcery.SIP.SIPRequest
return void

RegistrarCore() public method

public RegistrarCore ( SIPTransport sipTransport, SIPRegistrarBindingsManager registrarBindingsManager, SIPAssetGetDelegate getSIPAccount, GetCanonicalDomainDelegate getCanonicalDomain, bool mangleUACContact, bool strictRealmHandling, SIPMonitorLogDelegate proxyLogDelegate, SIPSorcery.Servers.SIPUserAgentConfigurationManager userAgentConfigs, SIPAuthenticateRequestDelegate sipRequestAuthenticator, string switchboarduserAgentPrefix, SIPAssetPersistor customerPersistor ) : NUnit.Framework
sipTransport SIPSorcery.SIP.SIPTransport
registrarBindingsManager SIPRegistrarBindingsManager
getSIPAccount SIPAssetGetDelegate
getCanonicalDomain GetCanonicalDomainDelegate
mangleUACContact bool
strictRealmHandling bool
proxyLogDelegate SIPMonitorLogDelegate
userAgentConfigs SIPSorcery.Servers.SIPUserAgentConfigurationManager
sipRequestAuthenticator SIPAuthenticateRequestDelegate
switchboarduserAgentPrefix string
customerPersistor SIPAssetPersistor
return NUnit.Framework

Start() public method

public Start ( int threadCount ) : void
threadCount int
return void

Property Details

Stop public_oe property

public bool Stop
return bool