Action URI Phone Action Variables
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 Value | Sangoma 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):
To manually toggle the speaker on, dial the *43 echo test, and then hang up, the load the following URLs in series:
Simple PHP code example: