mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-26 19:04:47 +00:00
Added handler for phone call activity, DDVC bridge
This commit is contained in:
@@ -85,7 +85,7 @@ namespace PepperDash.Essentials
|
||||
"mobilehttprequest", "Tests an HTTP get to URL given", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
CrestronConsole.AddNewConsoleCommand(PrintActionDictionaryPaths, "mobileshowactionpaths",
|
||||
"Prints the paths in teh Action Dictionary", ConsoleAccessLevelEnum.AccessOperator);
|
||||
"Prints the paths in the Action Dictionary", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(s => ConnectWebsocketClient(), "mobileconnect",
|
||||
"Forces connect of websocket", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(s => CleanUpWebsocketClient(), "mobiledisco",
|
||||
@@ -176,6 +176,7 @@ namespace PepperDash.Essentials
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Adding room bridge and sending configuration");
|
||||
SystemUuid = ConfigReader.ConfigObject.SystemUuid;
|
||||
RegisterSystemToServer();
|
||||
}
|
||||
}
|
||||
@@ -188,6 +189,7 @@ namespace PepperDash.Essentials
|
||||
void bridge_ConfigurationIsReady(object sender, EventArgs e)
|
||||
{
|
||||
Debug.Console(1, this, "Bridge ready. Registering");
|
||||
SystemUuid = ConfigReader.ConfigObject.SystemUuid;
|
||||
// send the configuration object to the server
|
||||
RegisterSystemToServer();
|
||||
}
|
||||
@@ -207,6 +209,8 @@ namespace PepperDash.Essentials
|
||||
/// <param name="command"></param>
|
||||
void AuthorizeSystem(string code)
|
||||
{
|
||||
SystemUuid = ConfigReader.ConfigObject.SystemUuid;
|
||||
|
||||
if (string.IsNullOrEmpty(SystemUuid))
|
||||
{
|
||||
CrestronConsole.ConsoleCommandResponse("System does not have a UUID. Please ensure proper portal-format configuration is loaded and restart.");
|
||||
@@ -301,7 +305,6 @@ namespace PepperDash.Essentials
|
||||
void RegisterSystemToServer()
|
||||
{
|
||||
ConnectWebsocketClient();
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -310,6 +313,8 @@ namespace PepperDash.Essentials
|
||||
/// <param name="o"></param>
|
||||
void ConnectWebsocketClient()
|
||||
{
|
||||
|
||||
|
||||
Debug.Console(1, this, "Initializing Stream client to server.");
|
||||
|
||||
if (WSClient != null)
|
||||
@@ -318,8 +323,6 @@ namespace PepperDash.Essentials
|
||||
CleanUpWebsocketClient();
|
||||
}
|
||||
|
||||
SystemUuid = ConfigReader.ConfigObject.SystemUuid;
|
||||
|
||||
WSClient = new WebSocketClient();
|
||||
WSClient.URL = string.Format("wss://{0}/system/join/{1}", Config.ServerUrl, this.SystemUuid);
|
||||
WSClient.ConnectionCallBack = Websocket_ConnectCallback;
|
||||
@@ -341,6 +344,10 @@ namespace PepperDash.Essentials
|
||||
WSClient.SendCallBack = Websocket_SendCallback;
|
||||
WSClient.ReceiveCallBack = Websocket_ReceiveCallback;
|
||||
WSClient.ReceiveAsync();
|
||||
SendMessageObjectToServer(new
|
||||
{
|
||||
type = "hello"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -241,6 +241,11 @@ namespace PepperDash.Essentials.Room.Cotija
|
||||
|
||||
Parent.AddAction(@"/room/room1/defaultsource", new Action(() =>
|
||||
EISC.PulseBool(BoolJoin.ActivitySharePress)));
|
||||
Parent.AddAction(@"/room/room1/activityVideo", new Action(() =>
|
||||
EISC.PulseBool(BoolJoin.ActivityVideoCallPress)));
|
||||
Parent.AddAction(@"/room/room1/activityPhone", new Action(() =>
|
||||
EISC.PulseBool(BoolJoin.ActivityPhoneCallPress)));
|
||||
|
||||
|
||||
Parent.AddAction(@"/room/room1/volumes/master/level", new Action<ushort>(u =>
|
||||
EISC.SetUshort(UshortJoin.MasterVolumeLevel, u)));
|
||||
@@ -392,6 +397,11 @@ namespace PepperDash.Essentials.Room.Cotija
|
||||
var name = EISC.StringOutput[i + 1].StringValue;
|
||||
rmProps.SpeedDials.Add(new DDVC01SpeedDial { Number = num, Name = name});
|
||||
}
|
||||
|
||||
// This MAY need a check
|
||||
rmProps.AudioCodecKey = "audioCodec";
|
||||
rmProps.VideoCodecKey = null; // "videoCodec";
|
||||
|
||||
// volume control names
|
||||
var volCount = EISC.UShortOutput[701].UShortValue;
|
||||
|
||||
|
||||
@@ -20,5 +20,7 @@ namespace PepperDash.Essentials.Room.Config
|
||||
public string DefaultSourceItem { get; set; }
|
||||
[JsonProperty("videoCodecKey")]
|
||||
public string VideoCodecKey { get; set; }
|
||||
[JsonProperty("audioCodecKey")]
|
||||
public string AudioCodecKey { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ devjson:1 {"deviceKey":"timer","methodName":"Cancel" }
|
||||
|
||||
devjson:1 {"deviceKey":"timer","methodName":"Reset" }
|
||||
|
||||
devjson:1 {"deviceKey":"room1","methodName":"Shutdown" }
|
||||
devjson:10 {"deviceKey":"room1","methodName":"Shutdown" }
|
||||
|
||||
devjson:1 {"deviceKey":"mockVc-1", "methodName":"TestIncomingVideoCall", "params": ["123-456-7890"]}
|
||||
|
||||
@@ -30,5 +30,8 @@ devjson:1 {"deviceKey":"room1.InCallFeedback","methodName":"SetTestValue", "para
|
||||
|
||||
devjson:1 {"deviceKey":"room1.InCallFeedback","methodName":"ClearTestValue", "params": []}
|
||||
|
||||
|
||||
|
||||
devjson:10 {"deviceKey":"mobileControlBridge-essentialsHuddle","methodName":"TestOne"}
|
||||
devjson:10 {"deviceKey":"mobileControlBridge-essentialsHuddle","methodName":"TestMulti"}
|
||||
devjson:10 {"deviceKey":"room1","methodName":"RunDefaultPresentRoute"}
|
||||
|
||||
Reference in New Issue
Block a user