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.

 

52 Replies to “Telnet Commands for ShoreTel Phones”

  1. Arron – Have you tried setting Speed/Duplex with the bootChange command? It seems to work on switches, but not phones, at least not on 12.2.

    1. Yeah I have. It doesn’t really do anything. I have a suspicion that for the phones there’s a text file somewhere on the phone you have to edit to actually change anything related to the network settings. But you’re right it does work on switches.

    1. Yeah you can telnet into all the phones. Have you enabled telnet from the server? The trick is you have to turn telnet on the phone from the server, then telnet to it from your server. You can’t do it from a workstation or anything like that without copying a bunch of files over. Check out the link at the top of this article for how to do it. If you aren’t able to telnet into the phone following those instructions, you may have some other issues with your installation.

  2. Great Info!!!

    bty, I was able to copy the phonectl.exe and ipbxctl.exe file to the root of my local c:\ and telnet from my pc with no problems! Beats having to log into the server everytime!

    1. Hey, I appreciate the information. I’ll add that to the one on how to telnet into the phone. I’ve been meaning to try that but never got around to it.

  3. I too have been meaning to try that but never got around to it. Tested and confirmed. Now drawing up a HowTo doc for my field guys

    1. Thanks! I am not sure if there’s a traceroute function or not. I’ll try in the next day or so and see if it exists. When I compiled this list I honestly can’t remember if I tried a trace function.

      1. I was looking for a traceroute as well and looked at a few VXworks sites and was not able to find a traceroute used in VXworks

        1. I’m not an expert in anything VXWorks related so take this with a grain of salt. My best guess is that when you put VXWorks on an appliance or something you sort of choose what features go with it. My inexpert assumption is that some of the stuff on the ShoreTel phones/switches are either programs that came with VXWorks they found useful and left on there, found and placed on there for convenience, or developed and placed on there themselves.

          That being said, if there’s no such thing as a traceroute program for VXWorks, you could possibly do a traceroute from you router or switch. Most CISCO equipment will let you do a trace from a source IP to a destination IP. It’s not perfect but sometimes it’ll help you figure out the problem you’re having.

  4. Aaron – is there any way to see the current date/time on the phone? I noticed the printSysInfo doesn’t contain this information…

      1. Is there a way to see the actual time-zone time that is displayed on the phone? I can get GMT from the “time” command, but I only seem to get GMT back (which is correct). I believe I have my ntp server set to the correct time zone, but I’d like to verify.

  5. Hi…Is there a way to change the ftp server using phonectl. mine is showing 0.0.0.0 and it is remote so I just can’t walk up to it. Trying to keep the end user from having to do it.

      1. There’s a way to do this through the FTP server actually.

        You can do this for a single phone, a specific model of phone, or all of them everywhere. I’ve got a few remote phones I had to put on a different NTP server. You just make a text file and name it the mac address of the phone I believe. It should be in the article.

          1. Thanks Aaron! I was afraid this posting was long forgotten. I appreciate the additional information! Merry Christmas!

          2. Yep, no problem. I do watch this blog and everything on it. I have quit putting update dates on everything quite as often though!

  6. Aaron, this is WONDERFUL info! I just have the problem of NOT having the phonectl.exe or ipbxctl.exe anywhere on my Shoreware server – this is the server hosting “Shoreware Director.” So, are we talking about the same server? Also, on your other blog, it shows a funky “cd something**Sh*” command that does not work on my server – if you would kindly give the full path of where that is supposed to be, that would be helpful. Nothing is wrong with my installation, but I would like to find those “exe” files. to be able to telnet into a couple of remote phones. Thanks for any info and for this amazing blog!

    1. I just updated the other post where it shows it. I am wondering about the phonectl thing. The full path is this: C:\Program Files\Shoreline Communications\ShoreWare Server . I am wondering if there are some partners out there that might have changed some directories up because it’s been the same on pretty well every server I’ve ever worked on. It COULD be that the full path could be this now though: C:\Program Files (x86)\Shoreline Communications\ShoreWare Server .

      Also ShoreTel might have removed these programs or something. And yes, this is the “Headquarters” server where your ShoreWare Director is on.

      The “cd \Pro*\Sho*\*ser*” trick is just a quicker way to get to the directory, WordPress eats the backslashes sometimes and I don’t always catch it.

  7. Also, this looks useful “prtleveltabs – Prints the volume levels of the various audio outputs on the phone;” but, what would be more useful would be a way to remotely set/adjust the volumes on phones – I have a few across the warehouse, when people go on vacation and leave the levels “maxxed out” and it’s a pain to hustle over and physically adjust them. Thoughts? Is it possible?

    1. Yeah it seems like you really can’t change much on the phones when you telnet into them, only a few of the commands really seem to work, and it’s highly model dependent.

  8. Okay, I was able to find the programs, buried in the original install ZIP file – why they would not already be loaded onto the server, I have no clue. Copied them to my workstation and they were great. Here’s some more undocumented (or not documented in this blog) things I found:

    “spyHelp” – use EXACT CASE — uppercase “H” give help on the ‘spy’ function; spy is a very useful function

    “spy” is like the old UNIX/Linux “top” command – lists top processes,
    and refreshes after an “x” interval (after a certain amount of time)

    “spyStop” will stop the spy session.

    “root” is an interesting command; it spits out a lot of spec/config info.

    “Lowercase L” “l” lists the files in the current location

    “top” does something – lists the top 1 process?

    “exit” takes you back out of the telnet session.

    “shell” apparently starts or tries to start another shell session?

    “i” and “ti” give some good info.

    you can use “ping,” but you must put IP address in double-quotes.
    ping “192.168.1.1”

    Hope this helps someone!

      1. No, it’s the real deal ShoreWare HQ server, as you were referring to it. The main deal,. from which all things in the universe flow (the central management server, basically – I think that’s how it’s looked upon). Could be they load those when needed, because I did see them using the “phonectl” at one point; because I remember tech-dude telnetting to a phone to check out some stuff.

  9. BTW, SetAllCAllApearanceLEDs 1
    does nothing. Maybe they made it where it doesn’t work. It basically just spits out the current value of the setting — “0 0x0”

    1. I did notice when I’ve played around with the LED’s on my phones that doing different things with this command does different things with different models. I was working with some older 230s and a 265.

        1. Aaah, yeah that’d probably explain it. Those are pretty old phones, older than the ones I did the command dump with. What ShoreTel version are you running?

          1. We are running latest/greatest – 19.x.y.z.omega – along those lines, I just made up the xyzomega part.

          2. Yep, guess I’ll be finding an install somewhere and see if anything’s changed with it. Thanks!

  10. Also, your “print sys info” command is wrong – the “S” also is upper-cased: “printSysInfo” <– this is correct.

  11. Cool that you can telnet and check out various things. Would be nice to be able to “set” more things (persistently). Like with my Samsung old-school Blu-ray player — it is Linux-based, but I’ve never figured how to telnet into it. Must be like the “telneton” feature of shoretel – you have to enable it for your specific session; then it disables itself after you are no longer connected. Also, it may use a non-standard port. I never tried putty though – maybe putty would work.

  12. Okay, I was never here; and you never heard of me – LOL. Here’s some coolness:
    -> ls “/flash0”
    /flash0/nvram
    /flash0/app1
    value = 0 = 0x0
    -> ls “/flash0/nvram”
    /flash0/nvram/.
    /flash0/nvram/..
    /flash0/nvram/nvdata.cfg
    /flash0/nvram/sysvx
    /flash0/nvram/boot.info
    /flash0/nvram/dhcpcache
    /flash0/nvram/shore_s12.txt
    /flash0/nvram/wallpaperpixmap.bmp
    /flash0/nvram/bmpname.txt
    /flash0/nvram/fontpixmap.bmp
    /flash0/nvram/iconpixmap.bmp
    /flash0/nvram/critical.log
    value = 0 = 0x0

    So, apparently, the “double-quotes” matter; and you have to use them with “ls” and so forth. Just “l” by itself seems undocumented, and returns some different info. Also, you can ‘cat’ “.txt” files, like cat “/flash0/nvram/shore_s12.txt”
    (don’t forget the double-quotes around the directory & file name!)
    And, I’m guessing, since you can “cp” files in/out – that you could have a copy of the config file(s) and make mods, then copy them in, to replace the ones already there. Not sure if there’s any direct command-line editor that is included.
    Cheers!

  13. Hello Aaron thank you for the wonderful article. I am able to log into the phone but anytime I try to run most of the command I get the error “undefined symbol: xxxxx” I am trying to run a basic printsysinfo when I get this error.

    Thank you,

    Ray

  14. Great article, and thanks for it.
    I have something to add.
    To mirror ports on the Shoretel 230 IP phone.you can use command: ethEnablePortMirror.
    I did not tested in on other phones. I hope it will help somebody.

Leave a Reply