diff --git a/Essentials Core/PepperDashEssentialsBase/Devices/IHasDialer.cs b/Essentials Core/PepperDashEssentialsBase/Devices/IHasDialer.cs
index f9e03548..c4682abd 100644
--- a/Essentials Core/PepperDashEssentialsBase/Devices/IHasDialer.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Devices/IHasDialer.cs
@@ -13,7 +13,7 @@ namespace PepperDash.Essentials.Core
{
// Add requirements for Dialer functionality
- void Dial();
+ void Dial(string number);
void EndCall();
void AcceptCall();
void RejectCall();
diff --git a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
index 6d2622f7..adf18e16 100644
--- a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
+++ b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
@@ -46,9 +46,9 @@
off
-
+
False
- ..\..\..\CodeBlue\libraries\Cisco CODEC\Cisco One Button To Push\Cisco One Button To Push\bin\Cisco One Button To Push.dll
+ ..\..\..\Crestron Cisco OBTP\OBTP\bin\Cisco One Button To Push.dll
False
diff --git a/Essentials Devices Common/Essentials Devices Common/VC/Cisco/CiscoCodec.cs b/Essentials Devices Common/Essentials Devices Common/VC/Cisco/CiscoCodec.cs
index 8c0b59b0..56397284 100644
--- a/Essentials Devices Common/Essentials Devices Common/VC/Cisco/CiscoCodec.cs
+++ b/Essentials Devices Common/Essentials Devices Common/VC/Cisco/CiscoCodec.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
-using Crestron.SimplSharp.Net.Http;
+using Crestron.SimplSharp.Net.Https;
using Crestron.SimplSharp.CrestronXml;
using Crestron.SimplSharp.CrestronXml.Serialization;
using Newtonsoft.Json;
@@ -31,7 +31,7 @@ namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
private CiscoCodecStatus.Status CodecStatus;
- private HttpClient Client;
+ private HttpsClient Client;
private HttpApiServer Server;
@@ -60,7 +60,7 @@ namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
CodecStatus = new CiscoCodecStatus.Status();
- Client = new HttpClient();
+ Client = new HttpsClient();
Server = new HttpApiServer();
@@ -83,7 +83,7 @@ namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 2000, 120000, 300000, "xStatus SystemUnit Software Version\r");
DeviceManager.AddDevice(CommunicationMonitor);
- Client = new HttpClient();
+ Client = new HttpsClient();
Client.Verbose = true;
Client.KeepAlive = true;
@@ -108,7 +108,7 @@ namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
//CodecObtp.GetMeetings();
- PhoneBook.DownloadPhoneBook(Corporate_Phone_Book.ePhoneBookLocation.Corporate);
+ //PhoneBook.DownloadPhoneBook(Corporate_Phone_Book.ePhoneBookLocation.Corporate);
return base.CustomActivate();
}
@@ -125,13 +125,16 @@ namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
private void SendHttpCommand(string command, eCommandType commandType)
{
- HttpClientRequest request = new HttpClientRequest();
+ HttpsClientRequest request = new HttpsClientRequest();
string urlSuffix = null;
Client.UserName = null;
Client.Password = null;
+ Client.PeerVerification = false;
+ Client.HostVerification = false;
+
request.RequestType = RequestType.Post;
if(!string.IsNullOrEmpty(HttpSessionId))
@@ -165,13 +168,15 @@ namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
case eCommandType.GetStatus:
{
request.RequestType = RequestType.Get;
- urlSuffix = "/status.xml";
+ request.Header.SetHeaderValue("Content-Type", "text/xml");
+ urlSuffix = "/getxml?location=/Status";
break;
}
case eCommandType.GetConfiguration:
{
request.RequestType = RequestType.Get;
- urlSuffix = "/configuration.xml";
+ request.Header.SetHeaderValue("Content-Type", "text/xml");
+ urlSuffix = "/getxml?location=/Configuration";
break;
}
}
@@ -185,7 +190,7 @@ namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
Client.DispatchAsync(request, PostConnectionCallback);
}
- void PostConnectionCallback(HttpClientResponse resp, HTTP_CALLBACK_ERROR err)
+ void PostConnectionCallback(HttpsClientResponse resp, HTTP_CALLBACK_ERROR err)
{
try
{
@@ -199,9 +204,6 @@ namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
{
// Get the initial configruation for sync purposes
SendHttpCommand("", eCommandType.GetConfiguration);
-
- // Get the initial status for sync purposes
- SendHttpCommand("", eCommandType.GetStatus);
}
else
{
@@ -209,20 +211,31 @@ namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
{
if (resp.ContentString.IndexOf("") > -1)
{
- CodecConfiguration = CrestronXMLSerialization.DeSerializeObject(resp.ContentString);
+ XmlReaderSettings settings = new XmlReaderSettings();
+
+ XmlReader reader = new XmlReader(resp.ContentString, settings);
+
+ CodecConfiguration = CrestronXMLSerialization.DeSerializeObject(reader);
Debug.Console(1, this, "Product Name: {0} Software Version: {1} ApiVersion: {2}", CodecConfiguration.Product, CodecConfiguration.Version, CodecConfiguration.ApiVersion);
+
+ // Get the initial status for sync purposes
+ SendHttpCommand("", eCommandType.GetStatus);
}
else if (resp.ContentString.IndexOf("") > -1)
{
- CodecStatus = CrestronXMLSerialization.DeSerializeObject(resp.ContentString);
+ XmlReaderSettings settings = new XmlReaderSettings();
+
+ XmlReader reader = new XmlReader(resp.ContentString, settings);
+
+ CodecStatus = CrestronXMLSerialization.DeSerializeObject(reader);
Debug.Console(1, this, "Product Name: {0} Software Version: {1} ApiVersion: {2} Volume: {3}", CodecStatus.Product, CodecStatus.Version, CodecStatus.ApiVersion, CodecStatus.Audio.Volume);
}
}
catch (Exception ex)
{
- Debug.Console(1, this, "Error Deserializing feedback from codec: {0}", ex);
+ Debug.Console(1, this, "Error Deserializing XML document from codec: {0}", ex);
}
}
}
diff --git a/Essentials/PepperDashEssentials/ControlSystem.cs b/Essentials/PepperDashEssentials/ControlSystem.cs
index a3550de1..16451812 100644
--- a/Essentials/PepperDashEssentials/ControlSystem.cs
+++ b/Essentials/PepperDashEssentials/ControlSystem.cs
@@ -59,7 +59,7 @@ namespace PepperDash.Essentials
// CODEC TESTING
- GenericSshClient TestCodecClient = new GenericSshClient("TestCodec-1--SshClient", "10.11.50.135", 22, "crestron", "e##3nti@ls");
+ GenericSshClient TestCodecClient = new GenericSshClient("TestCodec-1--SshClient", "10.11.50.135", 22, "crestron", "2H3Zu&OvgXp6");
PepperDash.Essentials.Devices.VideoCodec.Cisco.CiscoCodec TestCodec =
new PepperDash.Essentials.Devices.VideoCodec.Cisco.CiscoCodec("TestCodec-1", "Cisco Spark Room Kit", TestCodecClient, 8080);