SipSettingsApi

Version 46 (Adrian Georgescu, 07/13/2011 09:04 am)

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