SipSettingsApi
Version 44 (Adrian Georgescu, 07/13/2011 09:04 am)
1 | 38 | Adrian Georgescu | = Settings API = |
---|---|---|---|
2 | 1 | Adrian Georgescu | |
3 | 1 | Adrian Georgescu | [[TOC(WikiStart, Sip*, depth=3)]] |
4 | 1 | Adrian Georgescu | |
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 | 39 | Adrian Georgescu | |
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 | 23 | Adrian Georgescu | |
17 | 22 | Adrian Georgescu | == TLS Certificate == |
18 | 1 | Adrian Georgescu | |
19 | 43 | Adrian Georgescu | Use the web settings page and navigate to the '''Identity''' 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 | 14 | Adrian Georgescu | * !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 | 1 | Adrian Georgescu | |
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 | 35 | Adrian Georgescu | |
30 | 3 | Adrian Georgescu | {{{ |
31 | 44 | Adrian Georgescu | curl https://enrollment.sipthor.net/settings.phtml?action=get_identity |
32 | 1 | Adrian Georgescu | }}} |
33 | 1 | Adrian Georgescu | |
34 | 1 | Adrian Georgescu | The following actions are supported: |
35 | 1 | Adrian Georgescu | |
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 | Adrian Georgescu | 1. Return the SIP aliases: |
41 | 1 | Adrian Georgescu | {{{ |
42 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_aliases |
43 | 1 | Adrian Georgescu | }}} |
44 | 1 | Adrian Georgescu | 1. Return the ENUM numbers: |
45 | 1 | Adrian Georgescu | {{{ |
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 | 30 | Adrian Georgescu | {{{ |
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 | Adrian Georgescu | 1. Return the history of prepaid balance: |
61 | 1 | Adrian Georgescu | {{{ |
62 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_balance_history |
63 | 1 | Adrian Georgescu | }}} |
64 | 1 | Adrian Georgescu | 1. Return the curent monthly usage: |
65 | 1 | Adrian Georgescu | {{{ |
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 | Adrian Georgescu | 1. Return the list of accept rules: |
73 | 1 | Adrian Georgescu | {{{ |
74 | 40 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_accept_rules |
75 | 1 | Adrian Georgescu | }}} |
76 | 1 | Adrian Georgescu | 1. Return the list of reject rules: |
77 | 1 | Adrian Georgescu | {{{ |
78 | 40 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=get_reject_rules |
79 | 1 | Adrian Georgescu | }}} |
80 | 1 | Adrian Georgescu | 1. Return the voicemail settings: |
81 | 1 | Adrian Georgescu | {{{ |
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 | 9 | Adrian Georgescu | {{{ |
86 | 32 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on |
87 | 9 | Adrian Georgescu | }}} |
88 | 9 | Adrian Georgescu | 1. Disable Do Not Disturb |
89 | 9 | Adrian Georgescu | {{{ |
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 | 10 | Adrian Georgescu | {{{ |
98 | 33 | Adrian Georgescu | https://enrollment.sipthor.net/settings.phtml?action=set_privacy_on |
99 | 10 | Adrian Georgescu | }}} |
100 | 10 | Adrian Georgescu | 1. Disable privacy |
101 | 10 | Adrian Georgescu | {{{ |
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 | 11 | Adrian Georgescu | {{{ |
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 | 16 | Adrian Georgescu | {{{ |
113 | 16 | Adrian Georgescu | FUNC = Forward unconditional all calls |
114 | 16 | Adrian Georgescu | FBUS = Forward on Busy |
115 | 16 | Adrian Georgescu | FNOL = Forward on Not Online |
116 | 16 | Adrian Georgescu | FNOA = Forward on No Answer |
117 | 16 | Adrian Georgescu | 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 | 25 | Adrian Georgescu | |
124 | 24 | Adrian Georgescu | }}} |