Call via the terminal with Cisco IP Phone

Handwritten on 26 Apr 2019

Call via the terminal with Cisco IP Phone

In our office we use Cisco phones all over te place. Since I am not a frequent caller, I always have some trouble dialing a phone number. At those moments I am thinking that I am dialing the wrong number. After all, we all received phone calls that were not meant for us.

Cisco phones have the possibility to consume requests and execute a command internally. This means we can send a XML request to the IP address of the phone. Execution of this XML message is done immediately, so after posting the request you can pick up the phone of the hook.

Sample XML message:

  <ExecuteItem Priority="0" URL="Dial:00316424xxxxx"/>

The above XML envelope needs to be sended as x-www-form-urlencoded with the key XML. The URL pattern that you can use to post data is:

// Sample IP Address:

Free Tip: you can also POST requests via Postman or Insomnia.

To make this request via the Terminal it would look like this:

curl -X POST \
  http://<IP>/CGI/Execute \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'XML=<CiscoIPPhoneExecute><ExecuteItem Priority="0" URL="Dial:00316424xxxxx"/></CiscoIPPhoneExecute>'

At this point you would think dialing manually a number is still fast, I agree! But we can make a bash script of this request. You can save this command in a file somewhere in your path:


// You can see that the phone number will be passed as an argument here: $1
curl -X POST \ \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'XML=<CiscoIPPhoneExecute><ExecuteItem Priority="0" URL="Dial:'$1'"/></CiscoIPPhoneExecute>'

Now, when you want to make a phone call, you can type:

sh 00316424xxxxx

Happy ringing 📞

cisco terminal


© 2023 Handcrafted in Nijmegen, The Netherlands