- Joined
- Oct 7, 2024
- Messages
- 16
- Reaction score
- 4
CRM: Exception during call reporting
System.NullReferenceException: Object reference not set to an instance of an object.
at TcxLexicalParser.LexEvaluator.InstanceFunction(IValueManager valueManager, FunctionElement functionElement)
at TcxLexicalParser.LexEvaluator.ProcessInt(FunctionElement functionElement, IValueManager valueManager)
at Integration.Crm.Engine.ScenarioProcessorBase.CreateJsonFromPostValues(RequestItem requestItem, IValueManager customManager)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessRequest(Boolean authScenario, ScenarioRequest request, IValueManager customManager, HttpClient client, Boolean retry, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessMatching(ProtocolScenario scenario, MatchingPath matching, ResponseMatcher responseMatcher, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, HashSet`1 distinctMatchings, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessFoundMatchings(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, List`1 matchings, ResponseMatcher responseMatcher, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessMatching(ProtocolScenario scenario, MatchingPath matching, ResponseMatcher responseMatcher, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, HashSet`1 distinctMatchings, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessFoundMatchings(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, List`1 matchings, ResponseMatcher responseMatcher, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessMatching(ProtocolScenario scenario, MatchingPath matching, ResponseMatcher responseMatcher, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, HashSet`1 distinctMatchings, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessFoundMatchings(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, List`1 matchings, ResponseMatcher responseMatcher, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
at Integration.Crm.Engine.ScenarioProcessorBase.Execute(ProtocolScenario scenario, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
at Integration.Crm.Engine.CrmProcessor.ExecuteScenarioByName(String scenarioName, IEnumerable`1 parameters, Boolean useNoAuthProvider, CancellationToken token)
at Integration.Crm.Engine.CrmProcessor.ExecuteScenarioWithRetries(String scenarioId, Dictionary`2 parameters, CancellationToken token)
at Integration.Crm.Engine.CrmProcessor.ReportCall(CallEndedEvent callEndedEvent, CancellationToken token)
<Value Key="establishedAt" Passes="1" Type="String">[[CallEstablishedTimeUTC].ToString("dd-MM-yyyy HH:mm:ss")]</Value>CallEstablishedTimeUTC, but that variable might be null when the call is not answered, so you would need to add an If to add that only when the variable has a value:<Value Key="establishedAt" Passes="1" Type="String" If="[IIf([CallType]==Inbound||[CallType]==Outbound,True,False)]">[[CallEstablishedTimeUTC].ToString("dd-MM-yyyy HH:mm:ss")]</Value>If attribute, you can just remove the entire line for the 2 scenarios in which you don't have the established date time (missed and unanswered call). That will simplify the XML. But either way it will work.Founded in 2005, when VoIP was an emerging technology, 3CX has gone on to establish itself as a global leader in business communications.