Merge pull request #278 from PepperDash/feature/Update-CiscoSpark-ce9.13

Update CiscoSpark to work with ce9.13
This commit is contained in:
Andrew Welker
2020-06-24 10:03:05 -06:00
committed by GitHub

View File

@@ -601,9 +601,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
//JsonSerializerSettings settings = new JsonSerializerSettings();
//settings.NullValueHandling = NullValueHandling.Ignore;
//settings.MissingMemberHandling = MissingMemberHandling.Ignore;
//settings.ObjectCreationHandling = ObjectCreationHandling.Auto;
if (response.IndexOf("\"Status\":{") > -1)
//settings.ObjectCreationHandling = ObjectCreationHandling.Auto;
if (response.IndexOf("\"Status\":{") > -1 || response.IndexOf("\"Status\": {") > -1)
{
// Status Message
@@ -775,8 +775,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
if (!SyncState.InitialConfigurationMessageWasReceived)
SendText("xConfiguration");
}
}
else if (response.IndexOf("\"Configuration\":{") > -1)
}
else if (response.IndexOf("\"Configuration\":{") > -1 || response.IndexOf("\"Configuration\": {") > -1)
{
// Configuration Message
@@ -791,39 +791,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
}
}
else if (response.IndexOf("\"Event\":{") > -1)
{
if (response.IndexOf("\"CallDisconnect\":{") > -1)
}
else if (response.IndexOf("\"Event\":{") > -1 || response.IndexOf("\"Event\": {") > -1)
{
if (response.IndexOf("\"CallDisconnect\":{") > -1 || response.IndexOf("\"CallDisconnect\": {") > -1)
{
CiscoCodecEvents.RootObject eventReceived = new CiscoCodecEvents.RootObject();
JsonConvert.PopulateObject(response, eventReceived);
EvalutateDisconnectEvent(eventReceived);
}
else if (response.IndexOf("\"Bookings\":{") > -1) // The list has changed, reload it
}
else if (response.IndexOf("\"Bookings\":{") > -1 || response.IndexOf("\"Bookings\": {") > -1) // The list has changed, reload it
{
GetBookings(null);
}
}
else if (response.IndexOf("\"CommandResponse\":{") > -1)
}
else if (response.IndexOf("\"CommandResponse\":{") > -1 || response.IndexOf("\"CommandResponse\": {") > -1)
{
// CommandResponse Message
if (response.IndexOf("\"CallHistoryRecentsResult\":{") > -1)
// CommandResponse Message
if (response.IndexOf("\"CallHistoryRecentsResult\":{") > -1 || response.IndexOf("\"CallHistoryRecentsResult\": {") > -1)
{
var codecCallHistory = new CiscoCallHistory.RootObject();
JsonConvert.PopulateObject(response, codecCallHistory);
CallHistory.ConvertCiscoCallHistoryToGeneric(codecCallHistory.CommandResponse.CallHistoryRecentsResult.Entry);
}
else if (response.IndexOf("\"CallHistoryDeleteEntryResult\":{") > -1)
}
else if (response.IndexOf("\"CallHistoryDeleteEntryResult\":{") > -1 || response.IndexOf("\"CallHistoryDeleteEntryResult\": {") > -1)
{
GetCallHistory();
}
else if (response.IndexOf("\"PhonebookSearchResult\":{") > -1)
}
else if (response.IndexOf("\"PhonebookSearchResult\":{") > -1 || response.IndexOf("\"PhonebookSearchResult\": {") > -1)
{
var codecPhonebookResponse = new CiscoCodecPhonebook.RootObject();