~singpolyma/sgx-jmp

ref: 32c97bb60fd0dd0297d001118fb1caac767cd3d4 sgx-jmp/lib/call_attempt_repo.rb -rw-r--r-- 1.4 KiB
Make sure from and to are in correct direction

Doesn't affect any current code paths, but should be correct in case we ever
start using it in the inbound case.

Also from does not have to be a formatted phone number, can be a string like
Anonymous, etc.
Try auto top up / low balance notify when not enough balance for a call

There is an edge case where a customer might not have auto-topped up yet but
they don't have enough balance for this call, so try to charge their card first
before telling them the call is a no go.
Also supports limits on inbound calls
Outbound call logic for overages

If cannot find an acceptable rate for the number, cannot call.
If balance is too low, cannot call.
If too close to limit, warn.
Else, call.