SipSettingsApi
Version 4 (Adrian Georgescu, 09/23/2009 02:40 pm)
1 | 1 | Adrian Georgescu | = SIP Settings API = |
---|---|---|---|
2 | 1 | Adrian Georgescu | |
3 | 1 | Adrian Georgescu | [[TOC(WikiStart, Sip*, depth=3)]] |
4 | 1 | Adrian Georgescu | |
5 | 1 | Adrian Georgescu | Is possible read and write various SIP account settings by making one shot HTTP requests. When you access the SIP settings page the server prompts for the SIP account credentials which are then associated with a web session. To perform one shot HTTP requests to access this API you must use a client X.509 certificate to authorize the request, there is no long lived session. |
6 | 1 | Adrian Georgescu | |
7 | 1 | Adrian Georgescu | == API address == |
8 | 1 | Adrian Georgescu | |
9 | 1 | Adrian Georgescu | To access the API the HTTP client must connect to the following address: |
10 | 1 | Adrian Georgescu | |
11 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml |
12 | 1 | Adrian Georgescu | |
13 | 1 | Adrian Georgescu | == Client Certificate == |
14 | 1 | Adrian Georgescu | |
15 | 1 | Adrian Georgescu | Use the web settings page and navigate to Info tab. Download the certificate in the format supported by your HTTP client. |
16 | 1 | Adrian Georgescu | |
17 | 1 | Adrian Georgescu | * user@domain.crt format can be use by command line tools like curl |
18 | 2 | Adrian Georgescu | * user@domain.p12 format contains the same client 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 |
19 | 1 | Adrian Georgescu | |
20 | 1 | Adrian Georgescu | == API calls == |
21 | 1 | Adrian Georgescu | |
22 | 1 | Adrian Georgescu | You can test all API commands by using the '''curl''' command line utility as follows: |
23 | 1 | Adrian Georgescu | |
24 | 1 | Adrian Georgescu | {{{ |
25 | 3 | Adrian Georgescu | curl -k -E user@domain.crt https://blink.sipthor.net/settings.phtml?export=1&action=name |
26 | 1 | Adrian Georgescu | }}} |
27 | 3 | Adrian Georgescu | |
28 | 3 | Adrian Georgescu | The following actions are supported: |
29 | 1 | Adrian Georgescu | |
30 | 1 | Adrian Georgescu | 1. Return the account information: |
31 | 1 | Adrian Georgescu | {{{ |
32 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=enum |
33 | 1 | Adrian Georgescu | }}} |
34 | 1 | Adrian Georgescu | 1. Return the SIP aliases: |
35 | 1 | Adrian Georgescu | {{{ |
36 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=aliases |
37 | 1 | Adrian Georgescu | }}} |
38 | 1 | Adrian Georgescu | 1. Return the ENUM numbers: |
39 | 1 | Adrian Georgescu | {{{ |
40 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=enum |
41 | 1 | Adrian Georgescu | }}} |
42 | 4 | Adrian Georgescu | 1. Return the last incoming and outgoing calls: |
43 | 4 | Adrian Georgescu | {{{ |
44 | 4 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=calls |
45 | 4 | Adrian Georgescu | }}} |
46 | 1 | Adrian Georgescu | 1. Return the prepaid balance and active prepaid calls: |
47 | 1 | Adrian Georgescu | {{{ |
48 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=prepaid |
49 | 1 | Adrian Georgescu | }}} |
50 | 1 | Adrian Georgescu | 1. Return the history of prepaid balance: |
51 | 1 | Adrian Georgescu | {{{ |
52 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=balance_history |
53 | 1 | Adrian Georgescu | }}} |
54 | 1 | Adrian Georgescu | 1. Return the curent monthly usage: |
55 | 1 | Adrian Georgescu | {{{ |
56 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=monthly_usage |
57 | 1 | Adrian Georgescu | }}} |
58 | 1 | Adrian Georgescu | 1. Return the list of diversions: |
59 | 1 | Adrian Georgescu | {{{ |
60 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=diversions |
61 | 1 | Adrian Georgescu | }}} |
62 | 1 | Adrian Georgescu | 1. Return the list of accept rules: |
63 | 1 | Adrian Georgescu | {{{ |
64 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=rules |
65 | 1 | Adrian Georgescu | }}} |
66 | 1 | Adrian Georgescu | 1. Return the list of reject rules: |
67 | 1 | Adrian Georgescu | {{{ |
68 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=reject |
69 | 1 | Adrian Georgescu | }}} |
70 | 1 | Adrian Georgescu | 1. Return the voicemail settings: |
71 | 1 | Adrian Georgescu | {{{ |
72 | 1 | Adrian Georgescu | https://blink.sipthor.net/settings.phtml?export=1&action=voicemail |
73 | 1 | Adrian Georgescu | }}} |