Project

General

Profile

SipSettingsApi » History » Version 1

Adrian Georgescu, 09/23/2009 02:33 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
 * 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
19
20
== API calls ==
21
22
You can test all API commands by using the '''curl''' command line utility as follows:
23
24
{{{
25
curl -k -E user@domain.crt https://blink.sipthor.net/settings.phtml?export=1&action=action
26
}}}
27
28
 1. Return the account information:
29
{{{
30
https://blink.sipthor.net/settings.phtml?export=1&action=enum
31
}}}
32
 1. Return the SIP aliases:
33
{{{
34
https://blink.sipthor.net/settings.phtml?export=1&action=aliases
35
}}}
36
 1. Return the ENUM numbers:
37
{{{
38
https://blink.sipthor.net/settings.phtml?export=1&action=enum
39
}}}
40
 1. Return the prepaid balance and active prepaid calls:
41
{{{
42
https://blink.sipthor.net/settings.phtml?export=1&action=prepaid
43
}}}
44
 1. Return the history of prepaid balance:
45
{{{
46
https://blink.sipthor.net/settings.phtml?export=1&action=balance_history
47
}}}
48
 1. Return the curent monthly usage:
49
{{{
50
https://blink.sipthor.net/settings.phtml?export=1&action=monthly_usage
51
}}}
52
 1. Return the list of diversions:
53
{{{
54
https://blink.sipthor.net/settings.phtml?export=1&action=diversions
55
}}}
56
 1. Return the list of accept rules:
57
{{{
58
https://blink.sipthor.net/settings.phtml?export=1&action=rules
59
}}}
60
 1. Return the list of reject rules:
61
{{{
62
https://blink.sipthor.net/settings.phtml?export=1&action=reject
63
}}}
64
 1. Return the voicemail settings:
65
{{{
66
https://blink.sipthor.net/settings.phtml?export=1&action=voicemail
67
}}}