Regression: If Asterisk suddenly goes down, server has no way to know. Causes server to get stuck. Needs restart #24624
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes (including videos or screenshots)
This PR implements a connection retries in case the asterisk connection dies for some reason.
It does 5 retries with backoff options. The retries will not be done for connectivity check.
Once the retries are exhausted, and server comes up, there is no way to connect back but to restart
the voip service. This works only for management connection. Call Server connection, if dies, there are no
retries.
Issue(s)
https://app.clickup.com/t/22qmrw3
Steps to test or reproduce
APIs get stuck as server does not check if the socket is up while running a command.
After this PR is merged, server will return error if the connection is dead. It will also retry to connect after detecting disconnection
Further comments