mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
feat: add Dial method with password support and implement ICodecCallControlsMessenger for call control messaging
This commit is contained in:
parent
8748157362
commit
b945ecb470
7 changed files with 57 additions and 8 deletions
|
|
@ -18,4 +18,11 @@ public interface ICodecCallControls : IHasDialer
|
|||
/// </summary>
|
||||
/// <param name="meeting">The meeting to dial</param>
|
||||
void Dial(Meeting meeting);
|
||||
|
||||
/// <summary>
|
||||
/// Dials the specified number with an optional password
|
||||
/// </summary>
|
||||
/// <param name="number">The number to dial</param>
|
||||
/// <param name="password">The optional password for the call</param>
|
||||
void Dial(string number, string password);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,6 +205,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||
|
||||
}
|
||||
|
||||
public override void Dial(string number, string password)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Dial: {0} with password: {1}", number, password);
|
||||
var call = new CodecActiveCallItem() { Name = number, Number = number, Id = number, Status = eCodecCallStatus.Dialing, Direction = eCodecCallDirection.Outgoing, Type = eCodecCallType.Video };
|
||||
ActiveCalls.Add(call);
|
||||
OnCallStatusChange(call);
|
||||
//ActiveCallCountFeedback.FireUpdate();
|
||||
// Simulate 2-second ring, then connecting, then connected
|
||||
var dialTimer = new Timer(2000) { AutoReset = false };
|
||||
dialTimer.Elapsed += (s, e) =>
|
||||
{
|
||||
call.Type = eCodecCallType.Video;
|
||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Connecting, call);
|
||||
var connectTimer = new Timer(1000) { AutoReset = false };
|
||||
connectTimer.Elapsed += (ss, ee) => SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Connected, call);
|
||||
connectTimer.Start();
|
||||
};
|
||||
dialTimer.Start();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void EndCall(CodecActiveCallItem call)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -272,6 +272,8 @@ public abstract class VideoCodecBase : ReconfigurableDevice, IRoutingSource,
|
|||
/// </summary>
|
||||
public abstract void Dial(string number);
|
||||
|
||||
public abstract void Dial(string number, string password);
|
||||
|
||||
/// <summary>
|
||||
/// Ends the specified call
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue