SipSettingsApi » History » Version 20
Adrian Georgescu, 09/25/2009 09:02 PM
1 | 1 | Adrian Georgescu | = SIP Settings API = |
---|---|---|---|
2 | |||
3 | [[TOC(WikiStart, Sip*, depth=3)]] |
||
4 | |||
5 | == API address == |
||
6 | |||
7 | 20 | Adrian Georgescu | To access the API, a client must connect using HTTP protocol to the following address: |
8 | 1 | Adrian Georgescu | |
9 | https://blink.sipthor.net/settings.phtml |
||
10 | 19 | Adrian Georgescu | |
11 | 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. |
12 | 1 | Adrian Georgescu | |
13 | == Client Certificate == |
||
14 | |||
15 | 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. |
16 | 1 | Adrian Georgescu | |
17 | 14 | Adrian Georgescu | * !user@domain.crt format can be use by command line tools like curl |
18 | * !user@domain.p12 format can be imported in web browsers |
||
19 | 5 | Adrian Georgescu | |
20 | 7 | 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. |
21 | 1 | Adrian Georgescu | |
22 | == API calls == |
||
23 | |||
24 | You can test all API commands by using the '''curl''' command line utility as follows: |
||
25 | |||
26 | {{{ |
||
27 | 15 | Adrian Georgescu | curl -k -E user@domain.crt https://blink.sipthor.net/settings.phtml?action=name |
28 | 1 | Adrian Georgescu | }}} |
29 | 3 | Adrian Georgescu | |
30 | The following actions are supported: |
||
31 | 1 | Adrian Georgescu | |
32 | 1. Return the account information: |
||
33 | {{{ |
||
34 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=enum |
35 | 1 | Adrian Georgescu | }}} |
36 | 1. Return the SIP aliases: |
||
37 | {{{ |
||
38 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=aliases |
39 | 1 | Adrian Georgescu | }}} |
40 | 1. Return the ENUM numbers: |
||
41 | {{{ |
||
42 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=enum |
43 | 1 | Adrian Georgescu | }}} |
44 | 4 | Adrian Georgescu | 1. Return the last incoming and outgoing calls: |
45 | {{{ |
||
46 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=calls |
47 | 4 | Adrian Georgescu | }}} |
48 | 1 | Adrian Georgescu | 1. Return the prepaid balance and active prepaid calls: |
49 | {{{ |
||
50 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=prepaid |
51 | 1 | Adrian Georgescu | }}} |
52 | 1. Return the history of prepaid balance: |
||
53 | {{{ |
||
54 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=balance_history |
55 | 1 | Adrian Georgescu | }}} |
56 | 1. Return the curent monthly usage: |
||
57 | {{{ |
||
58 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=monthly_usage |
59 | 1 | Adrian Georgescu | }}} |
60 | 1. Return the list of diversions: |
||
61 | {{{ |
||
62 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=diversions |
63 | 1 | Adrian Georgescu | }}} |
64 | 1. Return the list of accept rules: |
||
65 | {{{ |
||
66 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=accept |
67 | 1 | Adrian Georgescu | }}} |
68 | 1. Return the list of reject rules: |
||
69 | {{{ |
||
70 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=reject |
71 | 1 | Adrian Georgescu | }}} |
72 | 1. Return the voicemail settings: |
||
73 | {{{ |
||
74 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=voicemail |
75 | 1 | Adrian Georgescu | }}} |
76 | 9 | Adrian Georgescu | 1. Enabled Do Not Disturb |
77 | {{{ |
||
78 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=dnd_on |
79 | 9 | Adrian Georgescu | }}} |
80 | 1. Disable Do Not Disturb |
||
81 | {{{ |
||
82 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=dnd_off |
83 | 9 | Adrian Georgescu | }}} |
84 | 17 | Adrian Georgescu | 1. Enable Do Not Disturb for 60 minutes |
85 | 9 | Adrian Georgescu | {{{ |
86 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=dnd_on&duration=60 |
87 | 9 | Adrian Georgescu | }}} |
88 | 10 | Adrian Georgescu | 1. Enabled privacy (hide Caller Id for outgoing calls) |
89 | {{{ |
||
90 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=privacy_on |
91 | 10 | Adrian Georgescu | }}} |
92 | 1. Disable privacy |
||
93 | {{{ |
||
94 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=privacy_off |
95 | 10 | Adrian Georgescu | }}} |
96 | 11 | Adrian Georgescu | 1. Add an alias to our own account |
97 | {{{ |
||
98 | 15 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?action=add_alias&username=alice |
99 | 11 | Adrian Georgescu | }}} |
100 | 16 | Adrian Georgescu | 1. Set diversions |
101 | {{{ |
||
102 | https://blink.sipthor.net/settings.phtml?action=set_diversions&FUNC=target&FBUS=target&FNOL=target&FNOA=target&FUNV=target |
||
103 | }}} |
||
104 | {{{ |
||
105 | FUNC = Forward unconditional all calls |
||
106 | FBUS = Forward on Busy |
||
107 | FNOL = Forward on Not Online |
||
108 | FNOA = Forward on No Answer |
||
109 | FUNV = Forward when Not Available based on Accept rules |
||
110 | }}} |