Command URIs¶
Overview¶
Cloud Softphone allows showing contents loaded from the web (one typical example is a custom tab which shows an embedded browser open with URL which you can specify). It is sometimes useful to pass some information from this embedded browser back to the app. This can be achieved by command URIs described below.
These URIs can be invoked from javascript as a reaction to some events, or simple links or buttons with these URLs can be created and the action will be performed when the user clicks on them.
The links can be functional only from within the embedded browser (this is the app scheme). They can be functional from system browser (this is via the cloudsip or similar scheme). They can be also functional as deep links (iOS) which prompt for app installation if app is not yet installed.
URIs¶
The call URIs have the following format:
app:command[?params]
If the URIs needs to be functional from outside of the application, the whole app URL needs to be urlencoded and passed via a registered scheme (like cloudsip or white-label specific scheme). It follows the following format:
scheme:?_cmd=urlencoded_app_url
scheme The default scheme for Cloud Softphone is cloudsip.
Note
For Cloud Softphone White-Label apps, you can configure any scheme you want in Cloud Softphone portal.
command The encoded URL of the command including possible parameters.
parameters These are command-specific and will be described below for each command.
Commands:¶
balance-update¶
Will generate an immediate balance check. This is useful when the user tops up inside the web browser and the balance should be updated as soon as possible.
The balance checking web service is documented in balance_checker article.
Parameters none
Example:
provisioning-update¶
Will trigger immediate re-provisioning. This is useful when user does some changes in his account settings and the new settings should be synced with the app as soon as possible.
Parameters none
Example:
extprov-update¶
Will trigger immediate re-provisioning only from the external provisioning URL (not trying to reprovision from the portal). This is useful when user does some changes in his account settings and the new settings should be synced with the app as soon as possible.
Parameters none
Example:
settings¶
Opens the settings screen on the main page.
Parameters none
Example:
settings/prefs¶
Opens the settings screen on the preferences page.
Parameters none
Example:
settings/topup¶
Opens the settings screen on the topup page. If the parameters are present, it will try to initiate the in-app purchase of the specified product. If the product ID starts with the application ID, you are allowed to omit the application ID prefix. If product_id is specified the app opens the detail page of the requested topup amount. If action=buy is specified it initiates the purchase automatically.
Parameters
Example:
app:settings/topup?action=buy&product_id=com.myapp.credit1
cloudsip:?_cmd=app%3Asettings%2Ftopup%3Faction%3Dbuy%26product_id%3Dcom.myapp.credit1
settings/addons¶
Opens the settings screen on the addons page. If the parameters are present, it will try to initiate the in-app purchase of the specified product. If the product ID starts with the application ID, you are allowed to omit the application ID prefix. If product_id is specified the app opens the detail page of the requested addon. If action=buy is specified it initiates the purchase automatically.
Parameters
Example:
app:settings/topup?action=buy&product_id=com.myapp.credit1
cloudsip:?_cmd=app%3Asettings%2Ftopup%3Faction%3Dbuy%26product_id%3Dcom.myapp.credit1
qd¶
Opens the quick dial tab.
Parameters none
Example:
history¶
Opens the history tab.
Parameters none
Example:
keypad¶
Opens the keypad tab.
Parameters none
Example:
messages¶
Opens the messages tab.
Parameters none
Example:
contacts¶
Opens the contacts tab.
Parameters none
Example:
browser¶
Opens the browser tab.
Parameters none
Example: