SipSettingsApi

Version 47 (Adrian Georgescu, 06/03/2012 11:24 am)

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