This integration makes it possible to query the Search.ch number base and optionally save the result in a Wildix address book.
- 13.12.2024 - Fix "+" not being saved
- 19.08.2024 - Cleanup searched number and add missing leading "+"
- 13.08.2024 - Bugfix to avoid duplicate contact creation
- 10.06.2024 - Update documentation
- 07.05.2024 - First release
From WMS console, logged as root.
apt-get update & apt-get install git -y
cd /var/www/
git clone https://github.com/Netkum-AG/telsearch_integration.git
cd telsearch_integration
chmod +x main.py
- If the API call (see under) is made with 4 parameters, only the search will be performed.
- If telsearch_phonebook parameter is given, the contact will be automatically saved.
Define the following variables in Dialplan > General Settings > Dialplan Variables:
- HOSTNAME / https://xxxx.wildixin.com
- TELSEARCH_KEY / Get a key from https://tel.search.ch/api/getkey
- WMS_APP_TOKEN / Simple token generated from PBX > Integrations > Applications
Define the following additional variables in Dialplan Variables:
- TELSEARCH_PHONEBOOK / name of the phone book where to save the contacts. It will be created if non-existing.
First, you need to check if the number is already known.
The easiest way to achieve this it to check if the first digit of the caller name is a "+".
Note: If you are using a third party trunk provider, you may want to check for a "0" instead.
We jump out, if this is the case, otherwise the caller name will be overwritten and a new contact created every time (if activated).
Add a custom application and set the caller name from the created variable
See doc/dialplan_example.json
Debug script for dialplan to be used as custom application
noop(${HOSTNAME}/telsearch_integration/search.php?request_text=${CALLERID(num)}&telsearch_key=${TELSEARCH_KEY}&wms_hostname=${HOSTNAME}&wms_app_token=${WMS_APP_TOKEN}&telsearch_phonebook=${TELSEARCH_PHONEBOOK})
From WMS console, logged as root.
cd /var/www/telsearch_integration
git reset --hard
git pull
chmod +x main.py
Please open an issue on GitHub with as many details as possible and screenshot from the problem.