Action URI allows Sangoma phones to interact with web server application by receiving and handling an HTTP GET request. When receiving a GET request, the Sangoma Phone will perform the specified action and respond with a 200 OK message. If you want to dial a number you can use the format of:

http://admin:PASSWORD@IP_Address/Phone_ActionURL&Command=1&Number=4003&Account=1

Replace 4003 with your phone number you want to call.

 A GET request may contain variable named as "key" and key value separated by "=".  If you want to send a specific key press to the phone, use a URL of the format: 

http://admin:PASSWORD@IP_Address/Phone_ActionURL&key=%key_value%

where the key value is taken from the following table (key values are case sensitive):

 

key ValueSangoma Phone Action

OK

Press the OK key.

ENTER

Press the Enter soft key

SPEAKER

Press the Speaker key.

F_TRANSFER

Press the TRANSFER key or the Transfer soft key

VOLUME_UP

Increase the volume.

VOLUME_DOWN

Decrease the volume.

MUTE

Press the MUTE key

F_HOLD

Press the HOLD key or the Hold soft key.

X

Press the X key.

CANCEL

Return to a previous screen or cancel a call

0-9/*/POUND

Send the DTMF digit (0-9, * or #).

L1-L45

Press the line key

D1-D10 

Press a DSS Key

F_CONFERENCE

Press the Conference soft key.

F1-F4

Press the soft key.

MSG

Press the MESSAGE key.

HEADSET

Press the HEADSET key.

RD

Press the REDIALkey.

UP/DOWN/LEFT/RIGHT

Press the Navigation keys.

Reboot

Reboot the phone.

AutoP

Perform Auto Provisioning

DNDOn

Activate the DND mode.

DNDOff

Deactivate the DND mode.

 

Examples:

Assume you have a phone at IP address 192.168.0.123, with default credentials of admin/222222. From a browser, you can trigger the phone to dial a *43 echo test:

http://admin:"222222"@192.168.0.123/Phone_ActionURL&Command=1&Number=*43&Account=1

 

To toggle the speaker button on the phone (same key toggles on or off):

http://admin:"222222"@192.168.0.123/Phone_ActionURL&key=SPEAKER


To manually toggle the speaker on, dial the *43 echo test, and then hang up, the load the following URLs in series:

http://admin:"222222"@192.168.0.123/Phone_ActionURL&key=SPEAKER
http://admin:"222222"@192.168.0.123/Phone_ActionURL&key=*
http://admin:"222222"@192.168.0.123/Phone_ActionURL&key=4
http://admin:"222222"@192.168.0.123/Phone_ActionURL&key=3
http://admin:"222222"@192.168.0.123/Phone_ActionURL&key=X


Simple PHP code example:

<?php
$number="*43";
$username="admin";
$password="222222";
$url = "192.168.0.123/Phone_ActionURL&Command=1&Number=".$number."&Account=1";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);