Settings API
Table of Contents
This API can be used from third party applications that wish to interact with the SIP account settings. Data can be read or modified by calling various functions.
API Address
To access the API, a client must connect using HTTP protocol to the following address:
https://enrollment.sipthor.net/settings.phtml
To be authorized, the client must use a TLS client certificate, this certificate can be retrieved in the Info tab of the web page for the SIP account settings.
The return is encoded using json.
TLS Certificate
Use the web settings page and navigate to the Identity tab. Download the TLS certificate in the format supported by your HTTP client.
- user@domain.crt format can be use by command line tools like curl
- user@domain.p12 format can be imported in web browsers
The .p12 file contains the same certificate stored in a way that can be loaded by web browsers like Safari on MacOSX or Firefox. To unlock the .p12 file you must use the password for your SIP account.
API Functions
You can test the following API commands by using the curl command line utility as follows:
curl -k -E user@domain.crt https://enrollment.sipthor.net/settings.phtml?action=get_identity
The following actions are supported:
- Return identity information:
https://enrollment.sipthor.net/settings.phtml?action=get_identity
- Return the SIP aliases:
https://enrollment.sipthor.net/settings.phtml?action=get_aliases
- Return the ENUM numbers:
https://enrollment.sipthor.net/settings.phtml?action=get_enum
- Return the list of last calls:
https://enrollment.sipthor.net/settings.phtml?action=get_calls
- Return the list of registered devices
https://enrollment.sipthor.net/settings.phtml?action=get_devices
- Return the prepaid balance and active calls:
https://enrollment.sipthor.net/settings.phtml?action=get_prepaid
- Return the history of prepaid balance:
https://enrollment.sipthor.net/settings.phtml?action=get_balance_history
- Return the curent monthly usage:
https://enrollment.sipthor.net/settings.phtml?action=get_monthly_usage
- Return the call forwarding settings:
https://enrollment.sipthor.net/settings.phtml?action=get_call_forwarding
- Return the list of accept rules:
https://enrollment.sipthor.net/settings.phtml?action=get_accept_rules
- Return the list of reject rules:
https://enrollment.sipthor.net/settings.phtml?action=get_reject_rules
- Return the voicemail settings:
https://enrollment.sipthor.net/settings.phtml?action=get_voicemail
- Enabled Do Not Disturb
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on
- Disable Do Not Disturb
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_off
- Enable Do Not Disturb for 60 minutes
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on&duration=60
- Enabled privacy (hide Caller Id for outgoing calls)
https://enrollment.sipthor.net/settings.phtml?action=set_privacy_on
- Disable privacy
https://enrollment.sipthor.net/settings.phtml?action=set_privacy_off
- Add an alias to our own account
https://enrollment.sipthor.net/settings.phtml?action=add_alias&username=alice
- Set call forwarding
https://enrollment.sipthor.net/settings.phtml?action=set_call_forwarding&FUNC=target&FBUS=target&...
FUNC = Forward unconditional all calls FBUS = Forward on Busy FNOL = Forward on Not Online FNOA = Forward on No Answer FUNV = Forward when Not Available based on Accept rules Pre-defined keywords for diversion targets: <voice-mailbox> <mobile-number>
