-
Notifications
You must be signed in to change notification settings - Fork 410
/
ISIPServerUserAgent.cs
56 lines (50 loc) · 2.86 KB
/
ISIPServerUserAgent.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//-----------------------------------------------------------------------------
// Filename: ISIPServerUserAgent.cs
//
// Description: The interface definition for SIP Server User Agents (UAS).
// Author(s):
// Aaron Clauson (aaron@sipsorcery.com)
//
// History:
// 30 Aug 2009 Aaron Clauson Created, Hobart, Australia.
// rj2: added overloads for Answer/Reject/Redirect-methods with/out customHeader
//
// License:
// BSD 3-Clause "New" or "Revised" License, see included LICENSE.md file.
//-----------------------------------------------------------------------------
namespace SIPSorcery.SIP.App
{
public delegate void SIPUASDelegate(ISIPServerUserAgent uas);
public delegate void SIPUASCancelDelegate(ISIPServerUserAgent uas, SIPRequest cancelRequest);
/// <summary>
/// Interface for classes implementing SIP server user agent functionality. The
/// main function of a SIP client user agent is the ability to receive calls.
/// </summary>
public interface ISIPServerUserAgent
{
SIPCallDirection CallDirection { get; }
SIPDialogue SIPDialogue { get; }
UASInviteTransaction ClientTransaction { get; }
ISIPAccount SIPAccount { get; set; }
bool IsAuthenticated { get; set; }
bool IsB2B { get; }
bool IsInvite { get; } // Set to true for server user agents that are handling an INVITE request.
SIPRequest CallRequest { get; }
string CallDestination { get; }
bool IsUASAnswered { get; }
event SIPUASCancelDelegate CallCancelled;
event SIPUASDelegate NoRingTimeout;
bool AuthenticateCall();
void Progress(SIPResponseStatusCodesEnum progressStatus, string reasonPhrase, string[] customHeaders, string progressContentType, string progressBody);
SIPDialogue Answer(string contentType, string body, SIPDialogueTransferModesEnum transferMode);
SIPDialogue Answer(string contentType, string body, string toTag, SIPDialogueTransferModesEnum transferMode);
SIPDialogue Answer(string contentType, string body, SIPDialogueTransferModesEnum transferMode, string[] customHeaders);
SIPDialogue Answer(string contentType, string body, string toTag, SIPDialogueTransferModesEnum transferMode, string[] customHeaders);
void Reject(SIPResponseStatusCodesEnum failureStatus, string reasonPhrase);
void Reject(SIPResponseStatusCodesEnum failureStatus, string reasonPhrase, string[] customHeaders);
void Redirect(SIPResponseStatusCodesEnum redirectCode, SIPURI redirectURI);
void Redirect(SIPResponseStatusCodesEnum redirectCode, SIPURI redirectURI, string[] customHeaders);
void NoCDR();
void AnswerNonInvite(SIPResponseStatusCodesEnum answerStatus, string reasonPhrase, string[] customHeaders, string contentType, string body);
}
}