mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
Updates to codec interfaces to handle active calls
This commit is contained in:
parent
95a6f3948f
commit
b0fd837cdc
6 changed files with 38 additions and 11 deletions
|
|
@ -14,10 +14,10 @@ namespace PepperDash.Essentials.Core
|
||||||
// Add requirements for Dialer functionality
|
// Add requirements for Dialer functionality
|
||||||
|
|
||||||
void Dial(string number);
|
void Dial(string number);
|
||||||
void EndCall();
|
void EndCall(object activeCall);
|
||||||
|
void EndAllCalls();
|
||||||
void AcceptCall();
|
void AcceptCall();
|
||||||
void RejectCall();
|
void RejectCall();
|
||||||
|
|
||||||
void SendDtmf(string digit);
|
void SendDtmf(string digit);
|
||||||
|
|
||||||
IntFeedback ActiveCallCountFeedback { get; }
|
IntFeedback ActiveCallCountFeedback { get; }
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||||
|
|
||||||
private CiscoCodecStatus.RootObject CodecStatus;
|
private CiscoCodecStatus.RootObject CodecStatus;
|
||||||
|
|
||||||
private CiscoCodecEvents.RootObject CodecEvent;
|
private CiscoCodecEvents.RootObject CodecEvent;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets and returns the scaled volume of the codec
|
/// Gets and returns the scaled volume of the codec
|
||||||
|
|
@ -551,9 +551,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||||
SendText(string.Format("xCommand Dial BookingId: {0}", s));
|
SendText(string.Format("xCommand Dial BookingId: {0}", s));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void EndCall()
|
public override void EndCall(CodecActiveCallItem activeCall)
|
||||||
{
|
{
|
||||||
SendText(string.Format("xCommand Call Disconnect CallId: {0}", GetCallId()));
|
SendText(string.Format("xCommand Call Disconnect CallId: {0}", activeCall.Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void EndAllCalls()
|
||||||
|
{
|
||||||
|
foreach (CodecActiveCallItem activeCall in ActiveCalls)
|
||||||
|
{
|
||||||
|
SendText(string.Format("xCommand Call Disconnect CallId: {0}", activeCall.Id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AcceptCall()
|
public override void AcceptCall()
|
||||||
|
|
|
||||||
|
|
@ -9,15 +9,24 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
{
|
{
|
||||||
public class CodecActiveCallItem
|
public class CodecActiveCallItem
|
||||||
{
|
{
|
||||||
public string Name { get; private set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public string Number { get; private set; }
|
public string Number { get; set; }
|
||||||
|
|
||||||
public eCodecCallType Type { get; private set; }
|
public eCodecCallType Type { get; set; }
|
||||||
|
|
||||||
|
public eCodecCallStatus Status { get; set; }
|
||||||
|
|
||||||
|
public string Id { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum eCodecCallType
|
public enum eCodecCallType
|
||||||
{
|
{
|
||||||
None, Audio, Video
|
None, Audio, Video
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum eCodecCallStatus
|
||||||
|
{
|
||||||
|
Dialing, Established, Incoming
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -99,11 +99,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void EndCall()
|
public override void EndCall(CodecActiveCallItem activeCall)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "EndCall");
|
Debug.Console(1, this, "EndCall");
|
||||||
//_InCall = false;
|
//_InCall = false;
|
||||||
//IsInCall.FireUpdate();
|
//IsInCall.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void EndAllCalls()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
#region IHasDialer Members
|
#region IHasDialer Members
|
||||||
|
|
||||||
public abstract void Dial(string s);
|
public abstract void Dial(string s);
|
||||||
public abstract void EndCall();
|
public void EndCall(object activeCall)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public abstract void EndCall(CodecActiveCallItem activeCall);
|
||||||
|
public abstract void EndAllCalls();
|
||||||
public abstract void AcceptCall();
|
public abstract void AcceptCall();
|
||||||
public abstract void RejectCall();
|
public abstract void RejectCall();
|
||||||
public abstract void SendDtmf(string s);
|
public abstract void SendDtmf(string s);
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||||
void ConnectPress()
|
void ConnectPress()
|
||||||
{
|
{
|
||||||
if (Codec.IsInCall)
|
if (Codec.IsInCall)
|
||||||
Codec.EndCall();
|
Codec.EndAllCalls();
|
||||||
else
|
else
|
||||||
Codec.Dial(DialStringBuilder.ToString());
|
Codec.Dial(DialStringBuilder.ToString());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue