Skip to content

Commit

Permalink
fix: removes quotes from incoming call information
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrock78 committed Nov 25, 2024
1 parent 6289bb2 commit 26654a3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/CiscoCallStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ public CiscoCallStatus(CiscoRoomOsDevice parent)
var incoming =
activeCallItems.Values.FirstOrDefault(item => item.Direction == eCodecCallDirection.Incoming);

return incoming == null ? string.Empty : incoming.Name;
return incoming == null ? string.Empty : incoming.Name.Trim(new[] { ' ', '\"' }); ;
});

IncomingCallNumber = new StringFeedback("IncomingCallNumber", () =>
{
var incoming =
activeCallItems.Values.FirstOrDefault(item => item.Direction == eCodecCallDirection.Incoming);

return incoming == null ? string.Empty : incoming.Number;
return incoming == null ? string.Empty : incoming.Number.Trim(new[] { ' ', '\"' }); ;
});

CallIsIncoming.RegisterForDebug(parent);
Expand Down Expand Up @@ -149,10 +149,10 @@ public void HandleResponse(string response)
switch (property)
{
case "DisplayName":
activeCallItems[callId].Name = value;
activeCallItems[callId].Name = value.Trim(new[] { ' ', '\"' }); ;
break;
case "RemoteNumber":
activeCallItems[callId].Number = value;
activeCallItems[callId].Number = value.Trim(new[] { ' ', '\"' }); ;
break;
case "CallType":
activeCallItems[callId].Type =
Expand Down
11 changes: 11 additions & 0 deletions src/CiscoJoinMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,17 @@ public class CiscoJoinMap : JoinMapBaseAdvanced
JoinType = eJoinType.Serial
});

[JoinName("GetRecents")]
public JoinDataComplete GetRecents = new JoinDataComplete(new JoinData()
{
JoinNumber = 180,
JoinSpan = 1
}, new JoinMetadata()
{
Description = "Refreshes Recent History List",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});

[JoinName("ToggleLayout")]
public JoinDataComplete ToggleLayout = new JoinDataComplete(new JoinData()
Expand Down
9 changes: 8 additions & 1 deletion src/CiscoRecents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public int SelectedRecent
}



internal readonly List<StringFeedback> Feedbacks;
internal readonly StringFeedback SelectedRecentName;
internal readonly StringFeedback SelectedRecentNumber;
Expand Down Expand Up @@ -99,6 +98,14 @@ public CiscoRecents(CiscoRoomOsDevice parent) : base (parent.Key + "-Recents")
SelectedRecentNumber.RegisterForDebug(this);
}

public void RefreshHistoryList()
{
foreach (var feedback in Feedbacks)
{
feedback.FireUpdate();
}
}

public IEnumerable<string> Subscriptions { get; private set; }

public bool HandlesResponse(string response)
Expand Down
5 changes: 5 additions & 0 deletions src/CiscoRoomOsDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,10 @@ public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, E
trilist.SetUShortSigAction(joinMap.SelectRecentCall.JoinNumber, value => Recents.SelectedRecent = value);
Recents.SelectedRecentName.LinkInputSig(trilist.StringInput[joinMap.SelectRecentName.JoinNumber]);
Recents.SelectedRecentNumber.LinkInputSig(trilist.StringInput[joinMap.SelectRecentNumber.JoinNumber]);

trilist.SetSigTrueAction(joinMap.GetRecents.JoinNumber, () => Recents.RefreshHistoryList());



for (var x = 0; x < joinMap.Recents.JoinSpan; ++x)
{
Expand All @@ -1046,6 +1050,7 @@ public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, E
trilist.SetSigTrueAction(joinMap.DoNotDisturbOff.JoinNumber, DeactivateDoNotDisturbMode);
trilist.SetSigTrueAction(joinMap.DoNotDisturbToggle.JoinNumber, ToggleDoNotDisturbMode);


trilist.SetSigTrueAction(joinMap.ToggleLayout.JoinNumber, LocalLayoutToggle);
trilist.SetStringSigAction(joinMap.SelectLayout.JoinNumber, LayoutSet);
Layouts.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentLayout.JoinNumber]);
Expand Down

0 comments on commit 26654a3

Please sign in to comment.