Call jourling

Status
Not open for further replies.

developerzeeshan

Free User
Joined
Aug 9, 2021
Messages
84
Reaction score
1
sir i cant receive miss call in crm but can receive answered call in crm this is my template only answered call i am recieving please help me please check the id and entity id is fine because not receiving any call other then answere incoming in crm


<Scenario Id="ReportCall" Type="REST" EntityId="CallID" EntityOrder="[CallID]">
<Request SkipIf="[IIf([ReportCallEnabled]!=True||[EntityId]==&quot;&quot;,True,[IIf([CallType]!=Inbound,True,False)])]" Url="https://crm.callcenterempire.com/createCall?number=[Number]&amp;agent=[Agent]&amp;calldirection=[CallDirection]&amp;calltype=[CallType]&amp;duration=[Duration]&amp;calltext=[InboundCallText]" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Get" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="calltype" Passes="1" Type="String">[CallType]</Value>
<Value Key="calldirection" Passes="1" Type="String">[CallDirection]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="calltext" Passes="2" Type="String">[InboundCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallMissed" AllowEmpty="false" />
</Scenario>
<Scenario Id="ReportCallMissed" Type="REST" EntityId="CallMissedID" EntityOrder="[CallMissedID]">
<Request SkipIf="[IIf([ReportCallEnabled]!=True||[EntityId]==&quot;&quot;,True,[IIf([CallType]!=Missed,True,False)])]" Url="https://crm.callcenterempire.com/createCall?number=[Number]&amp;agent=[Agent]&amp;calldirection=[CallDirection]&amp;calltype=[CallType]&amp;duration=[Duration]&amp;calltext=[MissedCallText]" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Get" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="calltype" Passes="1" Type="String">[CallType]</Value>
<Value Key="calldirection" Passes="1" Type="String">[CallDirection]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="calltext" Passes="2" Type="String">[MissedCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallOutbound" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallOutbound" Type="REST" EntityId="CallOutboundID" EntityOrder="[CallOutboundID]">
<Request SkipIf="[IIf([ReportCallEnabled]!=True||[EntityId]==&quot;&quot;,True,[IIf([CallType]!=Outbound,True,False)])]" Url="https://crm.callcenterempire.com/createCall?number=[Number]&amp;agent=[Agent]&amp;calldirection=[CallDirection]&amp;calltype=[CallType]&amp;duration=[Duration]&amp;calltext=[OutboundCallText]" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Get" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="calltype" Passes="1" Type="String">[CallType]</Value>
<Value Key="calldirection" Passes="1" Type="String">[CallDirection]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="calltext" Passes="2" Type="String">[OutboundCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallNotanswered" AllowEmpty="false" />
</Scenario>
<Scenario Id="ReportCallNotanswered" Type="REST" EntityId="CallNotansweredID" EntityOrder="[CallNotansweredID]">
<Request SkipIf="[IIf([ReportCallEnabled]!=True||[EntityId]==&quot;&quot;,True,[IIf([CallType]!=Notanswered,True,False)])]" Url="https://crm.callcenterempire.com/createCall?number=[Number]&amp;agent=[Agent]&amp;calldirection=[CallDirection]&amp;calltype=[CallType]&amp;duration=[Duration]&amp;calltext=[NotAnsweredOutboundCallText]" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Get" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="calltype" Passes="1" Type="String">[CallType]</Value>
<Value Key="calldirection" Passes="1" Type="String">[CallDirection]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="calltext" Passes="2" Type="String">[NotAnsweredOutboundCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="false" />
</Scenario>
<Scenario Id="ReportChat" Type="REST" EntityId="ChatID" EntityOrder="[ChatID]">
<Request SkipIf="[ReportChatEnabled]!=True" Url="https://crm.callcenterempire.com/createChat?agent=[Agent]&amp;agentemail=[AgentEmail]&amp;firstname=[AgentFirstName]&amp;lastname=[AgentLastName]&amp;chatmessage=[ChatMessages]&amp;chatsubject=[ChatSubject]&amp;duration=[Duration]" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Get" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="email" Passes="1" Type="String"></Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="chatmessage" Passes="1" Type="Integer">[[ChatMessages].Replace("
","").Replace("
","&lt;br/&gt;").Replace("\","")]</Value>
<Value Key="chatsubject" Passes="2" Type="Integer">[ChatSubject]</Value>
<Value Key="agentfirstname" Passes="1" Type="Integer">[AgentFirstName]</Value>
<Value Key="agentlastname" Passes="1" Type="Integer">[AgentLastName]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
 
Last edited:
You will need to adjust the SkipIf attribute for the remaining scenarios: "ReportCallMissed", "ReportCallOutbound" and "ReportCallNotanswered". You will see that you're checking if the EntityId is empty there, you need to remove that part from the expression. Then the call will be reported even if no contact is matched.
Sir already removed this but its still not reporting in crm kindly check the skipif in the screenshot its fine for missed outbound and unanswered

1632569779811.png
 
Last edited:
  • Like
Reactions: Evolute IT
The SkipIf attribute looks fine now. I would like to see the log after this change....
The log file is attached kindly unzip and check the file
 

Attachments

The log file is attached kindly unzip and check the file
The log shows that calls are being reported, for example:
2021/09/27 07:48:56.750|24307|0048|Info|CRM: about to report 1 calls at maxConcurrency 1
2021/09/27 07:48:56.750|24307|0048|Verb|CRM: Call Journaling event received, searching for number '00919900112368' in 3CX Contacts.
2021/09/27 07:48:56.750|24307|0048|Verb|Processing scenario 'ReportCall'.
2021/09/27 07:48:56.750|24307|0048|Verb|Creating new HttpClient with no authentication
2021/09/27 07:48:56.750|24307|0048|Verb|Performing GET request 'http://54.38.120.117/crm/createCall...pe=Inbound&duration=00:10&calltext=[DateTime]: Answered incoming call from [Number] to [Agent] ([Duration])'.
2021/09/27 07:48:56.819|24307|0048|Verb|The response is: ''

But this is for inbound calls. I think that the issue might be that you're configuring the output with AllowEmpty="false" and you should do it with AllowEmpty="true", otherwise a skipped scenario will not trigger the next.
 
ok thanks let me check this is the template now if you check once all is ok now


<?xml version="1.0"?>
<Crm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Country="US" Name="vtiger template" Version="1" SupportsEmojis="true">
<Number Prefix="AsIs" MaxLength="[MaxLength]" />
<Connection MaxConcurrentRequests="2" />
<Parameters>
<Parameter Name="ReportCallEnabled" Type="Boolean" Editor="String" Title="Enable Call Journaling" Default="False" />
<Parameter Name="Subject" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Call Subject:" Default="3CX PhoneSystem Call" />
<Parameter Name="InboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Answered Inbound Call:" Default="[DateTime]: Answered incoming call from [Number] to [Agent] ([Duration])" />
<Parameter Name="MissedCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Missed Call:" Default="[DateTime]: Missed call from [Number] to [Agent]" />
<Parameter Name="OutboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Answered Outbound Call:" Default="[DateTime]: Answered outgoing call from [Agent] to [Number] ([Duration])" />
<Parameter Name="NotAnsweredOutboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Unanswered Outbound Call:" Default="[DateTime]: Unanswered outgoing call from [Agent] to [Number]" />
</Parameters>
<Authentication Type="No" />
<Scenarios>
<Scenario Id="" Type="REST" EntityId="ContactID" EntityOrder="[ContactID]">
<Request Url="http://54.38.120.117/crm/search?number=[Number]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">contact.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" Path="contact.id">
<Filter />
</Variable>
<Variable Name="FirstName" Path="contact.firstname">
<Filter />
</Variable>
<Variable Name="LastName" Path="contact.lastname">
<Filter />
</Variable>
<Variable Name="CompanyName" Path="contact.company">
<Filter />
</Variable>
<Variable Name="Email" Path="contact.email">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" Path="contact.businessphone">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="contact.mobilephone">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactID" Passes="0" Value="[ContactID]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="CompanyName" Passes="0" Value="[CompanyName]" />
<Output Type="Email" Passes="0" Value="" />
<Output Type="PhoneBusiness" Passes="0" Value="[PhoneBusiness]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="ContactUrl" Passes="0" Value="http://54.38.120.117/crm/show?ContactID=[ContactID]" />
<Output Type="EntityId" Passes="0" Value="[ContactID]" />
<Output Type="EntityType" Passes="0" Value="Contacts" />
</Outputs>
</Scenario>
<Scenario Id="LookupByEmail" Type="REST" EntityId="EmailID" EntityOrder="[EmailID]">
<Request Url="http://54.38.120.117/crm/search?email=[Email]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">contact.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" Path="contact.id">
<Filter />
</Variable>
<Variable Name="FirstName" Path="contact.firstname">
<Filter />
</Variable>
<Variable Name="LastName" Path="contact.lastname">
<Filter />
</Variable>
<Variable Name="CompanyName" Path="contact.company">
<Filter />
</Variable>
<Variable Name="Email" Path="contact.email">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" Path="contact.businessphone">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="contact.mobilephone">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactID" Passes="0" Value="[ContactID]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="CompanyName" Passes="0" Value="[CompanyName]" />
<Output Type="Email" Passes="0" Value="[Email]" />
<Output Type="PhoneBusiness" Passes="0" Value="[PhoneBusiness]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="ContactUrl" Passes="0" Value="http://54.38.120.117/crm/show?ContactID=[ContactID]" />
<Output Type="EntityId" Passes="0" Value="[ContactID]" />
<Output Type="EntityType" Passes="0" Value="Contacts" />
</Outputs>
</Scenario>
<Scenario Id="ReportCall" Type="REST" EntityId="CallID" EntityOrder="[CallID]">
<Request SkipIf="[IIf([ReportCallEnabled]!=True,True,[IIf([CallType]!=Inbound,True,False)])]" Url="http://54.38.120.117/crm/createCall?number=[[Number].Replace(&quot;+&quot;,&quot;%2B&quot;)]&amp;agent=[Agent]&amp;calldirection=[CallDirection]&amp;calltype=[CallType]&amp;duration=[Duration]&amp;calltext=[InboundCallText]&amp;name=[Name]" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Get" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="calltype" Passes="1" Type="String">[CallType]</Value>
<Value Key="calldirection" Passes="1" Type="String">[CallDirection]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="calltext" Passes="2" Type="String">[InboundCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallMissed" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallMissed" Type="REST" EntityId="CallMissed" EntityOrder="[CallMissed]">
<Request SkipIf="[IIf([ReportCallEnabled]!=True,True,[IIf([CallType]!=Inbound,True,False)])]" Url="http://54.38.120.117/crm/createCall?number=[[Number].Replace(&quot;+&quot;,&quot;%2B&quot;)]&amp;agent=[Agent]&amp;calldirection=[CallDirection]&amp;calltype=[CallType]&amp;duration=[Duration]&amp;calltext=[MissedCallText]" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Get" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="calltype" Passes="1" Type="String">[CallType]</Value>
<Value Key="calldirection" Passes="1" Type="String">[CallDirection]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="calltext" Passes="2" Type="String">[MissedCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallOutbound" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallOutbound" Type="REST" EntityId="CallOutboundID" EntityOrder="[CallOutboundID]">
<Request SkipIf="[IIf([ReportCallEnabled]!=True,True,[IIf([CallType]!=Outbound,True,False)])]" Url="http://54.38.120.117/crm/createCall?number=[[Number].Replace(&quot;+&quot;,&quot;%2B&quot;)]&amp;agent=[Agent]&amp;calldirection=[CallDirection]&amp;calltype=[CallType]&amp;duration=[Duration]&amp;calltext=[OutboundCallText]" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Get" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="calltype" Passes="1" Type="String">[CallType]</Value>
<Value Key="calldirection" Passes="1" Type="String">[CallDirection]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="calltext" Passes="2" Type="String">[OutboundCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallNotanswered" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallNotanswered" Type="REST" EntityId="CallNotansweredID" EntityOrder="[CallNotansweredID]">
<Request SkipIf="[IIf([ReportCallEnabled]!=True,True,[IIf([CallType]!=Outbound,True,False)])]" Url="http://54.38.120.117/crm/createCall?number=[[Number].Replace(&quot;+&quot;,&quot;%2B&quot;)]&amp;agent=[Agent]&amp;calldirection=[CallDirection]&amp;calltype=[CallType]&amp;duration=[Duration]&amp;calltext=[NotAnsweredOutboundCallText]" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Get" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="calltype" Passes="1" Type="String">[CallType]</Value>
<Value Key="calldirection" Passes="1" Type="String">[CallDirection]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="calltext" Passes="2" Type="String">[NotAnsweredOutboundCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
</Scenarios>
</Crm>
 
Thanks outbound calls are working dont know why missed call inbound and unanswered outbound call not working
 
Thanks outbound calls are working dont know why missed call inbound and unanswered outbound call not working
That could be something else. For missed inbound calls, try with calls sent directly to an extension, and not through a queue. Please note that missed queue calls are not reported.
 
Can you please elaborate this how can we directly call to an extension and not through a queue as we are calling on these numbers right now

1632762767926.png
 
Can you please elaborate this how can we directly call to an extension and not through a queue as we are calling on these numbers right now
Just route inbound calls through a testing DID to your extension, instead of sending them to a queue. This way you can make test calls and check if the template works.
 
We are dialing direct extension 100 when calling inbound and listing the recording but it still not sending missed call in crm.
 
We are dialing direct extension 100 when calling inbound and listing the recording but it still not sending missed call in crm.
Do you mean that you're calling from one extension to another? Please note that the CRM engine works with external calls only.
 
No outside calling on the inbound did/ddi number then the recording to dial extension when dial e.g extension 100 then calling receiving on extension 100 once receiving its reporting to crm but when left for missed call and not attend then not reporting to crm outbound answered call also working
 
No outside calling on the inbound did/ddi number then the recording to dial extension when dial e.g extension 100 then calling receiving on extension 100 once receiving its reporting to crm but when left for missed call and not attend then not reporting to crm outbound answered call also working
I would have to check the logs for the case of a missed inbound call. Can you reproduce the issue while verbose logging is on, and send me the 3cxSystemService.log file? Please tell me the call date/time, and from which number you called, so I can identify the call in the logs.
 
Here i am attaching the missed call screenshot and also the log file please check and guide me how can i receive missed call in crm thanks

1632977964895.png
 

Attachments

Those 2 calls are too old, and the log doesn't show them. Maybe you did them when verbose logs weren't enabled, or the log file was rotated and such an old entry is not there. The thing is that I can only see 1 call being reported, from number "02070999930". And in this case, I can see an error in your template, which expects JSON instead of XML:
2021/09/28 13:49:13.148|24307|0043|Info|CRM: about to report 1 calls at maxConcurrency 1
2021/09/28 13:49:13.148|24307|0043|Verb|CRM: Call Journaling event received, searching for number '02070999930' in 3CX Contacts.
2021/09/28 13:49:13.197|24307|0043|Verb|Processing scenario 'ReportCall'.
2021/09/28 13:49:13.197|24307|0043|Verb|Creating new HttpClient with no authentication
2021/09/28 13:49:13.197|24307|0043|Verb|Skipping request...
2021/09/28 13:49:13.197|24307|0043|Verb|Continue with empty matching.
2021/09/28 13:49:13.197|24307|0043|Verb|Processing scenario 'ReportCallMissed'.
2021/09/28 13:49:13.197|24307|0043|Verb|Creating new HttpClient with no authentication
2021/09/28 13:49:13.197|24307|0043|Verb|Skipping request...
2021/09/28 13:49:13.197|24307|0043|Verb|Continue with empty matching.
2021/09/28 13:49:13.197|24307|0043|Verb|Processing scenario 'ReportCallOutbound'.
2021/09/28 13:49:13.197|24307|0043|Verb|Creating new HttpClient with no authentication
2021/09/28 13:49:13.197|24307|0043|Verb|Performing GET request 'http://54.38.120.117/crm/createCall...e=Outbound&duration=00:03&calltext=[DateTime]: Answered outgoing call from [Agent] to [Number] ([Duration])'.
2021/09/28 13:49:13.511|24307|0043|Verb|The response is: '<?xml version="1.0" encoding="utf-8"?><Response><Dial><Authentication>Success</Authentication><Number>SIP/02070999930@</Number></Dial></Response>'
2021/09/28 13:49:13.554|24307|0043|Erro|Exception during call reporting: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Please, take the time to reproduce the issue while verbose logs are enabled, and then send the updated log file.
 
Hi i am attaching the latest 3cxsystem service log also adding the screenshot of the dashboard which have numbers of missed call also adding screenshot of log file of crm in which 3cx reporting 2 times in crm on incoming call one incoming and one missed kindly solve the issue please

screenshot (5).png

see the calls details number duration received call showing 2 times one incoming answered and one missed and missed call itself not reporting in crm

cb006239-90f3-4959-916b-f274f2adf227.jpg
 

Attachments

Hi i am attaching the latest 3cxsystem service log also adding the screenshot of the dashboard which have numbers of missed call also adding screenshot of log file of crm in which 3cx reporting 2 times in crm on incoming call one incoming and one missed kindly solve the issue please

View attachment 24923

see the calls details number duration received call showing 2 times one incoming answered and one missed and missed call itself not reporting in crm

View attachment 24925
The log you sent doesn't include any reference to the numbers in the screenshot....
 
The log you sent doesn't include any reference to the numbers in the screenshot....
Verbose log is on then why its not including reference number and why call reporting 2 times in crm one missed one answered i have to give demo please help me to solve this issue

1633675708474.png
 
Last edited:
Logs are rotated, and old data is deleted. You need to send the log just after making the call and reproducing the issue. If you wait too long, the information will not be there anymore....
 
  • Like
Reactions: Evolute IT
Ok i will send you the latest call log can you tell me also about Click to dial with receiver to click in crm and dial number from receiver
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,474
Latest member
costionofrei