mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 10:58:28 +00:00
feat: add error handling and logging to SendAtcFullMessageObject method in IDialerCallStatusMessenger
This commit is contained in:
parent
7fca4d74bf
commit
2588b81f0d
1 changed files with 18 additions and 10 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Core.Logging;
|
||||||
using PepperDash.Essentials.Devices.Common.AudioCodec;
|
using PepperDash.Essentials.Devices.Common.AudioCodec;
|
||||||
using PepperDash.Essentials.Devices.Common.Codec;
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
|
|
||||||
|
|
@ -103,18 +104,25 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private void SendAtcFullMessageObject(string id = null)
|
private void SendAtcFullMessageObject(string id = null)
|
||||||
{
|
{
|
||||||
var info = Codec.CodecInfo;
|
try
|
||||||
|
|
||||||
PostStatusMessage(JToken.FromObject(new
|
|
||||||
{
|
{
|
||||||
isInCall = Codec.IsInCall,
|
var info = Codec.CodecInfo;
|
||||||
calls = Codec.ActiveCalls,
|
|
||||||
info = new
|
PostStatusMessage(JToken.FromObject(new
|
||||||
{
|
{
|
||||||
phoneNumber = info.PhoneNumber
|
isInCall = Codec.IsInCall,
|
||||||
}
|
calls = Codec.ActiveCalls,
|
||||||
}), id
|
info = new
|
||||||
);
|
{
|
||||||
|
phoneNumber = info?.PhoneNumber
|
||||||
|
}
|
||||||
|
}), id
|
||||||
|
);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
this.LogError(ex, "Error sending dialer call status full message");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue