Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free of charge calls #1835

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

wzrdtales
Copy link

Free of charge calls

We currently call this logic via an external webhook, but figured this may be interesting for everyone.

The idea is that outbound calls that are not lifted, are not charged (as it always has been since history). The important part is that the calling side is dropping the call, before it hits the mailbox. Combining this with all modern smartphones capability to set a different ringtone per number, improves the yearly call bill significantly.

Pull Request Checklist:

  • Please make sure all jobs pass before requesting a review.
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).
  • Have you lint your code locally before submission?
  • Did you write tests where appropriate?

Related Issue?

Screenshots (if appropriate):

Signed-off-by: Tobias Gurtzick <[email protected]>
@wzrdtales
Copy link
Author

See only this commit, 824a873

It seems your project is not yet working with automatically enforced code styles which is why my editor had to enforce them.

wzrdtales and others added 3 commits February 9, 2025 15:56
@simlarsen
Copy link
Contributor

simlarsen commented Feb 11, 2025

I dont think this is the right appraoch. Maybe run a cron job everyday to check the call status and refund the balance? You can create a job in the worker project. Maybe also create a new column - something like isPaymentFinalized (boolean) and you can tick that off in the cron.

Please let me know if this helps!

@wzrdtales
Copy link
Author

You didn't seem to understand the actual logic. This wont work, you can't refund balance.

This addition does not cause any costs, b/c the call never gets lifted. The problem is, that even if the participant doesn't lift, it will hit the mailbox. So the initiating side must drop the call themself to avoid that and get a completely free outbound call.

We use this massively already a long time and dropped costs down to sub 1% what we were consuming before we made that change.

@wzrdtales
Copy link
Author

I agree, this should be an optional option. But I don't know your codebase well enough and don't have the time to finish the change and make it configurable, so this is rather a suggestion than a full PR.

@wzrdtales
Copy link
Author

If interested to getting this in, this could be easily put behind a config var of course @simlarsen I hope you understood by my comment what this actually does.

@simlarsen
Copy link
Contributor

simlarsen commented Feb 27, 2025

Happy to put this in but this needs to be architected right.

@wzrdtales
Copy link
Author

Not much architecture here, this would simply need a toggle and eventually a configurable call drop timeout both as a setting on the frontend side, please be more concise, what are you missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants