Custom Personal PhoneBook for every extension for SNOM-Devices including all numbers

Status
Not open for further replies.

syntcom

Free User
Joined
Jun 24, 2020
Messages
20
Reaction score
1
Hello,

just wanted to share a script for a custom phonebook for snom devices. I'm sure it will help someone because the integrated phonebook of the 3cx is not helping anyone.
Actually someone in this forum made the hard work and wrote the most of this script. I just improved it:
- It uses not the company phonebook, but the personal one
- It creates a file for EVERY extension, but you just need ONE custom Snom-Template, this keeps your admin-menus clean
- It also uses the "Other" field in the phonebook and puts it under "notes" in the snom phones. I use this field for additional Information like e.g. my Client ID

Manual:
# This Script creates custom PhoneBooks for SNOM-Devices for every user/extension and uses the personal phonebook of the users (custom_snom_phonebook_00.xml)
# including Mobile/Office/Extension numbers and the company name.
# Create a Custom-Template for your Phones and edit the "Phonebook Settings"
# to point to this file with the variable for the extension <file url="%%PROVLINK%%/custom_snom_phonebook_%%extension_number%%.xml"/>
# With this you only need one template for all your Snom extensions. This helps a lot to keep the Admin-Menu clean.
# !Attention: To keep the filesystem clean it deletes ALL files with this specific name from extension 0 to the maximum available before creating/updating the new ones.
# !Even if such a user or file does not exist at the moment. So do not create a file named "custom_snom_phonebook_EXT-NR.xml" for other purposes. It will be deleted!
#
# This Script deletes quotation marks (") and replaces commas with dots, as the csv files created are separated by commas.
#
# In Windows rename the script ending in .sh and then convert ist with a unix shell (git or Windows Subsystem) with "dos2unix custom-snom-phonebook.sh" in a unix format
# copy the script e.g. into /root
# make the script executable with "chmod +x /root/custom-snom-phonebook.sh"
# run the script for testing purposes with "bash /root/custom-snom-phonebook.sh" and check if
# /var/lib/3cxpbx/Instance1/Data/Http/Interface/provisioning/RANDOM-NAME/custom_snom_phonebook.xml" was created
# Create a cron job under root. Open "/etc/crontab" and add the line "45 15 * * * root /root/custom-snom-phonebook.sh"
# With this the script will be executed every day at 15:45.
#
# If you want to delete a specific Extension, Contact or RingGroup from the Phonebook,
# use "sed" in the section below with the Name of the Extension. For example:
# to delete Hotdesking Extensions "HD00xxx" use "sed -i '\|HD00|d' $tmp_CSV_ex".
# If you want to delete a RingGroup use "sed -i '\|myRingGroupName|d' $tmp_CSV_rg".
#
#

Be aware that when you use this script your phone system is not supported any more by 3cx.

Michael Pruckner
Syntcom Informationstechnik
www.syntcom.de
 

Attachments

  • Like
Reactions: refocusit
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,964
Messages
590,009
Members
164,870
Latest member
nizammoktar