0e75ca4
Strip lidb name
Stephen Paul Weber created
0e75ca4
Strip lidb name
Stephen Paul Weber created
c95d2db
Transaction Note Can Be Null
Not only is it allowed, but actually there's a ton of empty notes. Every monthly account activation is missing a note, so practically every user that has transactions will have empty notes.
Christopher Vollick created
0051c8e
Handle Empty Admin Menu Response
Some automated processes don't care for our menu, and rather than crashing it should just consider our process to be done.
Christopher Vollick created
e5759b3
Merge branch 'tx-list'
* tx-list: Admin Command Menu + Admin Financial View Transactions List Customer Financials Telephone Link
Stephen Paul Weber created
1c36e69
Admin Command Menu + Admin Financial View
I've added a new command to show financial information about the user. But more importantly I've added an infinite admin subsystem which allows me to go into a user and then run multiple commands on them. For now it's just these two info commands, but in the future I'd like to add mutative commands here. Finally, since I sometimes look up multiple users in a pretty short timeframe I made the menu open and if I put something into the list that doesn't parse as one of the actions it instead switches the current user so I don't have to do "cancel", "customer", and then put the next one in. I can just have the session open and put stuff in as needed.
Christopher Vollick created
6fb0be1
Transactions List
Using the new Financials object a user can list their transaction list We only show the user the date, amount, and method.
Christopher Vollick created
a5cf98a
Customer Financials
I've pulled out information about payment methods and bitcoin into its own thing. It's kind of a repository, except that it only exposes fetchers and doesn't load anything generally. There's also a few new methods here that aren't used yet, but will be shortly.
Christopher Vollick created
c668050
Telephone Link
Sometimes I need to go there to look something up or change a setting, and every time I do I have to navigate through the UI to a number I already know. This should make that faster.
Christopher Vollick created
e6fa970
Strip fwd value from form before saving
Stephen Paul Weber created
880e5e8
Someone legit hit the 4k limit
Stephen Paul Weber created
7c1ef85
Document new search option
Stephen Paul Weber created
92916f6
A legit user hit 3500. Wow
Stephen Paul Weber created
e30cf10
Merge branch 'state-search'
* state-search: Finish state search and add test Add state search - for granularity & jmp-register
Stephen Paul Weber created
a086018
Finish state search and add test
Stephen Paul Weber created
5fe4706
Add state search - for granularity & jmp-register
Note that this is not quite complete yet, since we need to pull in the STATE_MAP stuff used elsewhere to make it work properly. But it will at least work for every state/province/territory that is not Quebec for now, which is way better than nothing. Quebec users will get the same fallbacks they had before.
Denver Gingerich created
46147c4
Do not log error when hangup/voicemail a call that is already gone
Stephen Paul Weber created
12e2eef
Add customer_id to Sentry where relevant
Stephen Paul Weber created
492360c
Error from SGX should not result in an unregistered customer
If the SGX fetch fails, this is a problem. Even in the original case this was written for (registration) we have seen strange issues that can come up when the code assumes that an SGX error means they are unregistered. They may or may not be unregistered, and we simply don't know. So we should let the error bubble through and be handled (if possible) upstream.
Stephen Paul Weber created
2356e70
Use Transfer because Forward doesn't work once answered
Stephen Paul Weber created
63805c4
Sanity check that uri is possibly valid
Stephen Paul Weber created
23200e5
Transaction amounts are negative, but cdr charge is positive
Stephen Paul Weber created
bc55811
Schemas add default rate for customers with no plan
Stephen Paul Weber created
9d8e6b4
Pass customer_id through to leg2
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
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
For use from Asterisk
Stephen Paul Weber created
48adae1
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.
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
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
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
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
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
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
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