Telnet Commands for ShoreTel Phones

I wrote a post on how to telnet into a ShoreTel phone but not much about what you can do once you’re in there. I checked around on the internet for a listing of commands you can run and what they do and the documentation is pretty scarce. I did find that ShoreTel nicely put several commands in their Maintenance guide for 11.2, and probably every maintenance manual they’ve put  out. Also some of these commands can be done through the PhoneCTL utility it talks about in section 6.4.5.

I did a telnet session into one of my phones to see what commands were available.

I copied and pasted a lot of this from the telnet output of my phone. I’ve tried to run most of these commands and commented whether it works or not. If anyone has any additions to this please use the comments or contact me form so I can add it.

This is a work in progress and I’d welcome any submissions on commands that have been discovered. If it’s something that can ruin the phone, please make note of that when you send.

ShoreTel Related Commands

These are some commands not expressly listed in the “help” system in the phone.

bootChange – This will let you enter the IP address, ShoreTel server IP and other things. It doesn’t persist any changes you make, so if you are trying to change the IP or something of a remote phone, you really should either talk a user through this or use DHCP reservations. I have a feeling the items you enter on the phone setup screen are stored in a text file somewhere on the phone.  – Updated 9/4/2012

printsysInfo – Shows a lot of system info for the phone. You can see MAC address, IP address, which FTP server it is set to download from, SNTP server information and all that here. This will show firmware versions as well.

reboot – Reboots the phone.

ping “xxx.xxx.xxx.xxx” – Pings an IP address. you need to enclose the IP address in quotes.

prtleveltabs – Prints the volume levels of the various audio outputs on the phone.

setAllCallApearanceLEDs [state] – Just for fun, you can turn on and off all the Call Appearance LEDs. State is a 0 or a 1. I did type that right, there is only 1 “p” in Apearance.  I haven’t figured out how to turn them green.

Networking Commands

Command – ShoreTel/VxWorks Documentation – My Thoughts

hostAdd “hostname”,”inetaddr” – add a host to remote host table; “inetaddr” must be in standard Internet address format e.g. “90.0.0.4” – Command works. If you don’t have a DNS server this could be somewhat useful as it adds a host and IP address combination to the phone.

hostShow – print current remote host table – Works. Shows the host table with hostname/ip address combinations. In mine I got the following output:


netDevCreate “devname”,”hostname”,protocol – create an I/O device to access files on the specified host (protocol 0=rsh, 1=ftp) – Works. This is a file access command. Not sure what use it might be.

routeAdd “destaddr”,”gateaddr” – add route to route table – Works. Adds a network route. This might can be used as a way to direct a phone to the ShoreTel server without the aid of a static route in a router. Will have to try this.

routeDelete “destaddr”,”gateaddr” – delete route from route table – Works. Removes routes added with above command.

routeShow – print current route table – Works. Shows the current routing table.


iam “usr”[,”passwd”] – specify the user name by which you will be known to remote hosts (and optional password) – Works. Probably a vxworks specific command. Not entirely sure of use.
whoami – print the current remote ID – Works. Got the output “value = 1 = 0x1”. Again might just be a VxWorks thing with no relevance to ShoreTel.
rlogin “host” – log in to a remote host;”host” can be inet address or host name in remote host table – Doesn’t work. Returns “undefined symbol”.

ifShow [“ifname”] – show info about network interfaces – Works. Shows information about the physical interfaces on the phone.

inetstatShow – show all Internet protocol sockets – Works. Shows ports and sockets the phone might be using. Could be  useful if you have firewall issues.


tcpstatShow – show statistics for TCP – Works. Shows stats on network activity.


udpstatShow – show statistics for UDP – Works. Shows UDP stats. Same as tcpstatShow, just shows UDP protocol stats instead.


ipstatShow – show statistics for IP – Works. Overall IP stats.


icmpstatShow – show statistics for ICMP – Doesn’t work, or might not have had data.

arptabShow – show a list of known ARP entries – Works. Shows ARP table.


mbufShow – show mbuf statistics

IO Commands

This looks like VxWorks file system commands. Not entirely sure that this can be used for troubleshooting purposes. I won’t comment on these as they are almost identical to DOS commands. these probably have a real potential to screw your phone up.

cd “path” – Set current working path

pwd – Print working path
ls [“wpat”[,long]] – List contents of directory
ll [“wpat”] – List contents of directory – long format
lsr [“wpat”[,long]] – Recursive list of directory contents
llr [“wpat”] – Recursive detailed list of directory
rename “old”,”new” – Change name of file
copy [“in”][,”out”] – Copy in file to out file (0 = std in/out)
cp “wpat”,”dst” – Copy many files to another dir
xcopy “wpat”,”dst” – Recursively copy files
mv “wpat”,”dst” – Move files into another directory
xdelete “wpat” – Delete a file, wildcard list or tree
attrib “path”,”attr” – Modify file attributes
xattrib “wpat”,”attr” – Recursively modify file attributes
chkdsk “device”, L, V  – Consistency check of file system
diskInit “device”  – Initialize file system on disk
diskFormat “device” – Low level and file system disk format – This seems like a bad idea.

 

Assigning a Specific SNTP Server to ShoreTel Phones

It doesn’t come up often but occasionally you’ll find your phones aren’t getting the right information from your network’s time server. Some partners will set up the ShoreTel server as the SNTP server for your phones. I’ve been told this isn’t great practice anymore.

Your network may not be set up in a way that makes using DHCP to pass your phones settings to them possible. This means  you have to manually place all your settings in each phone right? Actually no. Some settings that are the same across all phones can be assigned with those text files on your ShoreTel FTP server.

One of those settings is which SNTP Server to use. You have to do this for each specific model of phone you use. I’ll show how to do this for a 230 phone and then share how to figure out which file goes to which kind of phone. I believe this can be done for a specific phone as well, but newer versions of ShoreTel may have changed this.

Fair warning. You can mess some settings up if you get this wrong. It’s not a bad idea to back up your C:\inetpub\ftp\root directory.

Step 1 – Log Into your ShoreTel server.

Step 2 – Open the folder C:\inetpub\ftproot – Back this folder up.

Step 3 – Look for a text file called “sevcustom.txt”

Step 4 – Add the line:” SntpServer [IP Address of NTP Server]” without the quotes. The IP address of the NTP server can be the IP address of your primary domain controller, or theoretically an online NTP server, but this is not ideal.

Step 5 – Save the file.

Step 6 – Reset a 230 phone and see if it doesn’t pick up the correct time server now.

Step 7 – If it does, it’s a simple matter of resetting all the 230 phones on the network.

The first two or three numbers or letters of the custom.txt file is the model number of a phone. Flip a ShoreTel phone over and look at the barcode on the back. Above the barcode should read “IP TELEPHONE MODEL xxx”. The xxx part is the model of the phone. The 230’s say SEV, 560’s will say S6 and so forth and so on.

You could always just add the line to each custom file.

Another thing to look out for is in the shore_xxx.txt text files. There should be a line that says ‘Include “xxxcustom.txt”‘. If it isn’t there, add it. You can also change this to another global custom text file with your edits.

Update 12/17/2014 – You can also name the files with the MAC address of a phone to put specific settings on individual phones. The text file needs to be named shore_xxxxxxxxxxxx.txt where the xx’s are the MAC address of the phone. The MAC address is the long “serial number” on the back of the phone under the bar code.