Project

General

Profile

SipSettingsApi » History » Version 46

Adrian Georgescu, 07/13/2011 09:04 AM

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