SipSettingsApi
Version 63 (Adrian Georgescu, 09/20/2012 04:33 pm)
1 | 61 | Adrian Georgescu | h1. SIP Account Management API |
---|---|---|---|
2 | 46 | Adrian Georgescu | |
3 | 63 | Adrian Georgescu | This API can be used from third party applications running in and end-point 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 | 62 | Adrian Georgescu | h2. Server 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 | 1 | Adrian Georgescu | |
9 | 1 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml |
10 | 1 | Adrian Georgescu | |
11 | 1 | Adrian Georgescu | The return is encoded using "json":http://json.org. |
12 | 1 | Adrian Georgescu | |
13 | 1 | Adrian Georgescu | h2. API Functions |
14 | 46 | Adrian Georgescu | |
15 | 50 | Adrian Georgescu | The following actions are supported: |
16 | 49 | Adrian Georgescu | |
17 | 49 | Adrian Georgescu | h3. Identity |
18 | 1 | Adrian Georgescu | |
19 | 51 | Adrian Georgescu | Returns identity information: |
20 | 1 | Adrian Georgescu | <pre> |
21 | 1 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_identity |
22 | 46 | Adrian Georgescu | </pre> |
23 | 50 | Adrian Georgescu | |
24 | 50 | Adrian Georgescu | h3. SIP aliases |
25 | 50 | Adrian Georgescu | |
26 | 51 | Adrian Georgescu | Return the SIP aliases: |
27 | 1 | Adrian Georgescu | <pre> |
28 | 1 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_aliases |
29 | 1 | Adrian Georgescu | </pre> |
30 | 50 | Adrian Georgescu | |
31 | 51 | Adrian Georgescu | Add an alias to our own account |
32 | 50 | Adrian Georgescu | <pre> |
33 | 50 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=add_alias&username=alice |
34 | 50 | Adrian Georgescu | </pre> |
35 | 50 | Adrian Georgescu | |
36 | 50 | Adrian Georgescu | h3. ENUM numbers |
37 | 50 | Adrian Georgescu | |
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 | 50 | Adrian Georgescu | |
45 | 51 | Adrian Georgescu | Returns call history: |
46 | 51 | Adrian Georgescu | |
47 | 1 | Adrian Georgescu | <pre> |
48 | 1 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_history |
49 | 48 | Adrian Georgescu | </pre> |
50 | 50 | Adrian Georgescu | |
51 | 50 | Adrian Georgescu | h3. Registered devices |
52 | 50 | Adrian Georgescu | |
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 | 1 | Adrian Georgescu | |
58 | 50 | Adrian Georgescu | h3. Prepaid |
59 | 50 | Adrian Georgescu | |
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 | 46 | Adrian Georgescu | </pre> |
64 | 51 | Adrian Georgescu | |
65 | 51 | Adrian Georgescu | Return the history of prepaid balance: |
66 | 1 | Adrian Georgescu | <pre> |
67 | 1 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_balance_history |
68 | 1 | Adrian Georgescu | </pre> |
69 | 51 | Adrian Georgescu | |
70 | 51 | Adrian Georgescu | 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 | 46 | Adrian Georgescu | </pre> |
74 | 50 | Adrian Georgescu | |
75 | 50 | Adrian Georgescu | h3. Call forwarding |
76 | 50 | Adrian Georgescu | |
77 | 51 | Adrian Georgescu | Return the call forwarding settings: |
78 | 1 | Adrian Georgescu | <pre> |
79 | 1 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_call_forwarding |
80 | 1 | Adrian Georgescu | </pre> |
81 | 50 | Adrian Georgescu | |
82 | 51 | Adrian Georgescu | Set call forwarding |
83 | 50 | Adrian Georgescu | <pre> |
84 | 50 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_call_forwarding&FUNC=target&FBUS=target&... |
85 | 50 | Adrian Georgescu | </pre> |
86 | 50 | Adrian Georgescu | <pre> |
87 | 50 | Adrian Georgescu | FUNC = Forward unconditional all calls |
88 | 50 | Adrian Georgescu | FBUS = Forward on Busy |
89 | 50 | Adrian Georgescu | 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 | 50 | Adrian Georgescu | |
93 | 1 | Adrian Georgescu | Pre-defined keywords for diversion targets: |
94 | 1 | Adrian Georgescu | |
95 | 50 | Adrian Georgescu | <voice-mailbox> |
96 | 50 | Adrian Georgescu | <mobile-number> |
97 | 50 | Adrian Georgescu | |
98 | 50 | Adrian Georgescu | </pre> |
99 | 50 | Adrian Georgescu | |
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 | 1 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_accept_rules |
105 | 1 | Adrian Georgescu | </pre> |
106 | 51 | Adrian Georgescu | |
107 | 51 | Adrian Georgescu | 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 | 1 | Adrian Georgescu | </pre> |
111 | 50 | Adrian Georgescu | |
112 | 50 | Adrian Georgescu | 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 | 46 | Adrian Georgescu | </pre> |
118 | 50 | Adrian Georgescu | |
119 | 50 | Adrian Georgescu | 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 | 1 | Adrian Georgescu | </pre> |
125 | 51 | Adrian Georgescu | |
126 | 51 | Adrian Georgescu | Disable Do Not Disturb |
127 | 46 | Adrian Georgescu | <pre> |
128 | 46 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_dnd_off |
129 | 1 | Adrian Georgescu | </pre> |
130 | 51 | Adrian Georgescu | |
131 | 51 | Adrian Georgescu | 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 | 46 | Adrian Georgescu | </pre> |
135 | 1 | Adrian Georgescu | |
136 | 50 | Adrian Georgescu | h3. Privacy |
137 | 50 | Adrian Georgescu | |
138 | 51 | Adrian Georgescu | Enabled privacy (hide Caller Id for outgoing calls) |
139 | 1 | Adrian Georgescu | <pre> |
140 | 1 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_privacy_on |
141 | 1 | Adrian Georgescu | </pre> |
142 | 51 | Adrian Georgescu | |
143 | 51 | Adrian Georgescu | Disable privacy |
144 | 1 | Adrian Georgescu | <pre> |
145 | 1 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_privacy_off |
146 | 46 | Adrian Georgescu | </pre> |
147 | 52 | Adrian Georgescu | |
148 | 57 | Adrian Georgescu | h3. Data replication |
149 | 1 | Adrian Georgescu | |
150 | 57 | Adrian Georgescu | These function can be used by multiple client instances to replicate arbitrary data among themselves. An example of such application is bidirectional replication of chat messages between multiple clients configured for the same account. |
151 | 57 | Adrian Georgescu | |
152 | 58 | Adrian Georgescu | Get journal entries |
153 | 52 | Adrian Georgescu | |
154 | 52 | Adrian Georgescu | <pre> |
155 | 55 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_journal_entries&except_uuid=UUID&after_id=ID |
156 | 52 | Adrian Georgescu | </pre> |
157 | 52 | Adrian Georgescu | |
158 | 60 | 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 an array with 'data' entities that were put using the 'put_journal_entries' call. |
159 | 52 | Adrian Georgescu | |
160 | 58 | Adrian Georgescu | Put journal entries |
161 | 52 | Adrian Georgescu | |
162 | 52 | Adrian Georgescu | <pre> |
163 | 52 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=put_journal_entries |
164 | 1 | Adrian Georgescu | </pre> |
165 | 1 | Adrian Georgescu | |
166 | 59 | Adrian Georgescu | The request must be done using POST method by passing two variables uuid=UUID and data=DATA. |
167 | 59 | Adrian Georgescu | |
168 | 59 | Adrian Georgescu | UUID is the GRUU identifier of the SIP client. |
169 | 59 | Adrian Georgescu | |
170 | 59 | Adrian Georgescu | DATA must be a json encoded associative array containing the 'id' and 'data' keys. 'id' value must be client own identifier corresponding to the replicated data. |
171 | 59 | Adrian Georgescu | |
172 | 59 | Adrian Georgescu | 'data' value can be anything the client understands when reading it back using a get_journal_entries call. Is recommended that 'data' values are encrypted using a key known only by the client. |
173 | 58 | Adrian Georgescu | |
174 | 60 | Adrian Georgescu | The response from the server contains a json encoded array with mappings between client id and server journal id that can be saved by the client for further reference that can be used for 'get_journal_entries' calls. |