Where each side is settled
Price — at ingress
Per inbound
submit_sm. Depends only on the customer’s tariff — account, product, destination —
never on which vendor is eventually chosen.Cost — at the vendor
Once a route is chosen and the body is split, because only then is the segment count known.
The rate table
Rates use the routing grammar with the amount where routing puts the target:[scope] is either a vendor instance name — what that vendor charges you — or an account id
— what you charge that customer. Rules are evaluated top to bottom and the first match wins, so a
catch-all belongs last.
Attributes and operators are the routing engine’s, so anything you can route on you can rate on,
including product and systemId. Combine conditions with ~~ in all three positions.
The default that everyone should set
[*] prices any account with no rule of its own:
* is reserved: no account or vendor may be named it.
Unknown is not zero
A rule that matches nothing leaves the amount unknown, never zero. Zero is a real price meaning free, and an unknown side makes the margin unknown rather than wrong. This distinction is why an unpriced vendor shows as a gap in a margin report rather than as 100% profit.Precision
Amounts carry at most four decimal places and are parsed exactly, never through floating point. An amount with more precision is rejected rather than truncated — truncating0.00001 to zero
silently gives traffic away.
smsg.money.scale (0–4, default 4) controls how many places a total is displayed with.
India uses 2.
Storage never changes: amounts are integers of ten-thousandths. The setting is presentation only and
can be changed at any time.
Least-cost routing
A table marked->function(LCR) picks the cheapest vendor rather than the first matching rule:
- Vendors that are down or not accepting are skipped, so the next cheapest carries the traffic.
- A vendor with no matching rate is used only if nothing else matches — a forgotten rate line degrades rather than causing an outage.
- Rules pointing at another table are ignored inside an LCR table: a nested cost cannot be compared, and routing at an unknown price would be worse.
Related
Tariffs
Editing rates from the panel, and per-account overrides.
Call records
Where both sides of the trade are recorded.