Project

General

Profile

SipSettingsApi » History » Version 3

Adrian Georgescu, 09/23/2009 02:39 PM

1 1 Adrian Georgescu
= SIP Settings API =
2
 
3
[[TOC(WikiStart, Sip*, depth=3)]]
4
5
Is possible read and write various SIP account settings by making one shot HTTP requests. When you access the 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 you must use a client X.509 certificate to authorize the request, there is no long lived session.
6
7
== API address ==
8
9
To access the API the HTTP client must connect to the following address:
10
11
https://blink.sipthor.net/settings.phtml
12
 
13
== Client Certificate ==
14
15
Use the web settings page and navigate to Info tab. Download the certificate in the format supported by your HTTP client. 
16
17
 * user@domain.crt format can be use by command line tools like curl 
18 2 Adrian Georgescu
 * user@domain.p12 format contains the same client 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
19 1 Adrian Georgescu
20
== API calls ==
21
22
You can test all API commands by using the '''curl''' command line utility as follows:
23
24
{{{
25 3 Adrian Georgescu
curl -k -E user@domain.crt https://blink.sipthor.net/settings.phtml?export=1&action=name
26 1 Adrian Georgescu
}}}
27 3 Adrian Georgescu
28
The following actions are supported:
29 1 Adrian Georgescu
30
 1. Return the account information:
31
{{{
32
https://blink.sipthor.net/settings.phtml?export=1&action=enum
33
}}}
34
 1. Return the SIP aliases:
35
{{{
36
https://blink.sipthor.net/settings.phtml?export=1&action=aliases
37
}}}
38
 1. Return the ENUM numbers:
39
{{{
40
https://blink.sipthor.net/settings.phtml?export=1&action=enum
41
}}}
42
 1. Return the prepaid balance and active prepaid calls:
43
{{{
44
https://blink.sipthor.net/settings.phtml?export=1&action=prepaid
45
}}}
46
 1. Return the history of prepaid balance:
47
{{{
48
https://blink.sipthor.net/settings.phtml?export=1&action=balance_history
49
}}}
50
 1. Return the curent monthly usage:
51
{{{
52
https://blink.sipthor.net/settings.phtml?export=1&action=monthly_usage
53
}}}
54
 1. Return the list of diversions:
55
{{{
56
https://blink.sipthor.net/settings.phtml?export=1&action=diversions
57
}}}
58
 1. Return the list of accept rules:
59
{{{
60
https://blink.sipthor.net/settings.phtml?export=1&action=rules
61
}}}
62
 1. Return the list of reject rules:
63
{{{
64
https://blink.sipthor.net/settings.phtml?export=1&action=reject
65
}}}
66
 1. Return the voicemail settings:
67
{{{
68
https://blink.sipthor.net/settings.phtml?export=1&action=voicemail
69
}}}