TECH / Hardware 4 min read

How to Click-to-Dial on Grandstream GXP21xx IP Phone from PC

Antonio NEMCD Author
Published Feb 20, 2022 · 4 min

Sometimes you need to dial a number on a desktop Grandstream GXP2140 (or any GXP21xx series) IP phone directly from your PC – click a button on the computer and have the desk phone place the call automatically. This is especially handy when calling frequently from a browser, spreadsheet, or CRM instead of typing long numbers on the keypad.

Grandstream GXP2140 IP phoneGrandstream GXP2140 desktop VoIP phone

Setting this up only takes a couple of minutes using the phone’s built-in HTTP API, though standard dial URLs fail at first because remote dialing is disabled by default. Below is how to enable Click-To-Dial in the Grandstream GXP21xx web interface, the exact api-make_call URL syntax, and practical ways to dial from a browser bookmarklet, PowerShell, a .bat script, Excel, CRM/1C, and tel: links.

1. Enabling Click-To-Dial in the Grandstream GXP21xx Web GUI

Before sending HTTP commands, enable remote dialing in the phone’s web admin panel. Open the phone’s IP address in a browser and log in as an administrator (the factory defaults are often admin/admin, though managed office phones usually have a custom password).

In the top navigation bar, open the SETTINGS tab:

Grandstream web interface Click-To-Dial settingsGrandstream GXP2140 web interface: SETTINGS tab

In the left sidebar, select Call Features:

Enabling Click-To-Dial in Call FeaturesNavigating to Settings – Call Features

Scroll down to Click-To-Dial Feature and switch it to Enabled:

Grandstream Click-To-Dial Feature EnabledSetting Click-To-Dial Feature to Enabled

Click Save and Apply at the bottom of the page (the phone may reboot to apply changes). On some firmware versions, you should also open Network → Remote Control, set Action URI Support to Enabled, add your workstation IP to Action URI Allowed IP List, and set Remote Control Pop up Window Support to Disabled so calls start immediately without requiring confirmation on the phone screen.

2. HTTP API Format (api-make_call)

To initiate an outbound call, send an HTTP GET request to the phone’s api-make_call CGI endpoint:

http://PHONE_IP/cgi-bin/api-make_call?phonenumber=NUMBER&account=0&login=ADMIN_USER&password=ADMIN_PASSWORD

Parameter breakdown:

  • PHONE_IP: local IP address of your Grandstream phone (for example, 192.168.1.50).
  • NUMBER: destination phone number without spaces or brackets.
  • account: SIP account index on the phone (0 for Account 1, 1 for Account 2, etc.).
  • login and password: web interface credentials.

On newer Grandstream CTI firmware revisions, the passcode parameter is often used instead of separate login and password fields:

http://PHONE_IP/cgi-bin/api-make_call?passcode=PASSWORD&phonenumber=NUMBER

Once this URL is requested, the phone immediately dials the target number on speakerphone or handset – all you need to do is talk.

3. Making Click-to-Dial Convenient on Windows

One-Click Browser Bookmarklet

If you want to dial numbers quickly without installing extra software, add a new bookmark to your browser bar and paste this JavaScript snippet as its URL (replacing the IP, username, and password):

javascript:(()=>{var n=prompt('Number:');if(n)window.open(
'http://192.168.1.50/cgi-bin/api-make_call?phonenumber='
+encodeURIComponent(n)+'&account=0&login=user&password=PASS',
'_blank');})();

Clicking the bookmark opens a small prompt; entering a number immediately triggers the call on your desk phone.

PowerShell Script, Desktop Shortcut, or .bat File

To avoid opening a new browser tab on every call, trigger the request silently in the background with a short PowerShell script (such as C:\scripts\dial.ps1):

param([string]$Num = $(Read-Host "Number"))
$ip = "192.168.1.50"
$u = "user"; $p = "PASS"
$url = "http://$ip/cgi-bin/api-make_call" +
  "?phonenumber=$Num&account=0&login=$u&password=$p"
Invoke-RestMethod -Uri $url | Out-Null

You can pin a desktop shortcut pointing to powershell.exe -WindowStyle Hidden -File C:\scripts\dial.ps1, or create a .bat file using Windows’ built-in curl.exe:

@echo off
set /p NUM=Number: 
set "BASE=http://192.168.1.50/cgi-bin/api-make_call"
set "AUTH=account=0&login=user&password=PASS"
curl.exe -s "%BASE%?phonenumber=%NUM%&%AUTH%" >nul

Integrating with Excel, CRM / 1C, and tel: Links

  • Excel spreadsheets: if phone numbers sit in column A2, add a clickable formula next to them: =HYPERLINK("http://192.168.1.50/cgi-bin/api-make_call?phonenumber=" & A2 & "&account=0&login=user&password=PASS", "Call").
  • CRM and 1C: configure the call button on a contact card to issue a background HTTP GET request to api-make_call after stripping spaces, dashes, and parentheses.
  • tel: URI handler: to dial tel:+15551234567 links from websites, register a custom handler under HKEY_CLASSES_ROOT\tel\shell\open\command in Windows Registry that passes %1 to a PowerShell script, strips the tel: prefix, and forwards the number to the phone.
Security tip: change the default passwords (admin/admin and user/123) and avoid embedding the master admin password inside shared spreadsheets or client scripts – use a restricted user account or passcode where supported by your firmware. Restrict API access under Network → Remote Control → Action URI Allowed IP List to specific workstation IPs instead of any, and keep VoIP phones in an isolated VLAN away from guest Wi-Fi.
Related posts:

Leave a Comment