SipSettingsApi
Version 31 (Adrian Georgescu, 09/28/2009 02:20 pm) → Version 32/68 (Adrian Georgescu, 09/28/2009 02:29 pm)
= SIP Settings API =
[[TOC(WikiStart, Sip*, depth=3)]]
== 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 [http://json.org json].
== TLS Certificate ==
Use the web settings page and navigate to the Info 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 calls ==
You can test all API commands by using the '''curl''' command line utility as follows:
{{{
curl -k -E user@domain.crt https://enrollment.sipthor.net/settings.phtml?action=account
}}}
The following actions are supported:
1. Return the account information:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_account https://enrollment.sipthor.net/settings.phtml?action=enum
}}}
1. Return the SIP aliases:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_aliases https://enrollment.sipthor.net/settings.phtml?action=aliases
}}}
1. Return the ENUM numbers:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_enum https://enrollment.sipthor.net/settings.phtml?action=enum
}}}
1. Return the last incoming and outgoing calls:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_calls https://enrollment.sipthor.net/settings.phtml?action=calls
}}}
1. Return the list of registered devices
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_devices https://enrollment.sipthor.net/settings.phtml?action=devices
}}}
1. Return the prepaid balance and active prepaid calls:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_prepaid https://enrollment.sipthor.net/settings.phtml?action=prepaid
}}}
1. Return the history of prepaid balance:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_balance_history https://enrollment.sipthor.net/settings.phtml?action=balance_history
}}}
1. Return the curent monthly usage:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_monthly_usage https://enrollment.sipthor.net/settings.phtml?action=monthly_usage
}}}
1. Return the list of diversions:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_diversions https://enrollment.sipthor.net/settings.phtml?action=diversions
}}}
1. Return the list of accept rules:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_accept https://enrollment.sipthor.net/settings.phtml?action=accept
}}}
1. Return the list of reject rules:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_reject https://enrollment.sipthor.net/settings.phtml?action=reject
}}}
1. Return the voicemail settings:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_voicemail https://enrollment.sipthor.net/settings.phtml?action=voicemail
}}}
1. Enabled Do Not Disturb
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on https://enrollment.sipthor.net/settings.phtml?action=dnd_on
}}}
1. Disable Do Not Disturb
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_off https://enrollment.sipthor.net/settings.phtml?action=dnd_off
}}}
1. Enable Do Not Disturb for 60 minutes
{{{
https://enrollment.sipthor.net/settings.phtml?action=dnd_on&duration=60
}}}
1. Enabled privacy (hide Caller Id for outgoing calls)
{{{
https://enrollment.sipthor.net/settings.phtml?action=privacy_on
}}}
1. Disable privacy
{{{
https://enrollment.sipthor.net/settings.phtml?action=privacy_off
}}}
1. Add an alias to our own account
{{{
https://enrollment.sipthor.net/settings.phtml?action=add_alias&username=alice
}}}
1. Set diversions
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_diversions&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>
}}}
[[TOC(WikiStart, Sip*, depth=3)]]
== 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 [http://json.org json].
== TLS Certificate ==
Use the web settings page and navigate to the Info 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 calls ==
You can test all API commands by using the '''curl''' command line utility as follows:
{{{
curl -k -E user@domain.crt https://enrollment.sipthor.net/settings.phtml?action=account
}}}
The following actions are supported:
1. Return the account information:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_account https://enrollment.sipthor.net/settings.phtml?action=enum
}}}
1. Return the SIP aliases:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_aliases https://enrollment.sipthor.net/settings.phtml?action=aliases
}}}
1. Return the ENUM numbers:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_enum https://enrollment.sipthor.net/settings.phtml?action=enum
}}}
1. Return the last incoming and outgoing calls:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_calls https://enrollment.sipthor.net/settings.phtml?action=calls
}}}
1. Return the list of registered devices
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_devices https://enrollment.sipthor.net/settings.phtml?action=devices
}}}
1. Return the prepaid balance and active prepaid calls:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_prepaid https://enrollment.sipthor.net/settings.phtml?action=prepaid
}}}
1. Return the history of prepaid balance:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_balance_history https://enrollment.sipthor.net/settings.phtml?action=balance_history
}}}
1. Return the curent monthly usage:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_monthly_usage https://enrollment.sipthor.net/settings.phtml?action=monthly_usage
}}}
1. Return the list of diversions:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_diversions https://enrollment.sipthor.net/settings.phtml?action=diversions
}}}
1. Return the list of accept rules:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_accept https://enrollment.sipthor.net/settings.phtml?action=accept
}}}
1. Return the list of reject rules:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_reject https://enrollment.sipthor.net/settings.phtml?action=reject
}}}
1. Return the voicemail settings:
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_voicemail https://enrollment.sipthor.net/settings.phtml?action=voicemail
}}}
1. Enabled Do Not Disturb
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on https://enrollment.sipthor.net/settings.phtml?action=dnd_on
}}}
1. Disable Do Not Disturb
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_off https://enrollment.sipthor.net/settings.phtml?action=dnd_off
}}}
1. Enable Do Not Disturb for 60 minutes
{{{
https://enrollment.sipthor.net/settings.phtml?action=dnd_on&duration=60
}}}
1. Enabled privacy (hide Caller Id for outgoing calls)
{{{
https://enrollment.sipthor.net/settings.phtml?action=privacy_on
}}}
1. Disable privacy
{{{
https://enrollment.sipthor.net/settings.phtml?action=privacy_off
}}}
1. Add an alias to our own account
{{{
https://enrollment.sipthor.net/settings.phtml?action=add_alias&username=alice
}}}
1. Set diversions
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_diversions&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>
}}}