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