Commit log

9d8e6b4 Pass customer_id through to leg2

Click to expand commit body
The to in leg2 is not the phone number, but the fwd, which is not useful for
looking up customer.

Stephen Paul Weber created

32c97bb Make sure from and to are in correct direction

Click to expand commit body
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.

Stephen Paul Weber created

4955f61 Pull in cdr_with_charge performance fix

Stephen Paul Weber created

74d81c6 Billing starts now

Stephen Paul Weber created

a20669a Load plans to db

Stephen Paul Weber created

945b17d We rely on this schema now

Stephen Paul Weber created

54d425b JSON route for outbound calls

Click to expand commit body
For use from Asterisk

Stephen Paul Weber created

48adae1 Try auto top up / low balance notify when not enough balance for a call

Click to expand commit body
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.

Stephen Paul Weber created

310c487 LowBalance returns amount added, if any

Stephen Paul Weber created

3e70351 Also supports limits on inbound calls

Stephen Paul Weber created

11ac679 Outbound call logic for overages

Click to expand commit body
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.

Stephen Paul Weber created

b69dfac Add customer_id to outgoing call JSON

Stephen Paul Weber created

5f9d175 Support JSON route pre-limits

Click to expand commit body
This will allow us to switch asterisk to the new logic before rolling out the
limits.  Asterisk will then support the limits once sgx-jmp begins instructing
it about them.

Stephen Paul Weber created

4fca4ab Typo

Stephen Paul Weber created

d232a3f CustomerRepo::QueryKey and CustomerRepo#find_by_format

Click to expand commit body
Introduce objects representing the different kind of query keys that can be used
to look up a customer.  These keys know how to use themselves to get
the (customer_id, jid) pair that is needed for an actual repo lookup.  All
find_by_* methods are now just trivial wrappers over these objects that pass on
to find_inner.

This enables the easy creation of a new helper: QueryKey.for, used as
find_by_format which allows passing an xmpp: URI, or a properly formatted tel,
or a customer id, and will find by the correct one.  This could cause a problem
if a customer id were to be a valid xmpp: URI or a formatted tel, so this method
does assume not using these formats for any customer id (which would be
ill-advised in any case).

Stephen Paul Weber created

b3262f4 End call on hangup

Stephen Paul Weber created

bc03f1e approved_domains unproxied

Stephen Paul Weber created

c3da8bd Fix typo, add test

Stephen Paul Weber created

976b77e Sometimes we get a list of errors, such as to LNP

Stephen Paul Weber created

f529c81 Block messages over 3500/month

Click to expand commit body
Generic error message to contact support.  No current customer will hit this
limit based on historical usage.

Stephen Paul Weber created

7d817d2 Only notify over 900

Click to expand commit body
We've started getting lax about vetting the warnings because there are too many.
Raise the threshold for a warning.

Stephen Paul Weber created

9b5a63f Remove dead (and broken) sentry panic

Stephen Paul Weber created

cea1bbe Initial tests for web routes

Stephen Paul Weber created

0874c1b Allow injecting a customer repo into Web

Stephen Paul Weber created

236df82 Split out IBRRepo

Stephen Paul Weber created

4b11837 Refactor web-register to use lib/command

Stephen Paul Weber created

4251960 Fix CNAM creation

Stephen Paul Weber created

e8aeceb Handle Null TNDetails

Click to expand commit body
This is based on a hotfix in prod. In this case someone appeared to have
talked to an @jmp.chat address directly. In normal circumstances this
shouldn't happen, but it's not technically disallowed, so we probably
shouldn't just crash.

Christopher Vollick created

27b1e9b Make wording more verbose

Click to expand commit body
In case you've been living under a rock and don't know what an eTransfer is.

Stephen Paul Weber created

f1eac48 Fallback should actually happen

Click to expand commit body
This is certainly an accidental holdover from the original code, and was making
voicemail from anon not work at all.

Stephen Paul Weber created

3ec7820 Typo

Stephen Paul Weber created

653ad29 Do not deliver transcription if voicemail is less than 5 seconds

Click to expand commit body
Will suppress bogus messages transcribed from silence or a click, and in
general getting a transciption without getting a recording is just odd.  If we
decided the recording is not worth sending, the transcript certainly isn't.

Stephen Paul Weber created

2f58ccc Return exact matches only

Click to expand commit body
By default bandwidth includes numbers in the "local calling area" of a search.
This is confusing, so change it to include only actual matches.

Stephen Paul Weber created

229ba3e Form to configure monthly overage limit

Stephen Paul Weber created

55aac0f Represent plan limit details as a useful object

Stephen Paul Weber created

386d990 put_monthly_overage_limit

Stephen Paul Weber created

319b27a Use default from Customer constructor

Stephen Paul Weber created

b85c697 Everything from redis is an int for now

Stephen Paul Weber created

a6e2ad2 Need to splat the keys back out

Stephen Paul Weber created

c2940b0 Default to 0, even if constructed with nil

Stephen Paul Weber created

6723ac3 Merge branch 'overage-limit'

Click to expand commit body
* overage-limit:
  auto_top_up_amount and monthly_overage_limit from CustomerRepo
  Move Bandwidth Tn remote operations to BandwidthTnRepo
  Use value_semantics to DRY up CustomerRepo
  Use NotFound exception for all customer not found cases

Stephen Paul Weber created

0ef60a2 auto_top_up_amount and monthly_overage_limit from CustomerRepo

Click to expand commit body
Move load of auto_top_up_amount to the repo, and load monthly_overage_limit in
the same operation.

Stephen Paul Weber created

d8cb419 Move Bandwidth Tn remote operations to BandwidthTnRepo

Stephen Paul Weber created

e839e44 Use value_semantics to DRY up CustomerRepo

Stephen Paul Weber created

110a040 Use NotFound exception for all customer not found cases

Stephen Paul Weber created

3748400 Merge branch 'nuke-legacy-customers'

Click to expand commit body
* nuke-legacy-customers:
  Remove LegacyCustomer

Stephen Paul Weber created

cd02cc3 Remove LegacyCustomer

Click to expand commit body
Such customers are not longer a common or valid case.

Stephen Paul Weber created

c7c4866 Customer Info Forms and More Info

Click to expand commit body
There's a bit extra info I wanted about users, so since I was doing this
anyway I figured I may as well port the existing forms to the new form
renderer.

Then, in order to fit within the guidelines I needed subforms, so
partials were added.

Christopher Vollick created

6d7c013 Fix Transcription Settings Typo

Click to expand commit body
We were setting in one property but reading from another very similar
property...

Christopher Vollick created

08049e9 Use disposition=VOICEMAIL for calls that went to voicemail

Stephen Paul Weber created