SHARE
TWEET

Scipt to configure VTech 2-Line SIP Cordless Phones

jaimerosariojusticia Dec 26th, 2014 966 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. ###
  3. # Scipt to configure VTech 2-Line Contemporary SIP Cordless Phone (Hotel Models)
  4. # The VTech SIP phones are linux based devices (but limited in commands)
  5. # and can connect to a tftp server with the 'tftp' command.
  6. #
  7. # The tftp command is used to download the configuration
  8. # files from an active tftp server.
  9. #
  10. # This will save time as only you need to configure one device, download
  11. # all the configuration to a tftp server, and using this script, all the
  12. # connected phones in the network will download the configuration files.
  13. # you can add another configuration file using the following line:
  14. #
  15. # echo -e "tftp -g -r CONFIGURATION_FILE.cfg 10.0.0.150 \r";  
  16. #
  17. # The line must be included in the patenthesis as a contiguous line, with
  18. # no EOL.
  19. #
  20. # Change '10.0.0.150' to the current TFTP Server.
  21. # Change '10.0.0.0/8' to the current network address.
  22. #
  23. # First, configure one telephone unit, and download the configuration files
  24. # from '/mnt/flash/ApplicationData/storage/sc14450_fs/configfile'
  25. #
  26. # Upload all *.cfg files except 'SIP_account_1.cfg' and 'SIP_account_2.cfg'
  27. ###
  28. nmap -sP 10.0.0.0/8 | grep -v "Host" | tail -n +3 | tr '\n' ' ' | sed 's|Nmap|\nNmap|g' | grep "MAC Address" | cut -d " " -f5,8-15 | grep "VTech" | cut -d " " | while read IP_ADDRESS; do echo "TFTP server is 10.0.0.150";
  29. ( echo -e "root"; echo -e "admin_123"; echo -e "cd /mnt/flash/ApplicationData/storage/sc14450_fs/configfile \r"; echo -e "tftp -g -r audio_settings_1.cfg 10.0.0.150 \r"; echo -e "tftp -g -r audio_settings_2.cfg 10.0.0.150 \r"; echo -e "tftp -g -r autodial_settings.cfg 10.0.0.150 \r"; echo -e "tftp -g -r call_settings_1.cfg 10.0.0.150 \r"; echo -e "tftp -g -r dial_plans.cfg 10.0.0.150 \r"; echo -e "tftp -g -r SIP_settings.cfg 10.0.0.150 \r"; echo -e "reboot \r" ) | nc "$IP_ADDRESS" 23
  30. #
  31. echo -e "$IP_ADDRESS - done\r"
  32. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top