C# Class SIPSorcery.Servers.SIPDialogueManager

Inheritance: ISIPDialogueManager
显示文件 Open project: sipsorcery/sipsorcery Class Usage Examples

Public Properties

Property Type Description
PublicIPAddress System.Net.IPAddress

Public Methods

Method Description
CallHungup ( SIPDialogue sipDialogue, string hangupCause, bool sendBYEForOriginDialogue ) : void

This method takes the necessary actions to terminate a bridged call.

CreateDialogueBridge ( SIPDialogue clientDiaglogue, SIPDialogue forwardedDialogue, string owner ) : void
DialogueTransfer ( SIPDialogue deadDialogue, SIPDialogue orphanedDialogue, SIPDialogue answeredDialogue ) : void

Performs transfer between 3 established dialogues (answered calls). The dead dialogue is being replaced by the answered dialogue such that a bridged call between the dead and orphaned dialogues now becomes one between the orphaned and answered dialogues.

DualTransfer ( string username, string callID1, string callID2 ) : void

An attended transfer between two separate established calls where one leg of each call is being transferred to the other.

GetDialogue ( SIPRequest sipRequest ) : SIPDialogue

Attempts to locate a dialogue for an in-dialogue transaction.

GetDialogue ( string replaces ) : SIPDialogue
GetDialogue ( string callId, string localTag, string remoteTag ) : SIPDialogue
GetDialogueRelaxed ( string owner, string callIdentifier ) : SIPDialogue

This method applies very liberal rules to find a matching dialogue: 1. Treat the call identifier as a Call-ID, 2. If no dialogue matches for that try with the call identifier as the from username on the local user field,

GetOppositeDialogue ( SIPDialogue dialogue ) : SIPDialogue

Retrieves the other end of a call given the dialogue from one end.

ProcessInDialogueReferRequest ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest, SIPDialogue dialogue, Func blindTransfer ) : void
ProcessInDialogueRequest ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest, SIPDialogue dialogue ) : void
ReInvite ( SIPDialogue dialogue, SIPDialogue substituteDialogue ) : void

Attempts to reinvite an existing end of a call by sending a new SDP.

SIPDialogueManager ( SIPTransport sipTransport, SIPEndPoint outboundProxy, SIPMonitorLogDelegate logDelegate, SIPAssetPersistor sipDialoguePersistor, SIPAssetPersistor sipCDRPersistor, SIPAuthenticateRequestDelegate authenticateRequestDelegate, SIPAssetGetDelegate getSIPAccount, GetCanonicalDomainDelegate getCanonicalDomain ) : System

Private Methods

Method Description
AuthenticateReferRequest ( SIPNonInviteTransaction referTransaction, string sipUsername, string sipDomain ) : bool
ForwardInDialogueRequest ( SIPDialogue dialogue, SIPTransaction inDialogueTransaction, SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint ) : void
GetInviteRequest ( SIPDialogue dialogue, SIPEndPoint localSIPEndPoint, string body ) : SIPRequest
GetNotifyRequest ( SIPRequest referRequest, SIPDialogue referDialogue, SIPResponse referResponse, SIPEndPoint localEndPoint ) : SIPRequest

Constructs a NOTIFY request to send within the implicit subscription created when processing a REFER request.

From RFC 3515 2.4.5: The body of a NOTIFY MUST begin with a SIP Response Status-Line...

HangupDialogue ( SIPDialogue dialogue, string hangupCause, bool sendBye ) : void
InDialogueTransactionFinalResponseReceived ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPTransaction sipTransaction, SIPResponse sipResponse ) : void
InDialogueTransactionInfoResponseReceived ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPTransaction sipTransaction, SIPResponse sipResponse ) : void
InDialogueTransactionRemoved ( SIPTransaction sipTransaction ) : void
ProcessAttendedRefer ( SIPDialogue dialogue, SIPNonInviteTransaction referTransaction, SIPRequest referRequest, SIPEndPoint localEndPoint, SIPEndPoint remoteEndPoint ) : void

Performs an attended transfer based on a REFER request with a Replaces parameter on the Refer-To header.

ReInviteTransactionFinalResponseReceived ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPTransaction sipTransaction, SIPResponse sipResponse ) : void
SendNotifyRequestForRefer ( SIPRequest referRequest, SIPDialogue referDialogue, SIPEndPoint localEndPoint, SIPResponseStatusCodesEnum responseCode, string responseReason ) : void

Method Details

CallHungup() public method

This method takes the necessary actions to terminate a bridged call.
public CallHungup ( SIPDialogue sipDialogue, string hangupCause, bool sendBYEForOriginDialogue ) : void
sipDialogue SIPSorcery.SIP.SIPDialogue The dialogue that the BYE request was received on.
hangupCause string If present an informational field to indicate the hangup cause.
sendBYEForOriginDialogue bool If true means a BYE should be sent for the origin dialogue as well. This is used when a 3rd party /// call control agent is attempting to hangup a call.
return void

CreateDialogueBridge() public method

public CreateDialogueBridge ( SIPDialogue clientDiaglogue, SIPDialogue forwardedDialogue, string owner ) : void
clientDiaglogue SIPSorcery.SIP.SIPDialogue
forwardedDialogue SIPSorcery.SIP.SIPDialogue
owner string
return void

DialogueTransfer() public method

Performs transfer between 3 established dialogues (answered calls). The dead dialogue is being replaced by the answered dialogue such that a bridged call between the dead and orphaned dialogues now becomes one between the orphaned and answered dialogues.
public DialogueTransfer ( SIPDialogue deadDialogue, SIPDialogue orphanedDialogue, SIPDialogue answeredDialogue ) : void
deadDialogue SIPSorcery.SIP.SIPDialogue The dialogue that will be terminated.
orphanedDialogue SIPSorcery.SIP.SIPDialogue The opposite side of the dead dialogue that will be bridged with the answered dialogue.
answeredDialogue SIPSorcery.SIP.SIPDialogue The newly answered dialogue that will be bridged with the orpahned dialogue.
return void

DualTransfer() public method

An attended transfer between two separate established calls where one leg of each call is being transferred to the other.
public DualTransfer ( string username, string callID1, string callID2 ) : void
username string
callID1 string The Call-ID of the first call leg that is no longer required and of which the opposite end will be transferred.
callID2 string The Call-ID of the second call leg that is no longer required and of which the opposite end will be transferred.
return void

GetDialogue() public method

Attempts to locate a dialogue for an in-dialogue transaction.
public GetDialogue ( SIPRequest sipRequest ) : SIPDialogue
sipRequest SIPSorcery.SIP.SIPRequest
return SIPSorcery.SIP.SIPDialogue

GetDialogue() public method

public GetDialogue ( string replaces ) : SIPDialogue
replaces string
return SIPSorcery.SIP.SIPDialogue

GetDialogue() public method

public GetDialogue ( string callId, string localTag, string remoteTag ) : SIPDialogue
callId string
localTag string
remoteTag string
return SIPSorcery.SIP.SIPDialogue

GetDialogueRelaxed() public method

This method applies very liberal rules to find a matching dialogue: 1. Treat the call identifier as a Call-ID, 2. If no dialogue matches for that try with the call identifier as the from username on the local user field,
public GetDialogueRelaxed ( string owner, string callIdentifier ) : SIPDialogue
owner string The dialogue owner to use when attempting to find a match.
callIdentifier string A call identifier field to try and match a dialogue against.
return SIPSorcery.SIP.SIPDialogue

GetOppositeDialogue() public method

Retrieves the other end of a call given the dialogue from one end.
public GetOppositeDialogue ( SIPDialogue dialogue ) : SIPDialogue
dialogue SIPSorcery.SIP.SIPDialogue
return SIPSorcery.SIP.SIPDialogue

ProcessInDialogueReferRequest() public method

public ProcessInDialogueReferRequest ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest, SIPDialogue dialogue, Func blindTransfer ) : void
localSIPEndPoint SIPSorcery.SIP.SIPEndPoint
remoteEndPoint SIPSorcery.SIP.SIPEndPoint
sipRequest SIPSorcery.SIP.SIPRequest
dialogue SIPSorcery.SIP.SIPDialogue
blindTransfer Func
return void

ProcessInDialogueRequest() public method

public ProcessInDialogueRequest ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest, SIPDialogue dialogue ) : void
localSIPEndPoint SIPSorcery.SIP.SIPEndPoint
remoteEndPoint SIPSorcery.SIP.SIPEndPoint
sipRequest SIPSorcery.SIP.SIPRequest
dialogue SIPSorcery.SIP.SIPDialogue
return void

ReInvite() public method

Attempts to reinvite an existing end of a call by sending a new SDP.
public ReInvite ( SIPDialogue dialogue, SIPDialogue substituteDialogue ) : void
dialogue SIPSorcery.SIP.SIPDialogue The dialogue describing the end of the call to be re-invited.
substituteDialogue SIPSorcery.SIP.SIPDialogue
return void

SIPDialogueManager() public method

public SIPDialogueManager ( SIPTransport sipTransport, SIPEndPoint outboundProxy, SIPMonitorLogDelegate logDelegate, SIPAssetPersistor sipDialoguePersistor, SIPAssetPersistor sipCDRPersistor, SIPAuthenticateRequestDelegate authenticateRequestDelegate, SIPAssetGetDelegate getSIPAccount, GetCanonicalDomainDelegate getCanonicalDomain ) : System
sipTransport SIPSorcery.SIP.SIPTransport
outboundProxy SIPSorcery.SIP.SIPEndPoint
logDelegate SIPMonitorLogDelegate
sipDialoguePersistor SIPAssetPersistor
sipCDRPersistor SIPAssetPersistor
authenticateRequestDelegate SIPAuthenticateRequestDelegate
getSIPAccount SIPAssetGetDelegate
getCanonicalDomain GetCanonicalDomainDelegate
return System

Property Details

PublicIPAddress public_oe static_oe property

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