wiki:Administrators/BalanceDisplay

Balance Display for softphones and dialers

(since version 2.1.0)

This document describes http method for balance request which can be used in softphones or other devices.

The methods previously available in versions 1.x are not available in versions 2.x as of version 2.1.0

Currently following methods are available:

Simple balance request

Request URI:

http://host/balance/<method>/<format>/<alias>/<password>

method:

balance inquiry method, possible values:

  • 1 - simple, only user account ID (alias)
  • 2 - standard, user account ID (alias) + password

format:

return format

  • 1 - text, numeric available balance (balance + credit limit) , decimal point
  • 2 - text, numeric real balance , decimal point (since version 2.3.0)
  • 3 - XML, numeric available balance , decimal point (since version 2.3.0, since 2.2.4)
  • 4 - XML, numeric real balance , decimal point (since version 2.3.0)

alias:

  • account name or alias

example with password, text return:

http://localhost/billing/balance/1/1/777000999

example without password (not recommended), text return:

http://localhost/billing/balance/2/1/777000999/passw1234

Error handling

Error message format:

##ErrorCode=<code>;

List of Error Codes:

  • 1001 - Account Not Found
  • 1002 - Missing attribute
  • 1003 - Account configuration error
  • 1004 - Unsupported Method
  • 1005 - Unsupported Format

Example:

##ErrorCode=1001;
Last modified 5 years ago Last modified on Oct 10, 2012, 7:25:55 PM