SipSettingsApi

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 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 1 Adrian Georgescu
You can test the following API commands by using the *curl* command line utility as follows:
16 49 Adrian Georgescu
17 49 Adrian Georgescu
h3. Identity
18 46 Adrian Georgescu
19 46 Adrian Georgescu
<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 1 Adrian Georgescu
The following actions are supported:
24 1 Adrian Georgescu
25 46 Adrian Georgescu
# Return identity information:
26 46 Adrian Georgescu
<pre>
27 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_identity
28 46 Adrian Georgescu
</pre>
29 46 Adrian Georgescu
# Return the SIP aliases:
30 46 Adrian Georgescu
<pre>
31 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_aliases
32 46 Adrian Georgescu
</pre>
33 46 Adrian Georgescu
# Return the ENUM numbers:
34 46 Adrian Georgescu
<pre>
35 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_enum
36 1 Adrian Georgescu
</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 46 Adrian Georgescu
# Return the list of registered devices
42 46 Adrian Georgescu
<pre>
43 17 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_devices
44 46 Adrian Georgescu
</pre>
45 46 Adrian Georgescu
# Return the prepaid balance and active calls:
46 46 Adrian Georgescu
<pre>
47 9 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_prepaid
48 46 Adrian Georgescu
</pre>
49 46 Adrian Georgescu
# Return the history of prepaid balance:
50 46 Adrian Georgescu
<pre>
51 10 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_balance_history
52 46 Adrian Georgescu
</pre>
53 46 Adrian Georgescu
# Return the curent monthly usage:
54 46 Adrian Georgescu
<pre>
55 10 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_monthly_usage
56 46 Adrian Georgescu
</pre>
57 46 Adrian Georgescu
# Return the call forwarding settings:
58 46 Adrian Georgescu
<pre>
59 11 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_call_forwarding
60 46 Adrian Georgescu
</pre>
61 46 Adrian Georgescu
# Return the list of accept rules:
62 46 Adrian Georgescu
<pre>
63 16 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_accept_rules
64 46 Adrian Georgescu
</pre>
65 46 Adrian Georgescu
# Return the list of reject rules:
66 46 Adrian Georgescu
<pre>
67 16 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_reject_rules
68 46 Adrian Georgescu
</pre>
69 46 Adrian Georgescu
# Return the voicemail settings:
70 46 Adrian Georgescu
<pre>
71 27 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=get_voicemail
72 46 Adrian Georgescu
</pre>
73 46 Adrian Georgescu
# Enabled Do Not Disturb
74 46 Adrian Georgescu
<pre>
75 25 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on
76 46 Adrian Georgescu
</pre>
77 46 Adrian Georgescu
# Disable Do Not Disturb
78 46 Adrian Georgescu
<pre>
79 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_off
80 46 Adrian Georgescu
</pre>
81 46 Adrian Georgescu
# Enable Do Not Disturb for 60 minutes
82 46 Adrian Georgescu
<pre>
83 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on&duration=60
84 46 Adrian Georgescu
</pre>
85 46 Adrian Georgescu
# Enabled privacy (hide Caller Id for outgoing calls)
86 46 Adrian Georgescu
<pre>
87 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_privacy_on
88 46 Adrian Georgescu
</pre>
89 46 Adrian Georgescu
# Disable privacy
90 46 Adrian Georgescu
<pre>
91 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=set_privacy_off
92 46 Adrian Georgescu
</pre>
93 46 Adrian Georgescu
# Add an alias to our own account 
94 46 Adrian Georgescu
<pre>
95 1 Adrian Georgescu
https://enrollment.sipthor.net/settings.phtml?action=add_alias&username=alice
96 46 Adrian Georgescu
</pre>
97 46 Adrian Georgescu
# Set call forwarding
98 46 Adrian Georgescu
<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 46 Adrian Georgescu
<pre>
102 1 Adrian Georgescu
FUNC = Forward unconditional all calls
103 1 Adrian Georgescu
FBUS = Forward on Busy
104 1 Adrian Georgescu
FNOL = Forward on Not Online
105 1 Adrian Georgescu
FNOA = Forward on No Answer
106 1 Adrian Georgescu
FUNV = Forward when Not Available based on Accept rules
107 1 Adrian Georgescu
108 1 Adrian Georgescu
Pre-defined keywords for diversion targets:
109 1 Adrian Georgescu
110 1 Adrian Georgescu
<voice-mailbox>
111 1 Adrian Georgescu
<mobile-number>
112 1 Adrian Georgescu
113 46 Adrian Georgescu
</pre>