Solved: Custom CRM - phonebook entries added multiple times

Status
Not open for further replies.

KLor

Joined
Feb 16, 2018
Messages
3
Reaction score
0
Dear 3cx-Fans,

I've created a simple crm integration like described in

https://www.3cx.com/docs/server-side-crm-template-xml-description/
https://www.3cx.com/blog/releases/crm-integration-diy/

Everything works fine the first time. The lookup works fine in test and productive use:

http://pbx:5000/api/CrmList/test?num=134567&ext=021

After a real call from outside, the contact was added to the "3cx Company Phone Book".

If the caller comes the second time, the "nice name" from phone book is displayed on the phone and softpfone,
BUT: 3cx calls every second the crm server for the entry lookup, and yes it is also found, and now add this entry another time to "3cx Company Phone Book".

I think this is a bug. I solved it, by rewriting the REST server, which saves now successfully found entries and send back a empty json response in that case. -> no second, third, fourth entry will be added.

Maybe the lookup can be configured in a different way in the settings. But there I did not found anything useful, only
CRMINT_DEFAULT

Any hint is welcome!
 

Attachments

Hello @KLor,

I think the problem is that you're not generating an output for "ContactUrl". Then, when 3CX finds the contact in the phonebook, but the URL is not there, it tries to perform the lookup again.

Try adding that missing output value.

Kind regards.
 
Thanks,

this helps! Maybe a small hint would be nice, that ContactUrl is a required field.

Nice to know: 3cx updates the contact on every incoming phone call, if something changed...
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,473
Latest member
NathanMitchell