Project

General

Profile

SipSettingsApi » History » Version 54

Adrian Georgescu, 06/09/2012 01:06 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 50 Adrian Georgescu
The following actions are supported:
16 49 Adrian Georgescu
17
h3. Identity
18 1 Adrian Georgescu
19 51 Adrian Georgescu
Returns identity information:
20 1 Adrian Georgescu
<pre>
21
https://enrollment.sipthor.net/settings.phtml?action=get_identity
22 46 Adrian Georgescu
</pre>
23 50 Adrian Georgescu
24
h3. SIP aliases
25
26 51 Adrian Georgescu
Return the SIP aliases:
27 1 Adrian Georgescu
<pre>
28
https://enrollment.sipthor.net/settings.phtml?action=get_aliases
29
</pre>
30 50 Adrian Georgescu
31 51 Adrian Georgescu
Add an alias to our own account
32 50 Adrian Georgescu
<pre>
33
https://enrollment.sipthor.net/settings.phtml?action=add_alias&username=alice
34
</pre>
35
36
h3. ENUM numbers
37
38 51 Adrian Georgescu
Return the ENUM numbers:
39 1 Adrian Georgescu
<pre>
40 46 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_enum
41 1 Adrian Georgescu
</pre>
42 46 Adrian Georgescu
43 50 Adrian Georgescu
h3. Call history
44
45 51 Adrian Georgescu
Returns call history:
46
47 1 Adrian Georgescu
<pre>
48
https://enrollment.sipthor.net/settings.phtml?action=get_history
49 48 Adrian Georgescu
</pre>
50 50 Adrian Georgescu
51
h3. Registered devices
52
53 51 Adrian Georgescu
Return the list of registered devices
54 47 Adrian Georgescu
<pre>
55 46 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_devices
56 1 Adrian Georgescu
</pre>
57
58 50 Adrian Georgescu
h3. Prepaid
59
60 51 Adrian Georgescu
Return the prepaid balance and active calls:
61 1 Adrian Georgescu
<pre>
62 46 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_prepaid
63
</pre>
64 51 Adrian Georgescu
65
Return the history of prepaid balance:
66 1 Adrian Georgescu
<pre>
67
https://enrollment.sipthor.net/settings.phtml?action=get_balance_history
68
</pre>
69 51 Adrian Georgescu
70
Return the curent monthly usage:
71 1 Adrian Georgescu
<pre>
72 46 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_monthly_usage
73
</pre>
74 50 Adrian Georgescu
75
h3. Call forwarding
76
77 51 Adrian Georgescu
Return the call forwarding settings:
78 1 Adrian Georgescu
<pre>
79
https://enrollment.sipthor.net/settings.phtml?action=get_call_forwarding
80
</pre>
81 50 Adrian Georgescu
82 51 Adrian Georgescu
Set call forwarding
83 50 Adrian Georgescu
<pre>
84
https://enrollment.sipthor.net/settings.phtml?action=set_call_forwarding&FUNC=target&FBUS=target&...
85
</pre>
86
<pre>
87
FUNC = Forward unconditional all calls
88
FBUS = Forward on Busy
89
FNOL = Forward on Not Online
90 1 Adrian Georgescu
FNOA = Forward on No Answer
91 50 Adrian Georgescu
FUNV = Forward when Not Available based on Accept rules
92
93 1 Adrian Georgescu
Pre-defined keywords for diversion targets:
94
95 50 Adrian Georgescu
<voice-mailbox>
96
<mobile-number>
97
98
</pre>
99
100 1 Adrian Georgescu
h3. Call filtering
101 50 Adrian Georgescu
 
102 51 Adrian Georgescu
Return the list of accept rules:
103 1 Adrian Georgescu
<pre>
104
https://enrollment.sipthor.net/settings.phtml?action=get_accept_rules
105
</pre>
106 51 Adrian Georgescu
107
Return the list of reject rules:
108 46 Adrian Georgescu
<pre>
109 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_reject_rules
110
</pre>
111 50 Adrian Georgescu
112
h3. Voicemail settings
113 1 Adrian Georgescu
114 51 Adrian Georgescu
Return the voicemail settings:
115 1 Adrian Georgescu
<pre>
116 46 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_voicemail
117
</pre>
118 50 Adrian Georgescu
119
h3. Do not disturb
120 1 Adrian Georgescu
121 51 Adrian Georgescu
Enabled Do Not Disturb
122 46 Adrian Georgescu
<pre>
123 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on
124
</pre>
125 51 Adrian Georgescu
126
Disable Do Not Disturb
127 46 Adrian Georgescu
<pre>
128
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_off
129 1 Adrian Georgescu
</pre>
130 51 Adrian Georgescu
131
Enable Do Not Disturb for 60 minutes
132 1 Adrian Georgescu
<pre>
133 46 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on&duration=60
134
</pre>
135 1 Adrian Georgescu
136 50 Adrian Georgescu
h3. Privacy
137
138 51 Adrian Georgescu
Enabled privacy (hide Caller Id for outgoing calls)
139 1 Adrian Georgescu
<pre>
140
https://enrollment.sipthor.net/settings.phtml?action=set_privacy_on
141
</pre>
142 51 Adrian Georgescu
143
Disable privacy
144 1 Adrian Georgescu
<pre>
145
https://enrollment.sipthor.net/settings.phtml?action=set_privacy_off
146 46 Adrian Georgescu
</pre>
147 52 Adrian Georgescu
148
h3. Chat message replication
149
150
Get entries
151
152
<pre>
153
https://enrollment.sipthor.net/settings.phtml?action=get_journal_entries&except_uuid=UUID&after_id=ID}
154
</pre>
155
156 54 Adrian Georgescu
UUID is the GRUU identifier of the SIP client. ID must be replaced with the last replicated journal_id received from a previous get_journal_entries call. The return contains DATA that was put using a put_journal_entries call.
157 52 Adrian Georgescu
158
Put entries
159
160
<pre>
161
https://enrollment.sipthor.net/settings.phtml?action=put_journal_entries
162
</pre>
163 53 Adrian Georgescu
164 54 Adrian Georgescu
The request must be done using POST method by passing two variables uuid=UUID and data=DATA. DATA can be anything the client understands when reading it back using  a get_journal_entries call.