Guide · Command-line tool

Your status, in your terminal.
Check it and send commands from the command line.

The Call State command-line tool, callstate, asks the Call State app on your computer for your Teams call status and sends the same commands as a click. It is useful for quick checks, shell scripts and automation on this computer.

Where it is.

The tool ships inside the Call State app, so there is nothing separate to download:

  • macOS: Call State.app/Contents/MacOS/callstate-cli. Right-click the app and choose Show Package Contents to find it.
  • Windows: callstate-cli.exe in the folder where Call State is installed, next to callstate.exe.

To type callstate from any folder, link the file into a folder on your PATH, for example with ln -s "/Applications/Call State.app/Contents/MacOS/callstate-cli" ~/bin/callstate. Use the path where you installed the app.

Before you start.

  1. Open Call State. The tool needs the app running in the menu bar or system tray. It does not start the app for you.
  2. Sign in. Most commands need a signed-in account. Free accounts sign in again every 24 hours.
  3. Check the connection. Run callstate health. A reply with the version means the tool reaches the app.

The commands.

What each command does
CommandWhat it does
callstate healthShows that the app runs, with its version and process ID. callstate version does the same.
callstate statusPrints your current call status and the controls that are available right now, as JSON.
callstate watch --interval 1Prints the status again every second (the interval is in seconds) until you stop it with Ctrl+C.
callstate probeScans Teams on this computer again, without waiting for the next update. Add --tree to include a raw dump of the Teams interface for troubleshooting.
callstate act <action>Sends one control command. Actions are listed below.
callstate react <reaction>Sends a meeting reaction: applause, laugh, like, love or surprised.
callstate ws start|stop|statusTurns the Teams Emulation for compatible legacy tools on or off, or shows whether it runs.
callstate beacon list|test|update|resumeLists attached Call State Beacons, shows a test state on them, flashes new firmware, or hands the Beacon port back to the app.

A successful command prints {"ok": true}. Only the next status shows whether Teams has changed.

Actions for act.

The same action names work in the Local REST API, so a script can use either one.

Control actions
ActionWhat it does
mute, unmute, toggle-muteTurn the microphone off, on, or switch it.
camera-on, camera-off, toggle-cameraTurn the camera on, off, or switch it.
hand-up, hand-down, toggle-handRaise or lower your hand, or switch it.
stop-sharingStop your screen sharing.
leaveLeave the meeting.
answer-callAccepts a ringing call on this computer. Outside a meeting only, and never sent to another computer.

When a command fails.

The tool prints a JSON error with a stable code and a message, and exits with a matching code. Scripts can check the exit code:

Exit codes
Exit codeMeaning
1The request was invalid, for example an unknown action.
2The app is not running on this computer.
3No meeting is active that you can control.
4Teams did not respond to the control. Check the window, for example a blocking dialog or a minimized meeting.
5A permission is missing, for example Accessibility on macOS.
6You are not signed in.
7The request came from another user on this computer and was refused.
8Another program already uses the port of the Teams Emulation.

How it reaches the app.

The tool talks only to the Call State app on the same computer, through a local connection that only your user account can open. It sends nothing to the cloud itself. Commands go through the app, the same way as a click in Call State.

Scripts that run on another device, or that use plain HTTP, can use the Local REST API instead. It offers the same status and commands on port 8125.

Plans and availability.

The command-line tool is included in Free and in Paid. Free needs a sign-in every 24 hours, and the commands work only while you are signed in. Paid removes that daily sign-in.

Your own setup

Start with one status check.

Install Call State, run callstate status during a call and build from there.