A little help

Status
Not open for further replies.

mcaponong

Silver Partner
Advanced Certified
Joined
Oct 29, 2018
Messages
107
Reaction score
43
I am integrating 3cx into my CRM. I have the data pulling and displaying the customer name with the caller ID. I also have the contact URL generating properly. My question is the CRM does call journaling by wget command and returning the customer name back to you. I have managed to get my template to do this and create a journal but when this happens I no longer get my output and the debugger throws a bunch of exceptions. Also, I am not sure how to journal outgoing and incoming calls separately since the CRM uses a wget from two different URLs based on the direction. I have been going off of a few different 3cx CRM integration tutorials but they do not have a full list of the commands needed to do them. The links I have been using are below.

https://www.3cx.com/docs/crm-integration/
https://www.3cx.com/blog/vlog/crm-pbx-integration/

If anyone has any better links or some advice I would appreciate it.
 
You should also take a look at this reference page:
https://www.3cx.com/docs/server-side-crm-template-xml-description/

I think that the problem is that you want to perform the lookup and create the call journaling entry at the same time. And these should be done separately, in 2 different scenarios.

You have the "matching scenarios", which are the ones having an empty ID. These scenarios are used for contact lookup. And they need to provide a specific response (contact name, contact URL, phone numbers, etc.).

On the other side, you have the ReportCall scenario (a scenario with that ID). This will be invoked when the call ends. And there you have the information of the call (if it's inbound or outbound, the call duration, the extension of the agent that handled the call, etc.). This ReportCall scenario doesn't provide any response back to 3CX.

Kind regards.
 
You should also take a look at this reference page:
https://www.3cx.com/docs/server-side-crm-template-xml-description/

I think that the problem is that you want to perform the lookup and create the call journaling entry at the same time. And these should be done separately, in 2 different scenarios.

You have the "matching scenarios", which are the ones having an empty ID. These scenarios are used for contact lookup. And they need to provide a specific response (contact name, contact URL, phone numbers, etc.).

On the other side, you have the ReportCall scenario (a scenario with that ID). This will be invoked when the call ends. And there you have the information of the call (if it's inbound or outbound, the call duration, the extension of the agent that handled the call, etc.). This ReportCall scenario doesn't provide any response back to 3CX.

Kind regards.
The CRM I am Using does a lookup to create the journal and I think that is why I am getting errors. I do not want the info that the journal makes because it is too basic. I have included the link to the page for the journaling api for my CRM. It is pretty shotty. They have an example of it working in 3cx for windows but I am using linux.

https://feedback.repairshopr.com/knowledgebase/articles/254824-pbx-integrations
 
Executing wget is just sending an HTTP GET Request. You can do it from the ReportCall scenario... But the important thing is to split the contact lookup and the call journaling...
 
Ok thanks, I will check it out. Thanks for the link.
 
Executing wget is just sending an HTTP GET Request. You can do it from the ReportCall scenario... But the important thing is to split the contact lookup and the call journaling...
Thanks, I got it working now I just have to figure out how to change the URL based on the direction of the call.
 
In the ReportCall scenario you have the CallType variable to do it.
 
In the ReportCall scenario you have the CallType variable to do it.
Yeah, I was trying to use the CallType variable in the URL but my CRM will not accept it if the first letter is capitalized. Looking to set up some kind of if-then statement based off of the CallType variable.

Correct me if I am wrong but shouldn't building the contact URL auto open that link in the web client? I have a little picture on the toaster I can click to open it but I was hoping to have it auto open.
 
Yeah, I was trying to use the CallType variable in the URL but my CRM will not accept it if the first letter is capitalized. Looking to set up some kind of if-then statement based off of the CallType variable.
You can use the following expression to create a different URL depending on the CallType:
Code:
[IIf([CallType]==Inbound||[CallType]==Missed,https://URL_FOR_INBOUND_CALLS,https://URL_FOR_OUTBOUND_CALLS)]

Correct me if I am wrong but shouldn't building the contact URL auto open that link in the web client? I have a little picture on the toaster I can click to open it but I was hoping to have it auto open.
In v15.5 you have to click the button to open the URL. In v16 you can configure the Web Client to automatically open it. This is done from the 3CX Web Client > Settings > Integrations.
 
Yeah I tried
Code:
<Request SkipIf="[ReportCallEnabled]!=True" Url="[IIf([CallType]==Inbound||[CallType]==Outbound,http://[Domain].repairshopr.com/api/callerid/?did=[Number]&amp;token=[Token],http://[Domain].repairshopr.com/api/callerid/?did=[Number]&amp;outbound=TRUE&amp;token=[Token])]" Message="" RequestType="Get" ResponseType="Json" />

and

Code:
      <Request SkipIf="[ReportCallEnabled]!=True" Url="http://[IIf([CallType]==Outbound,[Domain].repairshopr.com/api/callerid/?did=[Number]&amp;outbound=TRUE&amp;token=[Token],[Domain].repairshopr.com/api/callerid/?did=[Number]&amp;token=[Token])]" Message="" RequestType="Get" ResponseType="Json" />
nether worked
 
Are you doing this in the ReportCall scenario? Or a matching scenario? Please note that the CallType variable is only available in the ReportCall scenario.
 
Are you doing this in the ReportCall scenario? Or a matching scenario? Please note that the CallType variable is only available in the ReportCall scenario.

Call Report it works if I only do one way.
Code:
<Scenario Id="ReportCall">
      <Request SkipIf="[ReportCallEnabled]!=True" Url="[IIf([CallType]==Inbound||[CallType]==Outbound,http://[Domain].repairshopr.com/api/callerid/?did=[Number]&amp;token=[Token],http://[Domain].repairshopr.com/api/callerid/?did=[Number]&amp;outbound=TRUE&amp;token=[Token])]" Message="" RequestType="Get" ResponseType="Json" />
      <Variables />
      <Outputs AllowEmpty="false" />
    </Scenario>
 
Try as follows:
Code:
    <Scenario Id="ReportCall">
      <Request SkipIf="[ReportCallEnabled]!=True" Url="http://[Domain].repairshopr.com/api/callerid/?did=[Number]&amp;token=[Token][IIf([CallType]==Inbound||[CallType]==Missed,&quot;&quot;,&amp;outbound=TRUE)]" RequestType="Get" ResponseType="Json" />
      <Variables />
      <Outputs AllowEmpty="false" />
    </Scenario>
 
  • Like
Reactions: it145
Try as follows:
Code:
    <Scenario Id="ReportCall">
      <Request SkipIf="[ReportCallEnabled]!=True" Url="http://[Domain].repairshopr.com/api/callerid/?did=[Number]&amp;token=[Token][IIf([CallType]==Inbound||[CallType]==Missed,&quot;&quot;,&amp;outbound=TRUE)]" RequestType="Get" ResponseType="Json" />
      <Variables />
      <Outputs AllowEmpty="false" />
    </Scenario>
That worked. Thank you!
 
Status
Not open for further replies.

Latest Posts

Forum statistics

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