Project

General

Profile

SipSettingsApi » History » Version 7

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