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

[FIX] VoIP disabled/enabled sequence puts voip agent in error state #25230

Merged
merged 3 commits into from
Apr 20, 2022

Commits on Apr 19, 2022

  1. Clickup Task: https://app.clickup.com/t/22rjza5

    Description:
    The issue occurs because when client turns on VoIP, server starts the connector in
    apps/meteor/app/voip/server/startup.ts. While the AMI connection is not established, client makes
    a call to API api/v1/connector.extension.getRegistrationInfoByUserId?id=<userId>.
    This requires the connection to be up. But because the connection establishment is not yet complete, apps/meteor/server/services/voip/connector/asterisk/CommandHandler.ts thrown an error.
    
    Solution :
    In apps/meteor/app/voip/server/startup.ts add await for Voip.init().
    Once the init is done (Which internally waits for socket establishment), broadcast connector.statuschanged with the setting value (Enabled = true/false)
    In apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts make voipEnabled as a setting. And change it in the event listener for voip.statuschanged
    amolghode1981 committed Apr 19, 2022
    Configuration menu
    Copy the full SHA
    84bbe74 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f17aa8a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6cac7f0 View commit details
    Browse the repository at this point in the history