SipSettingsApi » History » Revision 14
« Previous |
Revision 14/68
(diff)
| Next »
Adrian Georgescu, 09/23/2009 05:48 PM
= SIP Settings API =
<abbr title="WikiStart, Sip*, depth=3">TOC</abbr>
Is possible read and write various SIP account settings by making one shot HTTP requests. When you access the [http://x.sip2sip.info SIP settings page] the server prompts for the SIP account credentials which are then associated with a web session.
To perform one shot HTTP requests to access this API directly you must use a TLS client certificate to authorize the request, there is no long-lived web session.
API addressTo access the API the HTTP client must connect to the following address:
https://blink.sipthor.net/settings.phtml
Client CertificateUse 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 callsYou can test all API commands by using the '''curl''' command line utility as follows:
{{{
curl -k -E user@domain.crt https://blink.sipthor.net/settings.phtml?export=1&action=name
}}}
The following actions are supported:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=enum
}}}
1. Return the SIP aliases:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=aliases
}}}
1. Return the ENUM numbers:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=enum
}}}
1. Return the last incoming and outgoing calls:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=calls
}}}
1. Return the prepaid balance and active prepaid calls:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=prepaid
}}}
1. Return the history of prepaid balance:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=balance_history
}}}
1. Return the curent monthly usage:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=monthly_usage
}}}
1. Return the list of diversions:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=diversions
}}}
1. Return the list of accept rules:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=accept
}}}
1. Return the list of reject rules:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=reject
}}}
1. Return the voicemail settings:
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=voicemail
}}}
1. Enabled Do Not Disturb
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=dnd_on
}}}
1. Disable Do Not Disturb
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=dnd_off
}}}
1. Enable Do Not Disturb fro 60 minutes
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=dnd_on&duration=60
}}}
1. Enabled privacy (hide Caller Id for outgoing calls)
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=privacy_on
}}}
1. Disable privacy
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=privacy_off
}}}
1. Add an alias to our own account
{{{
https://blink.sipthor.net/settings.phtml?export=1&action=add_alias&username=alice
}}}
1. Return the account information:
Updated by Adrian Georgescu about 15 years ago · 14 revisions locked