Project

General

Profile

SipSettingsApi » History » Version 49

Adrian Georgescu, 06/09/2012 12:55 PM

1 49 Adrian Georgescu
h1. SIP Account API
2 46 Adrian Georgescu
3 49 Adrian Georgescu
This API can be used from third party applications that wish to interact with the SIP account data stored on the server. Data can be read or modified by calling various functions.
4 46 Adrian Georgescu
5 49 Adrian Georgescu
h2. Server API Address
6 46 Adrian Georgescu
7 1 Adrian Georgescu
To access the API, a client must connect using HTTP protocol to the following address: 
8
9
https://enrollment.sipthor.net/settings.phtml
10
11
The return is encoded using "json":http://json.org.
12
13
h2. API Functions
14 46 Adrian Georgescu
15 1 Adrian Georgescu
You can test the following API commands by using the *curl* command line utility as follows:
16 49 Adrian Georgescu
17
h3. Identity
18 46 Adrian Georgescu
19
<pre>
20 1 Adrian Georgescu
curl https://enrollment.sipthor.net/settings.phtml?action=get_identity
21 46 Adrian Georgescu
</pre>
22 1 Adrian Georgescu
23
The following actions are supported:
24
25 46 Adrian Georgescu
# Return identity information:
26
<pre>
27 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_identity
28 46 Adrian Georgescu
</pre>
29
# Return the SIP aliases:
30
<pre>
31 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_aliases
32 46 Adrian Georgescu
</pre>
33
# Return the ENUM numbers:
34
<pre>
35 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_enum
36
</pre>
37 48 Adrian Georgescu
# Returns call history:
38 46 Adrian Georgescu
<pre>
39 47 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_history
40 46 Adrian Georgescu
</pre>
41
# Return the list of registered devices
42
<pre>
43 17 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_devices
44 46 Adrian Georgescu
</pre>
45
# Return the prepaid balance and active calls:
46
<pre>
47 9 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_prepaid
48 46 Adrian Georgescu
</pre>
49
# Return the history of prepaid balance:
50
<pre>
51 10 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_balance_history
52 46 Adrian Georgescu
</pre>
53
# Return the curent monthly usage:
54
<pre>
55 10 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_monthly_usage
56 46 Adrian Georgescu
</pre>
57
# Return the call forwarding settings:
58
<pre>
59 11 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_call_forwarding
60 46 Adrian Georgescu
</pre>
61
# Return the list of accept rules:
62
<pre>
63 16 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_accept_rules
64 46 Adrian Georgescu
</pre>
65
# Return the list of reject rules:
66
<pre>
67 16 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_reject_rules
68 46 Adrian Georgescu
</pre>
69
# Return the voicemail settings:
70
<pre>
71 27 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_voicemail
72 46 Adrian Georgescu
</pre>
73
# Enabled Do Not Disturb
74
<pre>
75 25 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on
76 46 Adrian Georgescu
</pre>
77
# Disable Do Not Disturb
78
<pre>
79 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_off
80 46 Adrian Georgescu
</pre>
81
# Enable Do Not Disturb for 60 minutes
82
<pre>
83 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on&duration=60
84 46 Adrian Georgescu
</pre>
85
# Enabled privacy (hide Caller Id for outgoing calls)
86
<pre>
87 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_privacy_on
88 46 Adrian Georgescu
</pre>
89
# Disable privacy
90
<pre>
91 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_privacy_off
92 46 Adrian Georgescu
</pre>
93
# Add an alias to our own account 
94
<pre>
95 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=add_alias&username=alice
96 46 Adrian Georgescu
</pre>
97
# Set call forwarding
98
<pre>
99 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_call_forwarding&FUNC=target&FBUS=target&...
100 46 Adrian Georgescu
</pre>
101
<pre>
102 1 Adrian Georgescu
FUNC = Forward unconditional all calls
103
FBUS = Forward on Busy
104
FNOL = Forward on Not Online
105
FNOA = Forward on No Answer
106
FUNV = Forward when Not Available based on Accept rules
107
108
Pre-defined keywords for diversion targets:
109
110
<voice-mailbox>
111
<mobile-number>
112
113 46 Adrian Georgescu
</pre>