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