mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Updates to fix issues with sending individual program status messages to the app server. Minor updates to AtcDdvc01Messenger based on testing MC with Heath
This commit is contained in:
@@ -31,11 +31,19 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||
/// <summary>
|
||||
/// 211
|
||||
/// </summary>
|
||||
const uint SCurrentCallString = 211;
|
||||
const uint SCurrentCallNumber = 211;
|
||||
/// <summary>
|
||||
/// 212
|
||||
/// </summary>
|
||||
const uint SCurrentCallName = 212;
|
||||
/// <summary>
|
||||
/// 221
|
||||
/// </summary>
|
||||
const uint SHookState = 221;
|
||||
/// <summary>
|
||||
/// 222
|
||||
/// </summary>
|
||||
const uint SCallDirection = 222;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -79,11 +87,12 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||
/// </summary>
|
||||
void SendFullStatus()
|
||||
{
|
||||
|
||||
|
||||
this.PostStatusMessage(new
|
||||
{
|
||||
calls = GetCurrentCallList(),
|
||||
callStatus = EISC.GetString(SHookState),
|
||||
currentCallString = EISC.GetString(SCurrentCallString),
|
||||
currentCallString = EISC.GetString(SCurrentCallNumber),
|
||||
currentDialString = EISC.GetString(SCurrentDialString),
|
||||
isInCall = EISC.GetString(SHookState) == "Connected"
|
||||
});
|
||||
@@ -95,31 +104,33 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||
/// <param name="appServerController"></param>
|
||||
protected override void CustomRegisterWithAppServer(CotijaSystemController appServerController)
|
||||
{
|
||||
Action<object> send = this.PostStatusMessage;
|
||||
EISC.SetStringSigAction(SCurrentDialString, s => send(new { currentDialString = s }));
|
||||
//EISC.SetStringSigAction(SCurrentDialString, s => PostStatusMessage(new { currentDialString = s }));
|
||||
|
||||
EISC.SetStringSigAction(SHookState, s =>
|
||||
{
|
||||
CurrentCallItem.Status = (eCodecCallStatus)Enum.Parse(typeof(eCodecCallStatus), s, true);
|
||||
GetCurrentCallList();
|
||||
send(new
|
||||
{
|
||||
calls = GetCurrentCallList(),
|
||||
callStatus = s
|
||||
});
|
||||
//GetCurrentCallList();
|
||||
SendCallsList();
|
||||
});
|
||||
|
||||
EISC.SetStringSigAction(SCurrentCallString, s =>
|
||||
EISC.SetStringSigAction(SCurrentCallNumber, s =>
|
||||
{
|
||||
CurrentCallItem.Name = s;
|
||||
CurrentCallItem.Number = s;
|
||||
send(new
|
||||
{
|
||||
calls = GetCurrentCallList(),
|
||||
currentCallString = s
|
||||
});
|
||||
SendCallsList();
|
||||
});
|
||||
|
||||
EISC.SetStringSigAction(SCurrentCallName, s =>
|
||||
{
|
||||
CurrentCallItem.Name = s;
|
||||
SendCallsList();
|
||||
});
|
||||
|
||||
EISC.SetStringSigAction(SCallDirection, s =>
|
||||
{
|
||||
CurrentCallItem.Direction = (eCodecCallDirection)Enum.Parse(typeof(eCodecCallDirection), s, true);
|
||||
SendCallsList();
|
||||
});
|
||||
|
||||
// Add press and holds using helper
|
||||
Action<string, uint> addPHAction = (s, u) =>
|
||||
AppServerController.AddAction(MessagePath + s, new PressAndHoldAction(b => EISC.SetBool(u, b)));
|
||||
@@ -149,6 +160,14 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||
}));
|
||||
}
|
||||
|
||||
void SendCallsList()
|
||||
{
|
||||
PostStatusMessage(new
|
||||
{
|
||||
calls = GetCurrentCallList(),
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Turns the
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user