Setting Up Your Own Balance Check Web Service

For some providers balance check service is already hardcoded in the app. For those providers that are not covered or if you want to override the hardcoded setup you need to set up your own web service.

Go to the Settings > SIP Accounts > Edit Account > Advanced Settings > Web Services 

Note: This is where to enter the url in Acrobits Softphone and Groundwire, for Cloud Softphone the provider will enter the url in the provisioning options in the Cloud Softphone Web portal.  Otherwise the directions are the same.

Enter the URL to your web service in Custom Balance Checker section. Only supported method is GET at the moment

You may need to use dynamic account specific parameters. For example %account[username]% will be replaced by the actual username. Or %account[password]% will be replaced by the actual password. One thing to note here is that the password will be passed only if the URL begins with https://, otherwise only couple of stars will be used which won't work obviously. You can also pass sha1 hash of your password istead. It can be achieved by %sha1(%account[password]%)%

Example URL for web callback using GET might be:

https://my.web.com/balance.php?u=%account[username]%&p=%account[password]%

or in case of insecure protocol

http://my.web.com/balance.php?u=%account[username]%&p=%sha1(%account[password]%)%

The return format for the balance checker is a simple XML

<response>

   <error>0</error>

   <balanceString>$60.20</balanceString>

</response>

$60.20 will be displayed as the balance