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

Gracefully shutting down or restarting SIP server #116

Open
yallxe opened this issue Aug 6, 2024 · 1 comment
Open

Gracefully shutting down or restarting SIP server #116

yallxe opened this issue Aug 6, 2024 · 1 comment

Comments

@yallxe
Copy link

yallxe commented Aug 6, 2024

In sipgo, what is the way to perform a proper restart of a SIP server? The problem I'm focusing is basically whenever I restart my service, there might be some in-progress transactions that I would prefer to finish before shutting down. I also don't want any new transactions to start during the shutdown process, because obviously how do I shutdown then.

The solution I came up to this moment is having a mutex that would be locked whenever there is a SIGTERM (or whatever signal ctrl+c triggers), and on an incoming request just return and destroy the transaction.

However not only it sounds like a terrible idea, but also I'm not sure how to wait until no active transactions are left.

Thank you very much for the library, would be glad to receive some help.

@emiago
Copy link
Owner

emiago commented Aug 7, 2024

It is not implemented, but you can close all transactions from TransactionLayer, and just have some server handler tracking. You may want todo extra for Call Sessions

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

No branches or pull requests

2 participants