|
Balance display for HS Teliann IP phones |
The description below outlines what needs to be done to implement Get Account Balance from Arrow Telecom's Arrow Billing on IP Phone or other device.
Querying the server:
It follows the standard HTTP protocol, just like what you do to browse the internet, additionally passes string containing request parameters and key used as checksum to verify validity of received request. The query procedure is as follows: - Open a socket connection to the IP address as aforementioned
- Send in the encrypted parameters in the format as stated in the docs
- Read the output from server and do necessary parsing.
Input format: GET http://hostname[:port]/billing/balance.php?attr1=value1[&attr2=value2][&site=name] [&format=name]\n
Description of properties: - hostname - Hostname or IP address of Arrow Telecom's Arrow Billing
- port - IP port, default 8000 (443 for secure HTTPS)
- site - optional attribute for multisite Arrow Billing installations. User selectable. Not specified by default
- format - optional attribute, specifying format of returned attributes. Default = 1. See description below.
Description of attributes:
attr1, attr2 - Attributes, one of following combinations: - Protocol: H.323, Authentication by H.323 ID + E.164 number:
attr1 = uid - H.323 I attr2 = e164num - E.164 number (or one of numbers if more exist for account) - Protocol: H.323, Authentication by H.323 ID + Password:
attr1 = uid - H.323 ID attr2 = passwd - Password of account - Protocol: H.323 or SIP, Authentication by PIN only:
attr1 = uid - PIN of the account - Protocol: SIP, Authentication by User ID + Password:
attr1 = uid - User ID arrt2 = passwd - Password for account Format of values: - site - Alphanumeric (small and capital letters, numbers) and underscore symbol ( _ ), maximum 20 characters long;
- uid - Alphanumeric (small and capital letters, numbers) and following special symbols (_ @), maximum 20 characters long;
- e164num - Numeric only, maximum 20 characters long;
- passwd - Alphanumeric (small and capital letters, numbers) and following special symbols (_ @), maximum 20 characters long;
Order of Attributes: - Order of Attributes is not important
Returned Attributes: - InitBalance - Initial (starting balance of Account)
- Balance - cuurent balance of account
- CurrencyCode - currency code, according to Appendix A
- CurrencyName - currency name, abbreviated, according to Appendix A
Return format:
Return format could be modified by supplying "format" attribute. Following formats are currently supported: format=1: Return: CurrencyCode=x|InitBalance=xxx.xx|Balance=xxx.xx format=2: Return: CurrencyName=XXX|InitBalance=xxx.xx|Balance=xxx.xx format=3: Return: XXX YYY.YY XXX - cuurency name YYY.YY - balance format=4: Return: YYY.YY YYY.YY - balance
Error Format: Error codes according to Appendix B. Appendix ACurrency Codes: - 1 - RMD
- 2 - USD
- 3 - YEN
- 4 - INR
- 5 - GBP
- 6 - EUR
- 7 - CAD
Appendix BError Codes - 102 - NO PERMISSION
- 103 - DATABASE ERROR - Can not prepare
- 104 - DATABASE ERROR - Can not open cursor
- 105 - INTERNAL ERROR
- 106 - NO RETURN
- 107 - INFORMATION UNAVAILABLE
- 108 - DATABASE ERROR - Can not connect to DB
- 110 - MISSING ATTRIBUTE
- 1001 - ACCOUNT NOT FOUND
|
|
|