Match a number with account minute plans
Цей контент ще не доступний вашою мовою.
matchAccountMinutePlan checks a called number (CLD) against the minute plans of an account and returns the plans that cover it. Use it to tell a user before a call whether the call uses included minutes. The panel’s Test Dialplan uses it to show the minute plan of a test call.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
i_account |
int | yes | ID of the account |
cld |
string | yes | Called number to check, for example 447700900123 |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
service_plans |
array | One struct per matching minute plan, see below. Several plans can cover the same number; the seconds available are their sum |
Each struct in service_plans:
| Name | Type | Description |
|---|---|---|
i_service_plan |
int | ID of the minute plan |
seconds_total |
int | Seconds included in the plan. -1 = unlimited |
seconds_left |
int | Seconds left in the current period. -1 = unlimited |
Example
Section titled “Example”call("matchAccountMinutePlan", {"i_account": 3092, "cld": "447700900123"}){ "result": "OK", "service_plans": [ {"i_service_plan": 17, "seconds_total": 30000, "seconds_left": 21420}, ],}Errors
Section titled “Errors”| faultCode | Cause |
|---|---|
410 |
No minute plan of the account covers the number. The call is charged at the tariff rate |