Merge pull request #1 in PEC/essentials from development to release

* commit '5f5c963fa44763e6ec4d9bdf1a4008e183dd1873':
  Fixes StartSharing() method in CiscoSparkCodec to only execute if the PresentationSource is > 0 Fixes ecs-612 by adding property to UsageTracking object to determing if the usage tracker is already running.
  resolves ecs-611 and all other known bugs from onsite testing at NYU
  Update debug messages for SIP phone number extraction
  Added objects back to xStatus lost in merge and fixed regex pattern for extracting phone number. Added formatting call to room phone number when displayed on header
  Additional fix to top next meeting warning popups when room is on
  Updated getters for SIP URI and phone number to use correct status properties.  Updates to xConfiguration and xStatus classes to address differences between Spark and Spark Plus
  Fixed Stop Sharing button method to use the room route action method to sync source fb.  Updated xStatus, xConfiguration, booking and phonebook deserialization classes in codec to match onsite return results from NYU room kit plus codec
  Resolved ecs-582,602,608
This commit is contained in:
Heath Volmer
2017-10-27 11:44:29 -04:00
19 changed files with 2151 additions and 273 deletions

View File

@@ -27,6 +27,8 @@ namespace PepperDash.Essentials.Core
public InUseTracking InUseTracker { get; protected set; }
public bool UsageIsTracked { get; set; }
public bool UsageTrackingStarted { get; protected set; }
public DateTime UsageStartTime { get; protected set; }
public DateTime UsageEndTime { get; protected set; }
@@ -59,6 +61,7 @@ namespace PepperDash.Essentials.Core
/// </summary>
public void StartDeviceUsage()
{
UsageTrackingStarted = true;
UsageStartTime = DateTime.Now;
}
@@ -69,6 +72,8 @@ namespace PepperDash.Essentials.Core
{
try
{
UsageTrackingStarted = false;
UsageEndTime = DateTime.Now;
if (UsageStartTime != null)

View File

@@ -132,6 +132,30 @@ namespace PepperDash.Essentials.Core.Routing
/// </summary>
public const string HdmiOut = "hdmiOut";
/// <summary>
/// hdmiOut1
/// </summary>
public const string HdmiOut1 = "hdmiOut1";
/// <summary>
/// hdmiOut2
/// </summary>
public const string HdmiOut2 = "hdmiOut2";
/// <summary>
/// hdmiOut3
/// </summary>
public const string HdmiOut3 = "hdmiOut3";
/// <summary>
/// hdmiOut4
/// </summary>
public const string HdmiOut4 = "hdmiOut4";
/// <summary>
/// hdmiOut5
/// </summary>
public const string HdmiOut5 = "hdmiOut5";
/// <summary>
/// hdmiOut6
/// </summary>
public const string HdmiOut6 = "hdmiOut6";
/// <summary>
/// none
/// </summary>
public const string None = "none";

View File

@@ -42,14 +42,16 @@ namespace PepperDash.Essentials.Devices.Common.Codec
public void AddFoldersToDirectory(List<DirectoryItem> folders)
{
DirectoryResults.AddRange(folders);
if(folders != null)
DirectoryResults.AddRange(folders);
SortDirectory();
}
public void AddContactsToDirectory(List<DirectoryItem> contacts)
{
DirectoryResults.AddRange(contacts);
if(contacts != null)
DirectoryResults.AddRange(contacts);
SortDirectory();
}

View File

@@ -137,8 +137,10 @@
<Compile Include="Streaming\Roku.cs" />
<Compile Include="VideoCodec\CiscoCodec\BookingsDataClasses.cs" />
<Compile Include="VideoCodec\CiscoCodec\CallHistoryDataClasses.cs" />
<Compile Include="VideoCodec\CiscoCodec\CameraConverter.cs" />
<Compile Include="VideoCodec\CiscoCodec\CiscoSparkCodec.cs" />
<Compile Include="VideoCodec\CiscoCodec\CiscoSparkCodecPropertiesConfig.cs" />
<Compile Include="VideoCodec\CiscoCodec\xStatusSparkPlus.cs" />
<Compile Include="VideoCodec\MockVC\MockVcPropertiesConfig.cs" />
<Compile Include="VideoCodec\CiscoCodec\PhonebookDataClasses.cs" />
<Compile Include="VideoCodec\CiscoCodec\xConfiguration.cs" />

View File

@@ -23,7 +23,27 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
public class LastUpdated
{
public DateTime Value { get; set; }
string _value;
public DateTime Value {
get
{
DateTime _valueDateTime;
try
{
_valueDateTime = DateTime.Parse(_value);
return _valueDateTime;
}
catch
{
return new DateTime();
}
}
set
{
_value = value.ToString();
}
}
}
public class Id
@@ -275,7 +295,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
{
public string status { get; set; }
public ResultInfo ResultInfo { get; set; }
public LastUpdated LastUpdated { get; set; }
//public LastUpdated LastUpdated { get; set; }
public List<Booking> Booking { get; set; }
}

View File

@@ -0,0 +1,53 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//namespace PepperDash.Essentials.Devices.Common.VideoCodec.CiscoCodec
//{
// /// <summary>
// /// This helps convert the camera section differences between Spark and Spark+
// /// One of them returns an object. One returns an array.
// /// </summary>
// public class CameraConverter : JsonConverter
// {
// public override bool CanConvert(System.Type objectType)
// {
// return objectType == typeof(Camera) || objectType == typeof(List<Camera>);
// }
// public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
// {
// if (reader.TokenType == JsonToken.StartArray)
// {
// var l = new List<Camera>();
// reader.Read();
// while (reader.TokenType != JsonToken.EndArray)
// {
// l.Add(reader.Value as Camera);
// reader.Read();
// }
// return l;
// }
// else
// {
// return new List<Camera> { reader.Value as Camera };
// }
// }
// public override bool CanWrite
// {
// get
// {
// return false;
// }
// }
// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
// {
// throw new NotImplementedException("SOD OFF HOSER");
// }
// }
//}

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Crestron.SimplSharp;
using Crestron.SimplSharp.Net.Https;
using Crestron.SimplSharp.CrestronXml;
@@ -44,11 +45,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public StringFeedback LocalLayoutFeedback { get; private set; }
/// <summary>
/// An internal pseudo-source that is routable and connected to the osd input
/// </summary>
public DummyRoutingInputsDevice OsdSource { get; private set; }
private CodecCommandWithLabel CurrentSelfviewPipPosition;
private CodecCommandWithLabel CurrentLocalLayout;
@@ -207,9 +203,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public bool CommDebuggingIsOn;
string Delimiter = "\r\n";
/// <summary>
/// Used to track the current connector used for the presentation source
/// </summary>
int PresentationSource;
string PresentationSourceKey;
@@ -227,9 +225,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
// **___________________________________________________________________**
public RoutingInputPort CodecOsdIn { get; private set; }
public RoutingInputPort HdmiIn1 { get; private set; }
public RoutingInputPort HdmiIn2 { get; private set; }
public RoutingOutputPort HdmiOut { get; private set; }
public RoutingInputPort HdmiIn3 { get; private set; }
public RoutingOutputPort HdmiOut1 { get; private set; }
public RoutingOutputPort HdmiOut2 { get; private set; }
// Constructor for IBasicCommunication
public CiscoSparkCodec(string key, string name, IBasicCommunication comm, CiscoSparkCodecPropertiesConfig props )
@@ -304,18 +304,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
HdmiIn1 = new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource1), this);
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource1), this);
HdmiIn3 = new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource2), this);
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut1 = new RoutingOutputPort(RoutingPortNames.HdmiOut1, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, null, this);
HdmiOut2 = new RoutingOutputPort(RoutingPortNames.HdmiOut2, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, null, this);
InputPorts.Add(CodecOsdIn);
InputPorts.Add(HdmiIn1);
InputPorts.Add(HdmiIn2);
OutputPorts.Add(HdmiOut);
InputPorts.Add(HdmiIn3);
OutputPorts.Add(HdmiOut1);
CreateOsdSource();
}
@@ -367,7 +369,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
prefix + "/Status/Video/Selfview" + Delimiter +
prefix + "/Status/Video/Layout" + Delimiter +
prefix + "/Bookings" + Delimiter +
prefix + "/Event/CallDisconnect" + Delimiter;
prefix + "/Event/CallDisconnect" + Delimiter +
prefix + "/Event/Bookings" + Delimiter;
return base.CustomActivate();
}
@@ -540,6 +543,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
JsonConvert.PopulateObject(response, tempCodecStatus);
// Check to see if the message contains /Status/Conference/Presentation/LocalInstance and extract source value
var conference = tempCodecStatus.Status.Conference;
if (conference.Presentation.LocalInstance.Count > 0)
{
if (!string.IsNullOrEmpty(conference.Presentation.LocalInstance[0].ghost))
PresentationSource = 0;
else if (conference.Presentation.LocalInstance[0].Source != null)
{
PresentationSource = conference.Presentation.LocalInstance[0].Source.IntValue;
}
}
// Check to see if this is a call status message received after the initial status message
if (tempCodecStatus.Status.Call.Count > 0)
{
@@ -647,13 +663,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
else if (response.IndexOf("\"Event\":{") > -1)
{
// Event Message
if (response.IndexOf("\"CallDisconnect\":{") > -1)
{
CiscoCodecEvents.RootObject eventReceived = new CiscoCodecEvents.RootObject();
CiscoCodecEvents.RootObject eventReceived = new CiscoCodecEvents.RootObject();
JsonConvert.PopulateObject(response, eventReceived);
JsonConvert.PopulateObject(response, eventReceived);
EvalutateEvent(eventReceived);
EvalutateDisconnectEvent(eventReceived);
}
}
else if (response.IndexOf("\"CommandResponse\":{") > -1)
{
@@ -707,7 +724,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
var directoryResults = new CodecDirectory();
directoryResults = CiscoCodecPhonebook.ConvertCiscoPhonebookToGeneric(codecPhonebookResponse.CommandResponse.PhonebookSearchResult);
if(codecPhonebookResponse.CommandResponse.PhonebookSearchResult.ResultInfo.TotalRows.Value != "0")
directoryResults = CiscoCodecPhonebook.ConvertCiscoPhonebookToGeneric(codecPhonebookResponse.CommandResponse.PhonebookSearchResult);
PrintPhonebook(directoryResults);
@@ -744,7 +762,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
/// Evaluates an event received from the codec
/// </summary>
/// <param name="eventReceived"></param>
void EvalutateEvent(CiscoCodecEvents.RootObject eventReceived)
void EvalutateDisconnectEvent(CiscoCodecEvents.RootObject eventReceived)
{
if (eventReceived.Event.CallDisconnect != null)
{
@@ -783,6 +801,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
{
ExecuteSwitch(inputSelector);
PresentationSourceKey = inputSelector.ToString();
}
@@ -866,7 +885,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
private void GetPhonebookContacts()
{
// Get Phonebook Folders (determine local/corporate from config, and set results limit)
SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Contact", PhonebookMode));
SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Contact Limit: {1}", PhonebookMode, PhonebookResultsLimit));
}
/// <summary>
@@ -984,7 +1003,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
/// </summary>
public void SelectPresentationSource1()
{
SelectPresentationSource(1);
SelectPresentationSource(2);
}
/// <summary>
@@ -992,7 +1011,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
/// </summary>
public void SelectPresentationSource2()
{
SelectPresentationSource(2);
SelectPresentationSource(3);
}
/// <summary>
@@ -1007,7 +1026,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
else
sendingMode = "LocalOnly";
SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode));
if(PresentationSource > 0)
SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode));
}
/// <summary>
@@ -1015,6 +1035,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
/// </summary>
public override void StopSharing()
{
PresentationSource = 0;
SendText("xCommand Presentation Stop");
}
@@ -1267,18 +1289,33 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
get
{
if (CodecConfiguration.Configuration.H323.H323Alias.E164 != null)
return CodecConfiguration.Configuration.H323.H323Alias.E164.Value;
if (CodecStatus.Status.SIP.Registration.Count > 0)
{
var match = Regex.Match(CodecStatus.Status.SIP.Registration[0].URI.Value, @"(\d+)"); // extract numbers only
if (match.Success)
{
Debug.Console(1, "Extracted phone number as '{0}' from string '{1}'", match.Groups[1].Value, CodecStatus.Status.SIP.Registration[0].URI.Value);
return match.Groups[1].Value;
}
else
{
Debug.Console(1, "Unable to extract phone number from string: '{0}'", CodecStatus.Status.SIP.Registration[0].URI.Value);
return string.Empty;
}
}
else
{
Debug.Console(1, "Unable to extract phone number. No SIP Registration items found");
return string.Empty;
}
}
}
public override string SipUri
{
get
{
if (CodecConfiguration.Configuration.H323.H323Alias.ID != null)
return CodecConfiguration.Configuration.H323.H323Alias.ID.Value;
if (CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value != null)
return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value;
else
return string.Empty;
}

View File

@@ -2,8 +2,12 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
/// <summary>
@@ -17,19 +21,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Dereverberation
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Mode2
public class Mode
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -44,7 +42,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class EchoControl
{
public Dereverberation Dereverberation { get; set; }
public Mode2 Mode { get; set; }
public Mode Mode { get; set; }
public NoiseReduction NoiseReduction { get; set; }
}
@@ -54,12 +52,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode2
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Microphone
{
public string id { get; set; }
public Mode Mode { get; set; }
public EchoControl EchoControl { get; set; }
public Level Level { get; set; }
public Mode2 Mode { get; set; }
}
public class Input
@@ -94,29 +98,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Mode3 Mode { get; set; }
}
public class Mode4
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class OutputType
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Line
{
public string id { get; set; }
public Mode4 Mode { get; set; }
public OutputType OutputType { get; set; }
}
public class Output
{
public InternalSpeaker InternalSpeaker { get; set; }
public List<Line> Line { get; set; }
}
public class RingTone
@@ -146,38 +130,121 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public SoundsAndAlerts SoundsAndAlerts { get; set; }
}
public class Framerate
public class DefaultMode
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Camera
public class Backlight
{
public Framerate Framerate { get; set; }
public DefaultMode DefaultMode { get; set; }
}
public class Closeup
public class DefaultLevel
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Mode4
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Brightness
{
public DefaultLevel DefaultLevel { get; set; }
public Mode4 Mode { get; set; }
}
public class Mode5
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Focus
{
public Mode5 Mode { get; set; }
}
public class Level2
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Mode6
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Gamma
{
public Level2 Level { get; set; }
public Mode6 Mode { get; set; }
}
public class Mirror
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Level3
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Mode7
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Whitebalance
{
public Level3 Level { get; set; }
public Mode7 Mode { get; set; }
}
public class Camera
{
public string id { get; set; }
public Backlight Backlight { get; set; }
public Brightness Brightness { get; set; }
public Focus Focus { get; set; }
public Gamma Gamma { get; set; }
public Mirror Mirror { get; set; }
public Whitebalance Whitebalance { get; set; }
}
public class Closeup
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Mode8
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class SpeakerTrack
{
public Closeup Closeup { get; set; }
public Mode5 Mode { get; set; }
public Mode8 Mode { get; set; }
}
public class Cameras
{
public Camera Camera { get; set; }
//[JsonConverter(typeof(CameraConverter))]
//public List<Camera> Camera { get; set; }
public SpeakerTrack SpeakerTrack { get; set; }
}
@@ -187,7 +254,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode6
public class Mode9
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -202,7 +269,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class AutoAnswer
{
public Delay Delay { get; set; }
public Mode6 Mode { get; set; }
public Mode9 Mode { get; set; }
public Mute2 Mute { get; set; }
}
@@ -235,7 +302,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public DefaultTimeout DefaultTimeout { get; set; }
}
public class Mode7
public class Mode10
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -243,10 +310,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class Encryption
{
public Mode7 Mode { get; set; }
public Mode10 Mode { get; set; }
}
public class Mode8
public class Mode11
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -254,7 +321,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class FarEndControl
{
public Mode8 Mode { get; set; }
public Mode11 Mode { get; set; }
}
public class MaxReceiveCallRate
@@ -281,7 +348,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode9
public class Mode12
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -289,7 +356,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class MultiStream
{
public Mode9 Mode { get; set; }
public Mode12 Mode { get; set; }
}
public class Conference
@@ -312,7 +379,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode10
public class Mode13
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -327,11 +394,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class Authentication
{
public LoginName LoginName { get; set; }
public Mode10 Mode { get; set; }
public Mode13 Mode { get; set; }
public Password Password { get; set; }
}
public class Mode11
public class Mode14
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -339,7 +406,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class CallSetup
{
public Mode11 Mode { get; set; }
public Mode14 Mode { get; set; }
}
public class KeySize
@@ -388,7 +455,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode12
public class Mode15
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -397,7 +464,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class NAT
{
public Address2 Address { get; set; }
public Mode12 Mode { get; set; }
public Mode15 Mode { get; set; }
}
public class H323
@@ -483,7 +550,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode13
public class Mode16
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -512,7 +579,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public AnonymousIdentity AnonymousIdentity { get; set; }
public Eap Eap { get; set; }
public Identity Identity { get; set; }
public Mode13 Mode { get; set; }
public Mode16 Mode { get; set; }
public Password2 Password { get; set; }
public TlsVerify TlsVerify { get; set; }
public UseClientCertificate UseClientCertificate { get; set; }
@@ -640,7 +707,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Video Video { get; set; }
}
public class Mode14
public class Mode17
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -649,7 +716,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class QoS
{
public Diffserv Diffserv { get; set; }
public Mode14 Mode { get; set; }
public Mode17 Mode { get; set; }
}
public class Allow
@@ -669,7 +736,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode15
public class Mode18
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -683,7 +750,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class Voice
{
public Mode15 Mode { get; set; }
public Mode18 Mode { get; set; }
public VlanId VlanId { get; set; }
}
@@ -707,7 +774,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public VLAN VLAN { get; set; }
}
public class Mode16
public class Mode19
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -715,10 +782,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class CDP
{
public Mode16 Mode { get; set; }
public Mode19 Mode { get; set; }
}
public class Mode17
public class Mode20
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -726,10 +793,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class H3232
{
public Mode17 Mode { get; set; }
public Mode20 Mode { get; set; }
}
public class Mode18
public class Mode21
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -737,7 +804,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class HTTP
{
public Mode18 Mode { get; set; }
public Mode21 Mode { get; set; }
}
public class MinimumTLSVersion
@@ -777,7 +844,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public VerifyServerCertificate VerifyServerCertificate { get; set; }
}
public class Mode19
public class Mode22
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -797,11 +864,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class NTP2
{
public Mode19 Mode { get; set; }
public Mode22 Mode { get; set; }
public List<Server3> Server { get; set; }
}
public class Mode20
public class Mode23
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -809,7 +876,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class SIP
{
public Mode20 Mode { get; set; }
public Mode23 Mode { get; set; }
}
public class CommunityName
@@ -830,7 +897,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Address7 Address { get; set; }
}
public class Mode21
public class Mode24
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -852,12 +919,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
public CommunityName CommunityName { get; set; }
public List<Host> Host { get; set; }
public Mode21 Mode { get; set; }
public Mode24 Mode { get; set; }
public SystemContact SystemContact { get; set; }
public SystemLocation SystemLocation { get; set; }
}
public class Mode22
public class Mode25
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -865,10 +932,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class SSH
{
public Mode22 Mode { get; set; }
public Mode25 Mode { get; set; }
}
public class Mode23
public class Mode26
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -876,7 +943,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class UPnP
{
public Mode23 Mode { get; set; }
public Mode26 Mode { get; set; }
}
public class WelcomeText
@@ -1017,7 +1084,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode24
public class Mode27
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -1035,11 +1102,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public ExternalManager ExternalManager { get; set; }
public HttpMethod HttpMethod { get; set; }
public LoginName2 LoginName { get; set; }
public Mode24 Mode { get; set; }
public Mode27 Mode { get; set; }
public Password3 Password { get; set; }
}
public class Mode25
public class Mode28
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -1077,7 +1144,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class Proximity
{
public Mode25 Mode { get; set; }
public Mode28 Mode { get; set; }
public Services Services { get; set; }
}
@@ -1135,7 +1202,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode26
public class Mode29
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -1144,7 +1211,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class Ice
{
public DefaultCandidate DefaultCandidate { get; set; }
public Mode26 Mode { get; set; }
public Mode29 Mode { get; set; }
}
public class ListenPort
@@ -1220,7 +1287,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode27
public class Mode30
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -1230,7 +1297,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
public BaudRate BaudRate { get; set; }
public LoginRequired LoginRequired { get; set; }
public Mode27 Mode { get; set; }
public Mode30 Mode { get; set; }
}
public class BootAction
@@ -1319,7 +1386,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Type2 Type { get; set; }
}
public class Mode28
public class Mode31
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -1327,7 +1394,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class KeyTones
{
public Mode28 Mode { get; set; }
public Mode31 Mode { get; set; }
}
public class Language
@@ -1397,7 +1464,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode29
public class Mode32
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -1434,7 +1501,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public BaseDN BaseDN { get; set; }
public Encryption3 Encryption { get; set; }
public MinimumTLSVersion2 MinimumTLSVersion { get; set; }
public Mode29 Mode { get; set; }
public Mode32 Mode { get; set; }
public Server6 Server { get; set; }
public VerifyServerCertificate2 VerifyServerCertificate { get; set; }
}
@@ -1456,7 +1523,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode30
public class Mode33
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -1465,7 +1532,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class CameraControl
{
public CameraId CameraId { get; set; }
public Mode30 Mode { get; set; }
public Mode33 Mode { get; set; }
}
public class InputSourceType
@@ -1480,12 +1547,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Visibility
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class PreferredResolution
{
public string valueSpaceRef { get; set; }
@@ -1504,16 +1565,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Visibility
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
}
public class Connector
{
public string id { get; set; }
public CameraControl CameraControl { get; set; }
public InputSourceType InputSourceType { get; set; }
public Name3 Name { get; set; }
public Visibility Visibility { get; set; }
public PreferredResolution PreferredResolution { get; set; }
public PresentationSelection PresentationSelection { get; set; }
public Quality Quality { get; set; }
public Visibility Visibility { get; set; }
}
public class Input2
@@ -1527,7 +1594,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode31
public class Mode34
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -1535,7 +1602,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class CEC
{
public Mode31 Mode { get; set; }
public Mode34 Mode { get; set; }
}
public class MonitorRole
@@ -1580,7 +1647,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode32
public class Mode35
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -1601,7 +1668,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class Default
{
public FullscreenMode FullscreenMode { get; set; }
public Mode32 Mode { get; set; }
public Mode35 Mode { get; set; }
public OnMonitorRole OnMonitorRole { get; set; }
public PIPPosition PIPPosition { get; set; }
}
@@ -1612,7 +1679,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Mode33
public class Mode36
{
public string valueSpaceRef { get; set; }
public string Value { get; set; }
@@ -1621,7 +1688,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class OnCall
{
public Duration Duration { get; set; }
public Mode33 Mode { get; set; }
public Mode36 Mode { get; set; }
}
public class Selfview

View File

@@ -4,6 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronXml.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core;
@@ -31,15 +33,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
public class ConnectionStatus
{
public string Value { get; set; }
}
public class EcReferenceDelay
{
public string Value { get; set; }
}
public class Microphone
{
public string id { get; set; }
public ConnectionStatus ConnectionStatus { get; set; }
public EcReferenceDelay EcReferenceDelay { get; set; }
}
public class Connectors
@@ -205,6 +214,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class Flip
{
public string Value { get; set; }
}
public class HardwareID
{
public string Value { get; set; }
}
public class Manufacturer
{
public string Value { get; set; }
@@ -237,15 +256,24 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Zoom Zoom { get; set; }
}
public class SoftwareID
{
public string Value { get; set; }
}
public class Camera
{
public string id { get; set; }
public Capabilities Capabilities { get; set; }
public Connected Connected { get; set; }
public Framerate Framerate { get; set; }
public Flip Flip { get; set; }
public HardwareID HardwareID { get; set; }
public MacAddress MacAddress { get; set; }
public Manufacturer Manufacturer { get; set; }
public Model Model { get; set; }
public Position Position { get; set; }
public SerialNumber SerialNumber { get; set; }
public SoftwareID SoftwareID { get; set; }
}
public class Availability
@@ -287,12 +315,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class Cameras
{
public List<Camera> Camera { get; set; }
//[JsonConverter(typeof(CameraConverter))]
//public List<Camera> Camera { get; set; }
public SpeakerTrack SpeakerTrack { get; set; }
public Cameras()
{
Camera = new List<Camera>();
//Camera = new List<Camera>();
SpeakerTrack = new SpeakerTrack();
}
}
@@ -397,9 +426,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public RequestFloorAvailability RequestFloorAvailability { get; set; }
}
public class Source2
public class Source2 : ValueProperty
{
public string Value { get; set; }
string _Value;
/// <summary>
/// Sets Value and triggers the action when set
/// </summary>
public string Value
{
get
{
return _Value;
}
set
{
_Value = value;
OnValueChanged();
}
}
/// <summary>
/// Converted value of _Value for use as feedback
/// </summary>
public int IntValue
{
get
{
if (!string.IsNullOrEmpty(_Value))
return Convert.ToInt32(_Value);
else
return 0;
}
}
}
public class SendingMode
@@ -410,16 +469,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class LocalInstance
{
public string id { get; set; }
public string ghost { get; set; }
public SendingMode SendingMode {get; set;}
public Source2 Source { get; set; }
public LocalInstance()
{
Source = new Source2();
}
}
public class Presentation
{
public CallId2 CallId { get; set; }
public Mode2 Mode { get; set; }
public Whiteboard Whiteboard { get; set; }
public List<LocalInstance> LocalInstance { get; set; }
public CallId2 CallId { get; set; }
public Mode2 Mode { get; set; }
public Whiteboard Whiteboard { get; set; }
public List<LocalInstance> LocalInstance { get; set; }
public Presentation()
{
@@ -1047,6 +1112,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
}
public class Primary
{
public URI URI { get; set; }
public Primary()
{
URI = new URI();
}
}
public class AlternateURI
{
public Primary Primary { get; set; }
public AlternateURI()
{
Primary = new Primary();
}
}
public class Authentication
{
public string Value { get; set; }
@@ -1128,6 +1213,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Reason3 Reason { get; set; }
public Status10 Status { get; set; }
public URI3 URI { get; set; }
public Registration()
{
URI = new URI3();
}
}
public class Secure
@@ -1142,6 +1232,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class SIP
{
public AlternateURI AlternateURI { get; set; }
public Authentication Authentication { get; set; }
public CallForward CallForward { get; set; }
public Mailbox Mailbox { get; set; }
@@ -1149,6 +1240,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public List<Registration> Registration { get; set; }
public Secure Secure { get; set; }
public Verified Verified { get; set; }
public SIP()
{
AlternateURI = new AlternateURI();
Registration = new List<Registration>();
}
}
public class Mode7

View File

@@ -6,6 +6,7 @@ using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Routing;
using PepperDash.Essentials.Devices.Common;
using PepperDash.Essentials.Devices.Common.Codec;
@@ -33,14 +34,28 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
#endregion
/// <summary>
/// An internal pseudo-source that is routable and connected to the osd input
/// </summary>
public DummyRoutingInputsDevice OsdSource { get; protected set; }
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
bool wasIsInCall;
/// <summary>
/// Returns true when any call is not in state Unknown, Disconnecting, Disconnected
/// </summary>
public bool IsInCall { get { return ActiveCalls.Any(c => c.IsActiveCall); } }
public bool IsInCall
{
get
{
var value = ActiveCalls.Any(c => c.IsActiveCall);
return value;
}
}
public BoolFeedback StandbyIsOnFeedback { get; private set; }
@@ -109,8 +124,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
OnCallStatusChange(call);
if (AutoShareContentWhileInCall)
StartSharing();
}
/// <summary>
@@ -124,6 +137,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
var handler = CallStatusChange;
if (handler != null)
handler(this, new CodecCallStatusItemChangeEventArgs(item));
if (AutoShareContentWhileInCall)
StartSharing();
if(IsInCall && !UsageTracker.UsageTrackingStarted)
UsageTracker.StartDeviceUsage();
else if(UsageTracker.UsageTrackingStarted && !IsInCall)
UsageTracker.EndDeviceUsage();
}
/// <summary>

View File

@@ -58,9 +58,13 @@ namespace PepperDash.Essentials.Fusion
var codecPowerOnAction = new Action<bool>(b => { if (!b) codec.StandbyDeactivate(); });
var codecPowerOffAction = new Action<bool>(b => { if (!b) codec.StandbyActivate(); });
// Map FusionRoom Attributes:
// Codec volume
var codecVolume = FusionRoom.CreateOffsetUshortSig(50, "Volume - Fader01", eSigIoMask.InputOutputSig);
codecVolume.OutputSig.UserObject = new Action<ushort>(b => (codec as IBasicVolumeWithFeedback).SetVolume(b));
(codec as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(codecVolume.InputSig);
// In Call Status
CodecIsInCall = FusionRoom.CreateOffsetBoolSig(69, "Conf - VC 1 In Call", eSigIoMask.InputSigOnly);
codec.CallStatusChange += new EventHandler<PepperDash.Essentials.Devices.Common.Codec.CodecCallStatusItemChangeEventArgs>(codec_CallStatusChange);
@@ -331,11 +335,6 @@ namespace PepperDash.Essentials.Fusion
if (display == (Room as EssentialsHuddleVtc1Room).DefaultDisplay)
{
// Display volume
var defaultDisplayVolume = FusionRoom.CreateOffsetUshortSig(50, "Volume - Fader01", eSigIoMask.InputOutputSig);
defaultDisplayVolume.OutputSig.UserObject = new Action<ushort>(b => (display as IBasicVolumeWithFeedback).SetVolume(b));
(display as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(defaultDisplayVolume.InputSig);
// Power on
var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig);
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOn(); });

View File

@@ -55,8 +55,8 @@ namespace PepperDash.Essentials
var disp = DefaultDisplay as DisplayBase;
var val = CurrentSourceInfo != null
&& CurrentSourceInfo.Type == eSourceListItemType.Route
&& disp != null
&& disp.PowerIsOnFeedback.BoolValue;
&& disp != null;
//&& disp.PowerIsOnFeedback.BoolValue;
return val;
};
}

View File

@@ -129,37 +129,17 @@ namespace PepperDash.Essentials
/// </summary>
public const uint VCSelfViewLayoutVisible = 1208;
/// <summary>
/// 1211
/// 1211 - 1215
/// </summary>
public const uint VCFavorite1Press = 1211;
public const uint VCFavoritePressStart = 1211;
// RANGE IN USE
public const uint VCFavoritePressEnd = 1215;
/// <summary>
/// 1212
/// 1221 - 1225
/// </summary>
public const uint VCFavorite2Press = 1212;
/// <summary>
/// 1213
/// </summary>
public const uint VCFavorite3Press = 1213;
/// <summary>
/// 1214
/// </summary>
public const uint VCFavorite4Press = 1214;
/// <summary>
/// 1221
/// </summary>
public const uint VCFavorite1Visible = 1221;
/// <summary>
/// 1222
/// </summary>
public const uint VCFavorite2Visible = 1222;
/// <summary>
/// 1223
/// </summary>
public const uint VCFavorite3Visible = 1223;
/// <summary>
/// 1224
/// </summary>
public const uint VCFavorite4Visible = 1224;
public const uint VCFavoriteVisibleStart = 1221;
// RANGE IN USE
public const uint VCFavoriteVisibleEnd = 1225;
/// <summary>
/// 1231
/// </summary>

View File

@@ -51,32 +51,14 @@ namespace PepperDash.Essentials
/// </summary>
public const uint VCDirectoryListTextStart = 1301;
// RANGE IN USE
public const uint VCDirectoryListTextEnd = 1400;
public const uint VCDirectoryListTextEnd = 1556;
/// <summary>
/// 141112
/// 1611 - 1615
/// </summary>
public const uint VCFavorites1Text = 1411;
/// <summary>
/// 1412
/// </summary>
public const uint VCFavorites2Text = 1412;
/// <summary>
/// 1413
/// </summary>
public const uint VCFavorites3Text = 1413;
/// <summary>
/// 1414
/// </summary>
public const uint VCFavorites4Text = 1414;
/// <summary>
/// 1415
/// </summary>
public const uint VCFavorites5Text = 1415;
public const uint VCFavoritesStart = 1611;
// RANGE IN USE
public const uint VCFavoritesTextEnd = 1615;
//******************************************************

View File

@@ -73,6 +73,8 @@ namespace PepperDash.Essentials
StringInputSig HeaderCallButtonIconSig;
BoolFeedback CallSharingInfoVisibleFeedback;
/// <summary>
/// The parent driver for this
@@ -441,6 +443,9 @@ namespace PepperDash.Essentials
// If the room is on, and the meeting is joinable
// and the LastMeetingDismissed != this meeting
Debug.Console(0, "*#* Room on: {0}, LastMeetingDismissed: {1} *#*", CurrentRoom.OnFeedback.BoolValue,
LastMeetingDismissed != null ? LastMeetingDismissed.StartTime.ToShortTimeString() : "null");
if (CurrentRoom.OnFeedback.BoolValue
&& LastMeetingDismissed == meeting)
{
@@ -448,7 +453,11 @@ namespace PepperDash.Essentials
}
LastMeetingDismissed = null;
if (meeting != null)
if (meeting == null)
{
HideNextMeetingPopup();
}
else
{
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToShortTimeString());
@@ -471,10 +480,11 @@ namespace PepperDash.Essentials
// indexOf = 3, 4 meetings :
if (indexOfNext < meetings.Count)
{
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
meetings[indexOfNext].StartTime.ToShortTimeString());
}
else
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today");
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () =>
{
// Mark the meeting to not re-harass the user
@@ -932,6 +942,18 @@ namespace PepperDash.Essentials
_CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange;
RefreshSourceInfo();
CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue);
_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.OutputChange += new EventHandler<EventArgs>(SharingContentIsOnFeedback_OutputChange);
CallSharingInfoVisibleFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.CallSharedSourceInfoVisible]);
SetActiveCallListSharingContentStatus();
if (_CurrentRoom != null)
_CurrentRoom.CurrentSingleSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange);
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd"));
SetupHeaderButtons();
}
else
@@ -941,6 +963,46 @@ namespace PepperDash.Essentials
}
}
/// <summary>
/// Updates the current shared source label on the call list when the source changes
/// </summary>
/// <param name="room"></param>
/// <param name="info"></param>
/// <param name="type"></param>
void CurrentRoom_CurrentSingleSourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
{
if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue)
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = _CurrentRoom.CurrentSourceInfo.PreferredName;
}
/// <summary>
/// Fires when the sharing source feedback of the codec changes
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void SharingContentIsOnFeedback_OutputChange(object sender, EventArgs e)
{
SetActiveCallListSharingContentStatus();
}
/// <summary>
/// Sets the values for the text and button visibilty for the active call list source sharing info
/// </summary>
void SetActiveCallListSharingContentStatus()
{
CallSharingInfoVisibleFeedback.FireUpdate();
string callListSharedSourceLabel;
if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue)
callListSharedSourceLabel = _CurrentRoom.CurrentSourceInfo.PreferredName;
else
callListSharedSourceLabel = "None";
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = callListSharedSourceLabel;
}
/// <summary>
///
/// </summary>
@@ -1265,7 +1327,7 @@ namespace PepperDash.Essentials
{
var routeInfo = CurrentRoom.CurrentSourceInfo;
// This will show off popup too
if (this.IsVisible)
if (this.IsVisible && !VCDriver.IsVisible)
ShowCurrentSource();
if (routeInfo == null)// || !CurrentRoom.OnFeedback.BoolValue)

View File

@@ -79,9 +79,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
StringBuilder SearchStringBuilder = new StringBuilder();
BoolFeedback SearchStringBackspaceVisibleFeedback;
BoolFeedback CallSharingInfoVisibleFeedback;
//StringFeedback CallSharingInfoTextFeedback;
ModalDialog IncomingCallModal;
eKeypadMode KeypadMode;
@@ -106,7 +103,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
Parent = parent;
SetupCallStagingPopover();
SetupDialKeypad();
ActiveCallsSRL = new SubpageReferenceList(TriList, UISmartObjectJoin.CodecActiveCallsHeaderList, 3, 3, 3);
ActiveCallsSRL = new SubpageReferenceList(triList, UISmartObjectJoin.CodecActiveCallsHeaderList, 5,5,5);
SetupDirectoryList();
SetupRecentCallsList();
SetupFavorites();
@@ -148,7 +145,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
DialStringBackspaceVisibleFeedback = new BoolFeedback(() => DialStringBuilder.Length > 0);
DialStringBackspaceVisibleFeedback
.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCKeypadBackspaceVisible]);
.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCKeypadBackspaceVisible]);
SearchStringFeedback = new StringFeedback(() =>
{
@@ -168,26 +165,20 @@ namespace PepperDash.Essentials.UIDrivers.VC
SearchStringBackspaceVisibleFeedback = new BoolFeedback(() => SearchStringBuilder.Length > 0);
SearchStringBackspaceVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackspaceVisible]);
TriList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackPress, GetDirectoryParentFolderContents);
triList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackPress, GetDirectoryParentFolderContents);
DirectoryBackButtonVisibleFeedback = new BoolFeedback(() => CurrentDirectoryResult != (codec as IHasDirectory).DirectoryRoot);
DirectoryBackButtonVisibleFeedback
.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCDirectoryBackVisible]);
.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackVisible]);
TriList.SetSigFalseAction(UIBoolJoin.VCKeypadTextPress, RevealKeyboard);
triList.SetSigFalseAction(UIBoolJoin.VCKeypadTextPress, RevealKeyboard);
TriList.SetSigFalseAction(UIBoolJoin.VCDirectorySearchTextPress, RevealKeyboard);
triList.SetSigFalseAction(UIBoolJoin.VCDirectorySearchTextPress, RevealKeyboard);
//TriList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackspacePress, SearchKeypadBackspacePress);
TriList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500,
triList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500,
StartSearchBackspaceRepeat, StopSearchBackspaceRepeat, SearchKeypadBackspacePress);
CallSharingInfoVisibleFeedback = new BoolFeedback(() => Codec.SharingContentIsOnFeedback.BoolValue);
codec.SharingContentIsOnFeedback.OutputChange += new EventHandler<EventArgs>(SharingContentIsOnFeedback_OutputChange);
CallSharingInfoVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.CallSharedSourceInfoVisible]);
Parent.CurrentRoom.CurrentSingleSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange);
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, Codec.StopSharing);
}
catch (Exception e)
{
@@ -195,36 +186,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
}
}
/// <summary>
/// Updates the current shared source label on the call list when the source changes
/// </summary>
/// <param name="room"></param>
/// <param name="info"></param>
/// <param name="type"></param>
void CurrentRoom_CurrentSingleSourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
{
if (Codec.SharingContentIsOnFeedback.BoolValue)
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = Parent.CurrentRoom.CurrentSourceInfo.PreferredName;
}
/// <summary>
/// Fires when the sharing source feedback of the codec changes
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void SharingContentIsOnFeedback_OutputChange(object sender, EventArgs e)
{
CallSharingInfoVisibleFeedback.FireUpdate();
string callListSharedSourceLabel;
if (Codec.SharingContentIsOnFeedback.BoolValue)
callListSharedSourceLabel = Parent.CurrentRoom.CurrentSourceInfo.PreferredName;
else
callListSharedSourceLabel = "None";
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = callListSharedSourceLabel;
}
/// <summary>
///
@@ -233,7 +194,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
/// <param name="e"></param>
void Codec_IsReady()
{
TriList.SetString(UIStringJoin.RoomPhoneText, Codec.CodecInfo.PhoneNumber);
TriList.SetString(UIStringJoin.RoomPhoneText, GetFormattedPhoneNumber(Codec.CodecInfo.PhoneNumber));
TriList.SetString(UIStringJoin.RoomSipText, Codec.CodecInfo.SipUri);
if(Parent.HeaderButtonsAreSetUp)
@@ -260,6 +221,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
Parent.ShowNotificationRibbon("Connected", 2000);
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
ShowKeypad();
(Parent.CurrentRoom.CurrentVolumeControls as IBasicVolumeWithFeedback).MuteOff();
//VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible);
break;
case eCodecCallStatus.Connecting:
@@ -336,6 +298,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
ActiveCallsSRL.StringInputSig(i, 1).StringValue = c.Name;
ActiveCallsSRL.StringInputSig(i, 2).StringValue = c.Number;
ActiveCallsSRL.StringInputSig(i, 3).StringValue = c.Status.ToString();
ActiveCallsSRL.StringInputSig(i, 4).StringValue = string.Format("Participant {0}", i);
ActiveCallsSRL.UShortInputSig(i, 1).UShortValue = (ushort)(c.Type == eCodecCallType.Video ? 2 : 1);
var cc = c; // for scope in lambda
ActiveCallsSRL.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() => Codec.EndCall(cc));
@@ -536,15 +499,15 @@ namespace PepperDash.Essentials.UIDrivers.VC
if (i < favs.Count)
{
var fav = favs[(int)i];
TriList.SetString(1411 + i, fav.Name);
TriList.SetBool(1221 + i, true);
TriList.SetSigFalseAction(1211 + i, () =>
TriList.SetString(UIStringJoin.VCFavoritesStart + i, fav.Name);
TriList.SetBool(UIBoolJoin.VCFavoriteVisibleStart + i, true);
TriList.SetSigFalseAction(UIBoolJoin.VCFavoritePressStart + i, () =>
{
Codec.Dial(fav.Number);
});
}
else
TriList.SetBool(1221 + i, false);
TriList.SetBool(UIBoolJoin.VCFavoriteVisibleStart + i, false);
}
}
}
@@ -1111,7 +1074,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
/// <summary>
///
/// Returns the text value for the keypad dial entry field
/// </summary>
/// <returns></returns>
string GetFormattedDialString(string ds)
@@ -1120,21 +1083,33 @@ namespace PepperDash.Essentials.UIDrivers.VC
{
return "Tap for keyboard";
}
if(Regex.Match(ds, @"^\d{4,7}$").Success) // 456-7890
return string.Format("{0}-{1}", ds.Substring(0, 3), ds.Substring(3));
if (Regex.Match(ds, @"^9\d{4,7}$").Success) // 456-7890
return string.Format("9 {0}-{1}", ds.Substring(1, 3), ds.Substring(4));
if (Regex.Match(ds, @"^\d{8,10}$").Success) // 123-456-78
return string.Format("({0}) {1}-{2}", ds.Substring(0, 3), ds.Substring(3, 3), ds.Substring(6));
if (Regex.Match(ds, @"^\d{10}$").Success) // 123-456-7890 full
return string.Format("({0}) {1}-{2}", ds.Substring(0, 3), ds.Substring(3, 3), ds.Substring(6));
if (Regex.Match(ds, @"^1\d{10}$").Success)
return string.Format("+1 ({0}) {1}-{2}", ds.Substring(1, 3), ds.Substring(4, 3), ds.Substring(7));
if (Regex.Match(ds, @"^9\d{10}$").Success)
return string.Format("9 ({0}) {1}-{2}", ds.Substring(1, 3), ds.Substring(4, 3), ds.Substring(7));
if (Regex.Match(ds, @"^91\d{10}$").Success)
return string.Format("9 +1 ({0}) {1}-{2}", ds.Substring(2, 3), ds.Substring(5, 3), ds.Substring(8));
return ds;
return GetFormattedPhoneNumber(ds);
}
/// <summary>
/// Formats a string of numbers as a North American phone number
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
string GetFormattedPhoneNumber(string s)
{
if (Regex.Match(s, @"^\d{4,7}$").Success) // 456-7890
return string.Format("{0}-{1}", s.Substring(0, 3), s.Substring(3));
if (Regex.Match(s, @"^9\d{4,7}$").Success) // 456-7890
return string.Format("9 {0}-{1}", s.Substring(1, 3), s.Substring(4));
if (Regex.Match(s, @"^\d{8,10}$").Success) // 123-456-78
return string.Format("({0}) {1}-{2}", s.Substring(0, 3), s.Substring(3, 3), s.Substring(6));
if (Regex.Match(s, @"^\d{10}$").Success) // 123-456-7890 full
return string.Format("({0}) {1}-{2}", s.Substring(0, 3), s.Substring(3, 3), s.Substring(6));
if (Regex.Match(s, @"^1\d{10}$").Success)
return string.Format("+1 ({0}) {1}-{2}", s.Substring(1, 3), s.Substring(4, 3), s.Substring(7));
if (Regex.Match(s, @"^9\d{10}$").Success)
return string.Format("9 ({0}) {1}-{2}", s.Substring(1, 3), s.Substring(4, 3), s.Substring(7));
if (Regex.Match(s, @"^91\d{10}$").Success)
return string.Format("9 +1 ({0}) {1}-{2}", s.Substring(2, 3), s.Substring(5, 3), s.Substring(8));
return s;
}
enum eKeypadMode