Skip to content

Max session duration

A call may last only as long as the caller can pay for it. FlySIP does not reserve the whole balance when a call starts. It reserves money for a first portion of the call and extends the reservation while the call runs. This lets a wholesale account with a modest balance carry many simultaneous calls without ever spending more than it has.

  1. The call is authorized. The switch checks that the account and every customer above it can pay for at least the first interval of the call. See Rating and billing.
  2. A first portion is reserved. The switch blocks the price of a first period on the balance and sets the session timeout of the call to the end of that period.
  3. The reservation is extended. About five seconds before the session timeout, the switch tries to reserve the next period. If it succeeds, the session timeout moves forward.
  4. The call ends. When the next reservation fails because the money is used up, or the call reaches Max Credit Time (sec) of the account, the timeout is not extended and the switch releases the call when it expires. After the call the reserved amount is replaced by the real cost.

Each reserved period is rounded up to whole billing intervals of the rate, so the switch reserves slightly more than it asked for. Money reserved by a running call is not available to other calls of the same account until the call ends.

Balance Allocation Alg. in System Management → System Parameters → Billing chooses the size of the reserved periods for the whole environment:

Algorithm Periods
Incremental (default) Starts with 10 seconds and doubles the period with each extension, up to 200 seconds or the tariff’s Avg. Call Duration, sec, whichever is longer. From then on every extension has that length
ACD Every period equals the tariff’s Avg. Call Duration, sec

Incremental ties up little money in calls that end quickly, which suits short call-centre traffic. ACD makes fewer reservations per call but blocks a full average call for every call from the first second.

Screenshot "concepts/system-parameters-billing" has not been generated yet — see scripts/screenshots/screens.yml.

A rate with Interval 1 10, Interval N 15, Price 1 6.00 and Price N 4.00 per minute, and Avg. Call Duration, sec 230 on the tariff.

Incremental:

Time after connect Requested Reserved New session timeout Total reserved
0 s 10 s 10 s 10 s 1.00
5 s 20 s 30 s 40 s 3.00
35 s 40 s 45 s 85 s 6.00
80 s 80 s 90 s 175 s 12.00
170 s 160 s 165 s 340 s 23.00
335 s 230 s 240 s 580 s 39.00
575 s 230 s 240 s 820 s 55.00

ACD with Avg. Call Duration, sec 140:

Time after connect Requested Reserved New session timeout Total reserved
0 s 140 s 145 s 145 s 10.00
140 s 140 s 150 s 295 s 20.00
290 s 140 s 150 s 445 s 30.00
  • Balance — current amount of money on a customer or account. Negative values mean debt within the credit limit.
  • Credit limit — maximum allowed debt. When balance goes below the negative credit limit, calls are blocked.
  • Prepaid — a billing mode where the customer pays in advance and calls are blocked at zero balance.
  • Billing increment — the interval in seconds (e.g. 60/1, 1/1, 30/6) used to round call duration when rating.
  • ACD — average call duration of answered calls.

That is Max Credit Time (sec) of the account, 3600 by default. Raise it on the account, or set Max Session Time on the account class for new accounts. Calls with a free or very cheap rate are limited by this value alone.

A prepaid account cannot make a second call while the first one runs

Section titled “A prepaid account cannot make a second call while the first one runs”

The first call holds a reservation. With ACD and a high Avg. Call Duration, sec, one call can reserve most of a small balance. Switch to Incremental, lower the tariff’s Avg. Call Duration, sec, or top up the account.

Calls drop although the balance is positive

Section titled “Calls drop although the balance is positive”

The balance left is smaller than the next period plus the reservations of the account’s other calls. The call ends at its session timeout even though some money remains; the remainder is too small for another period.