- Joined
- Oct 29, 2019
- Messages
- 7
- Reaction score
- 2
Hi,
I created a Template for querying incoming calls against an online phonebook. The online phone book provides json as response, which works great. But the only purpose is to show the user agent the name and address of the incoming call. It is not necessary to create a contact in a CRM or call journaling. So I have the problem that I have to open a website each time a call comes in, which is annoying for the user to close or the 3CX-phone book gets filled with the query-results. What's more, 3CX creates a new contact each time someone calls, even if the exact contact exists in the 3CX phone book. It seems that the option "Query CRM: Only if contact is not found in 3CX Phonebook" does not work:

This is the xml-Template:
This is an exemplary response:
The final question: Is it possible to not create duplicate 3CX phone book entries, when I don't provide a "Contact-URL Output" in the XML-Template or is it somehow possible to delete duplicates in the 3CX phonebook?
I created a Template for querying incoming calls against an online phonebook. The online phone book provides json as response, which works great. But the only purpose is to show the user agent the name and address of the incoming call. It is not necessary to create a contact in a CRM or call journaling. So I have the problem that I have to open a website each time a call comes in, which is annoying for the user to close or the 3CX-phone book gets filled with the query-results. What's more, 3CX creates a new contact each time someone calls, even if the exact contact exists in the 3CX phone book. It seems that the option "Query CRM: Only if contact is not found in 3CX Phonebook" does not work:
This is the xml-Template:
XML:
<?xml version="1.0"?>
<Crm xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Country="AT" Name="Herold" Version="1">
<Number Prefix="Plus" MaxLength="" />
<Connection MaxConcurrentRequests="2" />
<Parameters />
<Authentication Type="Basic">
<Value>XXXXXXXXXX:XXXXXXXXXX</Value>
</Authentication>
<Scenarios>
<Scenario Id="" Type="REST">
<Request SkipIf="" Url="https://cnam.herold.at/v1/phone/[Number]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">name</Rule>
</Rules>
<Variables>
<Variable Name="CallerName" Path="name">
<Filter />
</Variable>
<Variable Name="CallerStreet" Path="street">
<Filter />
</Variable>
<Variable Name="CallerHousenumber" Path="housenumber">
<Filter />
</Variable>
<Variable Name="CallerPostalcode" Path="postalcode">
<Filter />
</Variable>
<Variable Name="CallerCity" Path="city">
<Filter />
</Variable>
<Variable Name="CallerPhone" Path="phone">
<Filter />
</Variable>
</Variables>
<Outputs Next="" AllowEmpty="false">
<Output Type="CompanyName" Passes="0" Value="[CallerName], [CallerStreet] [CallerHousenumber], [CallerPostalcode] [CallerCity]" />
<Output Type="PhoneOther" Passes="0" Value="[CallerPhone]" />
<Output Type="PhoneBusiness" Passes="0" Value="[Number]" />
</Outputs>
</Scenario>
</Scenarios>
</Crm>
This is an exemplary response:
JSON:
[
{
"source":"wp",
"name":"smart IT up e.U.",
"street":"Laurenz Moser G",
"housenumber":"7",
"postalcode":"3495",
"city":"Rohrendorf bei Krems",
"phone":[
"+43273290660"
]
}
]
The final question: Is it possible to not create duplicate 3CX phone book entries, when I don't provide a "Contact-URL Output" in the XML-Template or is it somehow possible to delete duplicates in the 3CX phonebook?