mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-01 05:44:55 +00:00
Compare commits
27 Commits
1.6.5-alph
...
1.6.5-hotf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
061109c901 | ||
|
|
f95b50c99d | ||
|
|
def5cc273c | ||
|
|
e01d2c9569 | ||
|
|
415dbbb195 | ||
|
|
765d90214d | ||
|
|
36fd1dcda9 | ||
|
|
812b9b731b | ||
|
|
e80a68485d | ||
|
|
535f4ccb8e | ||
|
|
7bbdf43452 | ||
|
|
59881d6b3b | ||
|
|
085e198409 | ||
|
|
81f27fcbde | ||
|
|
50dae0ef69 | ||
|
|
e0fdefa28e | ||
|
|
f6a826505c | ||
|
|
68ac506a25 | ||
|
|
1150d9e497 | ||
|
|
633a946f26 | ||
|
|
8e01455140 | ||
|
|
b373ab8708 | ||
|
|
cb752850ff | ||
|
|
08c929699f | ||
|
|
1862090a89 | ||
|
|
1ea80c3fab | ||
|
|
1676f5a956 |
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@@ -60,7 +60,7 @@ jobs:
|
||||
- name: Build Solution
|
||||
shell: powershell
|
||||
run: |
|
||||
Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder:v1.4.1 c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"
|
||||
Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"
|
||||
# Zip up the output files as needed
|
||||
- name: Zip Build Output
|
||||
shell: powershell
|
||||
|
||||
@@ -760,6 +760,46 @@ namespace PepperDash_Essentials_Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("DialPhoneCall")]
|
||||
public JoinDataComplete DialPhone =
|
||||
new JoinDataComplete(new JoinData { JoinNumber = 72, JoinSpan = 1 },
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Dial Phone",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("PhoneHookState")]
|
||||
public JoinDataComplete PhoneHookState =
|
||||
new JoinDataComplete(new JoinData { JoinNumber = 72, JoinSpan = 1 },
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Dial Phone",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("EndPhoneCall")]
|
||||
public JoinDataComplete HangUpPhone =
|
||||
new JoinDataComplete(new JoinData { JoinNumber = 73, JoinSpan = 1 },
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Hang Up PHone",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("PhoneString")]
|
||||
public JoinDataComplete PhoneDialString =
|
||||
new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Phone Dial String",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
public VideoCodecControllerJoinMap(uint joinStart) : base(joinStart, typeof (VideoCodecControllerJoinMap))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -73,21 +73,21 @@ namespace PepperDash.Essentials.Core.CrestronIO.Cards
|
||||
string cardType;
|
||||
if (!_config.Cards.TryGetValue(i, out cardType))
|
||||
{
|
||||
Debug.Console(1, this, "No card found for slot {0}", i);
|
||||
Debug.Console(0, this, "No card found for slot {0}", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(cardType))
|
||||
{
|
||||
Debug.Console(0, this, "No card specified for slot {0}", i);
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
Func<uint, C3CardControllerBase> cardBuilder;
|
||||
if (!_cardDict.TryGetValue(cardType.ToLower(), out cardBuilder))
|
||||
{
|
||||
Debug.Console(0, "Unable to find factory for 3-Series card type {0}.", cardType);
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
|
||||
{
|
||||
public interface IHasPhoneDialing
|
||||
{
|
||||
BoolFeedback PhoneOffHookFeedback { get; }
|
||||
StringFeedback CallerIdNameFeedback { get; }
|
||||
StringFeedback CallerIdNumberFeedback { get; }
|
||||
void DialPhoneCall(string number);
|
||||
void EndPhoneCall();
|
||||
void SendDtmfToPhone(string digit);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
|
||||
{
|
||||
public interface ILanguageDefinition
|
||||
{
|
||||
string LocaleName { get; set; }
|
||||
string FriendlyName { get; set; }
|
||||
bool Enable { get; set; }
|
||||
List<LanguageLabel> UiLabels { get; set; }
|
||||
List<LanguageLabel> Sources { get; set; }
|
||||
List<LanguageLabel> Destinations { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
|
||||
{
|
||||
public interface ILanguageProvider
|
||||
{
|
||||
ILanguageDefinition CurrentLanguage { get; set; }
|
||||
|
||||
event EventHandler CurrentLanguageChanged;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
|
||||
{
|
||||
public class LanguageLabel
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string DisplayText { get; set; }
|
||||
public uint JoinNumber { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -195,8 +195,12 @@
|
||||
<Compile Include="Devices\PC\Laptop.cs" />
|
||||
<Compile Include="Devices\ReconfigurableDevice.cs" />
|
||||
<Compile Include="Devices\VolumeDeviceChangeEventArgs.cs" />
|
||||
<Compile Include="DeviceTypeInterfaces\LanguageLabel.cs" />
|
||||
<Compile Include="DeviceTypeInterfaces\ILanguageProvider.cs" />
|
||||
<Compile Include="DeviceTypeInterfaces\IHasBranding.cs" />
|
||||
<Compile Include="DeviceTypeInterfaces\ILanguageDefinition.cs" />
|
||||
<Compile Include="DeviceTypeInterfaces\IHasFarEndContentStatus.cs" />
|
||||
<Compile Include="DeviceTypeInterfaces\IHasPhoneDialing.cs" />
|
||||
<Compile Include="DeviceTypeInterfaces\IMobileControl.cs" />
|
||||
<Compile Include="Factory\DeviceFactory.cs" />
|
||||
<Compile Include="Factory\IDeviceFactory.cs" />
|
||||
|
||||
@@ -251,6 +251,12 @@ namespace PepperDash.Essentials.Core
|
||||
tl.StringInput[sigNum].StringValue = value;
|
||||
}
|
||||
|
||||
public static void SetString(this BasicTriList tl, uint sigNum, string value, eStringEncoding encoding)
|
||||
{
|
||||
tl.StringInput[sigNum].StringEncoding = encoding;
|
||||
tl.StringInput[sigNum].StringValue = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns bool value of trilist sig
|
||||
/// </summary>
|
||||
|
||||
@@ -221,6 +221,10 @@ namespace PepperDash.Essentials.DM
|
||||
DmRmcPropertiesConfig props, string pKey, uint ipid)
|
||||
{
|
||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
||||
if (parentDev is DmpsRoutingController)
|
||||
{
|
||||
return GetDmRmcControllerForDmps(key, name, typeName, parentDev as DmpsRoutingController, props.ParentOutputNumber);
|
||||
}
|
||||
if (!(parentDev is IDmSwitch))
|
||||
{
|
||||
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a DM Chassis.",
|
||||
@@ -285,6 +289,26 @@ namespace PepperDash.Essentials.DM
|
||||
return null;
|
||||
}
|
||||
|
||||
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps(string key, string name, string typeName,
|
||||
DmpsRoutingController controller, uint num)
|
||||
{
|
||||
Func<string, string, DMOutput, CrestronGenericBaseDevice> dmpsHandler;
|
||||
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out dmpsHandler))
|
||||
{
|
||||
var output = controller.Dmps.SwitcherOutputs[num] as DMOutput;
|
||||
|
||||
if (output != null)
|
||||
{
|
||||
return dmpsHandler(key, name, output);
|
||||
}
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot attach DM-RMC of type '{0}' to output {1} on DMPS chassis. Output is not a DM Output", typeName, num);
|
||||
return null;
|
||||
}
|
||||
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot create DM-RMC of type '{0}' to output {1} on DMPS chassis", typeName, num);
|
||||
return null;
|
||||
}
|
||||
|
||||
private static CrestronGenericBaseDevice GetDmRmcControllerForProcessor(string key, string name, string typeName, uint ipid)
|
||||
{
|
||||
try
|
||||
@@ -305,6 +329,8 @@ namespace PepperDash.Essentials.DM
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class DmRmcControllerFactory : EssentialsDeviceFactory<DmRmcControllerBase>
|
||||
|
||||
@@ -19,6 +19,7 @@ using PepperDash.Essentials.Devices.Common.Cameras;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
|
||||
using PepperDash_Essentials_Core.Bridges.JoinMaps;
|
||||
using PepperDash_Essentials_Core.DeviceTypeInterfaces;
|
||||
using Feedback = PepperDash.Essentials.Core.Feedback;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
@@ -348,6 +349,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
(codec as IHasFarEndContentStatus).ReceivingContent.LinkInputSig(trilist.BooleanInput[joinMap.RecievingContent.JoinNumber]);
|
||||
}
|
||||
|
||||
if (codec is IHasPhoneDialing)
|
||||
{
|
||||
LinkVideoCodecPhoneToApi(codec as IHasPhoneDialing, trilist, joinMap);
|
||||
}
|
||||
|
||||
trilist.OnlineStatusChange += (device, args) =>
|
||||
{
|
||||
if (!args.DeviceOnLine) return;
|
||||
@@ -389,6 +395,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
(codec as IHasCameraOff).CameraIsOffFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
if (codec is IHasPhoneDialing)
|
||||
{
|
||||
(codec as IHasPhoneDialing).PhoneOffHookFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
SharingContentIsOnFeedback.FireUpdate();
|
||||
|
||||
trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall);
|
||||
@@ -397,6 +408,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
};
|
||||
}
|
||||
|
||||
private void LinkVideoCodecPhoneToApi(IHasPhoneDialing codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
codec.PhoneOffHookFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PhoneHookState.JoinNumber]);
|
||||
|
||||
trilist.SetSigFalseAction(joinMap.DialPhone.JoinNumber,
|
||||
() => codec.DialPhoneCall(trilist.StringOutput[joinMap.PhoneDialString.JoinNumber].StringValue));
|
||||
|
||||
trilist.SetSigFalseAction(joinMap.HangUpPhone.JoinNumber, codec.EndPhoneCall);
|
||||
}
|
||||
|
||||
private void LinkVideoCodecSelfviewPositionToApi(IHasSelfviewPosition codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
trilist.SetSigFalseAction(joinMap.SelfviewPosition.JoinNumber, codec.SelfviewPipPositionToggle);
|
||||
@@ -791,8 +812,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
CallStatusChange += (sender, args) =>
|
||||
{
|
||||
trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall);
|
||||
|
||||
trilist.SetBool(joinMap.IncomingCall.JoinNumber, args.CallItem.Direction == eCodecCallDirection.Incoming);
|
||||
|
||||
Debug.Console(1, this, "Call Direction: {0}", args.CallItem.Direction);
|
||||
Debug.Console(1, this, "Call is incoming: {0}", args.CallItem.Direction == eCodecCallDirection.Incoming);
|
||||
trilist.SetBool(joinMap.IncomingCall.JoinNumber, args.CallItem.Direction == eCodecCallDirection.Incoming && args.CallItem.Status != eCodecCallStatus.Disconnected);
|
||||
|
||||
if (args.CallItem.Direction == eCodecCallDirection.Incoming)
|
||||
{
|
||||
|
||||
@@ -58,6 +58,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
public List<zStatus.AudioVideoInputOutputLineItem> AudioInputs { get; set; }
|
||||
public List<zStatus.AudioVideoInputOutputLineItem> AudioOuputs { get; set; }
|
||||
public List<zStatus.AudioVideoInputOutputLineItem> Cameras { get; set; }
|
||||
public zEvent.PhoneCallStatus PhoneCall { get; set; }
|
||||
|
||||
public ZoomRoomStatus()
|
||||
{
|
||||
@@ -74,6 +75,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
AudioInputs = new List<zStatus.AudioVideoInputOutputLineItem>();
|
||||
AudioOuputs = new List<zStatus.AudioVideoInputOutputLineItem>();
|
||||
Cameras = new List<zStatus.AudioVideoInputOutputLineItem>();
|
||||
PhoneCall = new zEvent.PhoneCallStatus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -700,6 +702,86 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
[JsonProperty("why_cannot_pin_share")]
|
||||
public string WhyCannotPinShare { get; set; }
|
||||
}
|
||||
|
||||
public class PhoneCallStatus:NotifiableObject
|
||||
{
|
||||
private bool _isIncomingCall;
|
||||
private string _peerDisplayName;
|
||||
private string _peerNumber;
|
||||
|
||||
private bool _offHook;
|
||||
|
||||
public string CallId { get; set; }
|
||||
public bool IsIncomingCall {
|
||||
get { return _isIncomingCall; }
|
||||
set
|
||||
{
|
||||
if(value == _isIncomingCall) return;
|
||||
|
||||
_isIncomingCall = value;
|
||||
NotifyPropertyChanged("IsIncomingCall");
|
||||
} }
|
||||
|
||||
public string PeerDisplayName
|
||||
{
|
||||
get { return _peerDisplayName; }
|
||||
set
|
||||
{
|
||||
if (value == _peerDisplayName) return;
|
||||
_peerDisplayName = value;
|
||||
NotifyPropertyChanged("PeerDisplayName");
|
||||
}
|
||||
}
|
||||
|
||||
public string PeerNumber
|
||||
{
|
||||
get { return _peerNumber; }
|
||||
set
|
||||
{
|
||||
if (value == _peerNumber) return;
|
||||
|
||||
_peerNumber = value;
|
||||
NotifyPropertyChanged("PeerNumber");
|
||||
}
|
||||
}
|
||||
|
||||
public string PeerUri { get; set; }
|
||||
|
||||
private ePhoneCallStatus _status;
|
||||
public ePhoneCallStatus Status
|
||||
{
|
||||
get { return _status; }
|
||||
set
|
||||
{
|
||||
_status = value;
|
||||
OffHook = _status == ePhoneCallStatus.PhoneCallStatus_Accepted ||
|
||||
_status == ePhoneCallStatus.PhoneCallStatus_InCall ||
|
||||
_status == ePhoneCallStatus.PhoneCallStatus_Init ||
|
||||
_status == ePhoneCallStatus.PhoneCallStatus_Ringing;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OffHook
|
||||
{
|
||||
get { return _offHook; }
|
||||
set
|
||||
{
|
||||
if (value == _offHook) return;
|
||||
|
||||
_offHook = value;
|
||||
NotifyPropertyChanged("OffHook");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum ePhoneCallStatus
|
||||
{
|
||||
PhoneCallStatus_Ringing,
|
||||
PhoneCallStatus_Terminated,
|
||||
PhoneCallStatus_Accepted,
|
||||
PhoneCallStatus_InCall,
|
||||
PhoneCallStatus_Init,
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -17,12 +17,14 @@ using PepperDash.Essentials.Devices.Common.Cameras;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco;
|
||||
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
|
||||
using PepperDash_Essentials_Core.DeviceTypeInterfaces;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
{
|
||||
public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor,
|
||||
IRouting,
|
||||
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraAutoMode, IHasFarEndContentStatus, IHasSelfviewPosition
|
||||
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraAutoMode,
|
||||
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing
|
||||
{
|
||||
private const long MeetingRefreshTimer = 60000;
|
||||
private const uint DefaultMeetingDurationMin = 30;
|
||||
@@ -114,6 +116,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
SupportsCameraOff = _props.SupportsCameraOff;
|
||||
SupportsCameraAutoMode = _props.SupportsCameraAutoMode;
|
||||
|
||||
PhoneOffHookFeedback = new BoolFeedback(PhoneOffHookFeedbackFunc);
|
||||
CallerIdNameFeedback = new StringFeedback(CallerIdNameFeedbackFunc);
|
||||
CallerIdNumberFeedback = new StringFeedback(CallerIdNumberFeedbackFunc);
|
||||
}
|
||||
|
||||
public CommunicationGather PortGather { get; private set; }
|
||||
@@ -195,7 +201,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
protected Func<bool> CameraAutoModeIsOnFeedbackFunc
|
||||
{
|
||||
get { return () => false; }
|
||||
}
|
||||
}
|
||||
|
||||
protected Func<string> SelfviewPipPositionFeedbackFunc
|
||||
{
|
||||
@@ -506,6 +512,28 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
Status.PhoneCall.PropertyChanged += (o, a) =>
|
||||
{
|
||||
switch (a.PropertyName)
|
||||
{
|
||||
case "IsIncomingCall":
|
||||
Debug.Console(1, this, "Incoming Phone Call: {0}", Status.PhoneCall.IsIncomingCall);
|
||||
break;
|
||||
case "PeerDisplayName":
|
||||
Debug.Console(1, this, "Peer Display Name: {0}", Status.PhoneCall.PeerDisplayName);
|
||||
CallerIdNameFeedback.FireUpdate();
|
||||
break;
|
||||
case "PeerNumber":
|
||||
Debug.Console(1, this, "Peer Number: {0}", Status.PhoneCall.PeerNumber);
|
||||
CallerIdNumberFeedback.FireUpdate();
|
||||
break;
|
||||
case "OffHook":
|
||||
Debug.Console(1, this, "Phone is OffHook: {0}", Status.PhoneCall.OffHook);
|
||||
PhoneOffHookFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void SetUpDirectory()
|
||||
@@ -555,8 +583,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
if (!_props.DisablePhonebookAutoDownload)
|
||||
{
|
||||
CrestronConsole.AddNewConsoleCommand(s => SendText("zCommand Phonebook List Offset: 0 Limit: 512"),
|
||||
"GetZoomRoomContacts", "Triggers a refresh of the codec phonebook",
|
||||
ConsoleAccessLevelEnum.AccessOperator);
|
||||
"GetZoomRoomContacts", "Triggers a refresh of the codec phonebook",
|
||||
ConsoleAccessLevelEnum.AccessOperator);
|
||||
}
|
||||
|
||||
CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings",
|
||||
@@ -1066,7 +1094,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
case "sharingstate":
|
||||
{
|
||||
JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Sharing);
|
||||
|
||||
|
||||
SetLayout();
|
||||
|
||||
break;
|
||||
@@ -1181,6 +1209,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
break;
|
||||
}
|
||||
case "phonecallstatus":
|
||||
{
|
||||
JsonConvert.PopulateObject(responseObj.ToString(), Status.PhoneCall);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
@@ -1294,8 +1327,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
private void SetLayout()
|
||||
{
|
||||
if(!_props.AutoDefaultLayouts) return;
|
||||
|
||||
if (!_props.AutoDefaultLayouts) return;
|
||||
|
||||
if (
|
||||
(Status.Call.Sharing.State == zEvent.eSharingState.Receiving ||
|
||||
Status.Call.Sharing.State == zEvent.eSharingState.Sending))
|
||||
@@ -1354,7 +1387,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
if (ActiveCalls.Count == 0)
|
||||
{
|
||||
if (callStatus == zStatus.eCallStatus.CONNECTING_MEETING || callStatus == zStatus.eCallStatus.IN_MEETING )
|
||||
if (callStatus == zStatus.eCallStatus.CONNECTING_MEETING ||
|
||||
callStatus == zStatus.eCallStatus.IN_MEETING)
|
||||
{
|
||||
var newStatus = eCodecCallStatus.Unknown;
|
||||
|
||||
@@ -1431,6 +1465,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
SetLayout();
|
||||
}
|
||||
}
|
||||
|
||||
public override void StartSharing()
|
||||
{
|
||||
SendText("zCommand Call Sharing HDMI Start");
|
||||
@@ -1570,6 +1605,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
public override void AcceptCall(CodecActiveCallItem call)
|
||||
{
|
||||
SendText(string.Format("zCommand Call Accept callerJID: {0}", call.Id));
|
||||
|
||||
call.Status = eCodecCallStatus.Connected;
|
||||
|
||||
OnCallStatusChange(call);
|
||||
|
||||
UpdateCallStatus();
|
||||
}
|
||||
|
||||
public void RejectCall()
|
||||
@@ -1584,6 +1625,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
public override void RejectCall(CodecActiveCallItem call)
|
||||
{
|
||||
SendText(string.Format("zCommand Call Reject callerJID: {0}", call.Id));
|
||||
|
||||
call.Status = eCodecCallStatus.Disconnected;
|
||||
|
||||
OnCallStatusChange(call);
|
||||
|
||||
UpdateCallStatus();
|
||||
}
|
||||
|
||||
public override void Dial(Meeting meeting)
|
||||
@@ -1633,7 +1680,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
public override void SendDtmf(string s)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
SendDtmfToPhone(s);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1713,6 +1760,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
#endregion
|
||||
|
||||
#region Implementation of IHasCameraAutoMode
|
||||
|
||||
//Zoom doesn't support camera auto modes. Setting this to just unmute video
|
||||
public void CameraAutoModeOn()
|
||||
{
|
||||
@@ -1757,7 +1805,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
{
|
||||
var nextPipPositionIndex = SelfviewPipPositions.IndexOf(_currentSelfviewPipPosition) + 1;
|
||||
|
||||
if (nextPipPositionIndex >= SelfviewPipPositions.Count) // Check if we need to loop back to the first item in the list
|
||||
if (nextPipPositionIndex >= SelfviewPipPositions.Count)
|
||||
// Check if we need to loop back to the first item in the list
|
||||
nextPipPositionIndex = 0;
|
||||
|
||||
SelfviewPipPositionSet(SelfviewPipPositions[nextPipPositionIndex]);
|
||||
@@ -1772,12 +1821,40 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
new CodecCommandWithLabel("DownLeft", "Lower Left")
|
||||
};
|
||||
|
||||
void ComputeSelfviewPipStatus()
|
||||
private void ComputeSelfviewPipStatus()
|
||||
{
|
||||
_currentSelfviewPipPosition =
|
||||
SelfviewPipPositions.FirstOrDefault(
|
||||
p => p.Command.ToLower().Equals(Configuration.Call.Layout.Position.ToString().ToLower()));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Implementation of IHasPhoneDialing
|
||||
|
||||
private Func<bool> PhoneOffHookFeedbackFunc {get {return () => Status.PhoneCall.OffHook; }}
|
||||
private Func<string> CallerIdNameFeedbackFunc { get { return () => Status.PhoneCall.PeerDisplayName; } }
|
||||
private Func<string> CallerIdNumberFeedbackFunc { get { return () => Status.PhoneCall.PeerNumber; } }
|
||||
|
||||
public BoolFeedback PhoneOffHookFeedback { get; private set; }
|
||||
public StringFeedback CallerIdNameFeedback { get; private set; }
|
||||
public StringFeedback CallerIdNumberFeedback { get; private set; }
|
||||
|
||||
public void DialPhoneCall(string number)
|
||||
{
|
||||
SendText(String.Format("zCommand Dial PhoneCallOut Number: {0}", number));
|
||||
}
|
||||
|
||||
public void EndPhoneCall()
|
||||
{
|
||||
SendText(String.Format("zCommand Dial PhoneHangUp CallId: {0}", Status.PhoneCall.CallId));
|
||||
}
|
||||
|
||||
public void SendDtmfToPhone(string digit)
|
||||
{
|
||||
SendText(String.Format("zCommand SendSipDTMF CallId: {0} Key: {1}", Status.PhoneCall.CallId, digit));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user