SipSettingsApi » History » Version 42
Adrian Georgescu, 10/04/2009 03:34 PM
1 | 38 | Adrian Georgescu | = Settings API = |
---|---|---|---|
2 | 1 | Adrian Georgescu | |
3 | [[TOC(WikiStart, Sip*, depth=3)]] |
||
4 | |||
5 | 39 | 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. |
6 | 1 | Adrian Georgescu | |
7 | 39 | Adrian Georgescu | == API Address == |
8 | |||
9 | 20 | Adrian Georgescu | To access the API, a client must connect using HTTP protocol to the following address: |
10 | 1 | Adrian Georgescu | |
11 | 29 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml |
12 | 19 | Adrian Georgescu | |
13 | 20 | Adrian Georgescu | To be authorized, the client must use a TLS client certificate, this certificate can be retrieved in the Info tab of the web page for the SIP account settings. |
14 | 28 | Adrian Georgescu | |
15 | 23 | Adrian Georgescu | The return is encoded using [http://json.org json]. |
16 | |||
17 | 22 | Adrian Georgescu | == TLS Certificate == |
18 | 1 | Adrian Georgescu | |
19 | 13 | Adrian Georgescu | Use the web settings page and navigate to the Info tab. Download the TLS certificate in the format supported by your HTTP client. |
20 | 1 | Adrian Georgescu | |
21 | 14 | Adrian Georgescu | * !user@domain.crt format can be use by command line tools like curl |
22 | * !user@domain.p12 format can be imported in web browsers |
||
23 | 7 | Adrian Georgescu | |
24 | 1 | Adrian Georgescu | The .p12 file contains the same certificate stored in a way that can be loaded by web browsers like Safari on MacOSX or Firefox. To unlock the .p12 file you must use the password for your SIP account. |
25 | |||
26 | 39 | Adrian Georgescu | == API Functions == |
27 | 1 | Adrian Georgescu | |
28 | 35 | Adrian Georgescu | You can test the following API commands by using the '''curl''' command line utility as follows: |
29 | |||
30 | 3 | Adrian Georgescu | {{{ |
31 | 40 | Adrian Georgescu | curl -k -E user@domain.crt https://enrollment.sipthor.net/settings.phtml?action=get_identity |
32 | 1 | Adrian Georgescu | }}} |
33 | |||
34 | The following actions are supported: |
||
35 | |||
36 | 40 | Adrian Georgescu | 1. Return identity information: |
37 | 1 | Adrian Georgescu | {{{ |
38 | 41 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_identity |
39 | 1 | Adrian Georgescu | }}} |
40 | 1. Return the SIP aliases: |
||
41 | {{{ |
||
42 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_aliases |
43 | 1 | Adrian Georgescu | }}} |
44 | 1. Return the ENUM numbers: |
||
45 | {{{ |
||
46 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_enum |
47 | 1 | Adrian Georgescu | }}} |
48 | 42 | Adrian Georgescu | 1. Return the list of last calls: |
49 | 4 | Adrian Georgescu | {{{ |
50 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_calls |
51 | 4 | Adrian Georgescu | }}} |
52 | 30 | Adrian Georgescu | 1. Return the list of registered devices |
53 | {{{ |
||
54 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_devices |
55 | 30 | Adrian Georgescu | }}} |
56 | 40 | Adrian Georgescu | 1. Return the prepaid balance and active calls: |
57 | 1 | Adrian Georgescu | {{{ |
58 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_prepaid |
59 | 1 | Adrian Georgescu | }}} |
60 | 1. Return the history of prepaid balance: |
||
61 | {{{ |
||
62 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_balance_history |
63 | 1 | Adrian Georgescu | }}} |
64 | 1. Return the curent monthly usage: |
||
65 | {{{ |
||
66 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_monthly_usage |
67 | 1 | Adrian Georgescu | }}} |
68 | 42 | Adrian Georgescu | 1. Return the call forwarding settings: |
69 | 1 | Adrian Georgescu | {{{ |
70 | 40 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_call_forwarding |
71 | 1 | Adrian Georgescu | }}} |
72 | 1. Return the list of accept rules: |
||
73 | {{{ |
||
74 | 40 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_accept_rules |
75 | 1 | Adrian Georgescu | }}} |
76 | 1. Return the list of reject rules: |
||
77 | {{{ |
||
78 | 40 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_reject_rules |
79 | 1 | Adrian Georgescu | }}} |
80 | 1. Return the voicemail settings: |
||
81 | {{{ |
||
82 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_voicemail |
83 | 1 | Adrian Georgescu | }}} |
84 | 9 | Adrian Georgescu | 1. Enabled Do Not Disturb |
85 | {{{ |
||
86 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on |
87 | 9 | Adrian Georgescu | }}} |
88 | 1. Disable Do Not Disturb |
||
89 | {{{ |
||
90 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_dnd_off |
91 | 9 | Adrian Georgescu | }}} |
92 | 17 | Adrian Georgescu | 1. Enable Do Not Disturb for 60 minutes |
93 | 9 | Adrian Georgescu | {{{ |
94 | 33 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on&duration=60 |
95 | 9 | Adrian Georgescu | }}} |
96 | 10 | Adrian Georgescu | 1. Enabled privacy (hide Caller Id for outgoing calls) |
97 | {{{ |
||
98 | 33 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_privacy_on |
99 | 10 | Adrian Georgescu | }}} |
100 | 1. Disable privacy |
||
101 | {{{ |
||
102 | 33 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_privacy_off |
103 | 10 | Adrian Georgescu | }}} |
104 | 11 | Adrian Georgescu | 1. Add an alias to our own account |
105 | {{{ |
||
106 | 29 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=add_alias&username=alice |
107 | 11 | Adrian Georgescu | }}} |
108 | 42 | Adrian Georgescu | 1. Set call forwarding |
109 | 16 | Adrian Georgescu | {{{ |
110 | 40 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_call_forwarding&FUNC=target&FBUS=target&... |
111 | 16 | Adrian Georgescu | }}} |
112 | {{{ |
||
113 | FUNC = Forward unconditional all calls |
||
114 | FBUS = Forward on Busy |
||
115 | FNOL = Forward on Not Online |
||
116 | FNOA = Forward on No Answer |
||
117 | FUNV = Forward when Not Available based on Accept rules |
||
118 | 25 | Adrian Georgescu | |
119 | 27 | Adrian Georgescu | Pre-defined keywords for diversion targets: |
120 | 26 | Adrian Georgescu | |
121 | 24 | Adrian Georgescu | <voice-mailbox> |
122 | 25 | Adrian Georgescu | <mobile-number> |
123 | |||
124 | 24 | Adrian Georgescu | }}} |