Mute all users in a channel

Use the following parameters to mute all users in a channel when you call viv_chan_cmd.php:

  • access_token - The access token with specified claims for this action

  • auth_token - The token that viv_signin.php returns

    Note: The Control active channels API can use the auth_token parameter in place of the userid and pwd parameters. For more information, see Login API.

  • chan_uri - the channel's URI

  • mode - Use mute_all for this action

  • scope - Optionally specify audio, text, or both. The default is audio.

The following example displays how to mute all users in a channel when using an auth_token.

  • Domain: mt1s.vivox.com
  • Issuer: blindmelon-AppName-dev
  • Admin user: blindmelon-AppName-dev-Admin
  • Channel that contains the users to mute: sip:confctl-g-blindmelon-AppName-dev.the-channel@mt1s.vivox.com

Construct a mute all users token with the following parameters:

Note: This process requires a Vivox access token.

For more information, refer to the Access Token Developer Guide.

  • vxi: 1
  • f: sip:blindmelon-AppName-dev-Admin@mt1s.vivox.com
  • iss: blindmelon-AppName-dev
  • vxa: mute
  • t: sip:confctl-g-blindmelon-AppName-dev.the-channel@mt1s.vivox.com
  • exp: 1600349400

Important: The Vivox access token does not assign a subject when creating the mute all users token. However, a subject is not required for the mute all users in a channel command. When you create the Vivox access token, if you assign a subject, the subject is specified as the presenter and a request is made to mute everyone in the channel except for the presenter.

The following example displays an access token that uses these parameters:

e30.eyJ2eGkiOjEsImYiOiJzaXA6YmxpbmRtZWxvbi1BcHBOYW1lLWRldi1BZG1pbkBtdDFzLnZpdm94LmNvbSIsImlzcyI6ImJsaW5kbWVsb24tQXBwTmFtZS1kZXYiLCJ2eGEiOiJtdXRlIiwidCI6InNpcDpjb25mY3RsLWctYmxpbmRtZWxvbi1BcHBOYW1lLWRldi50aGUtY2hhbm5lbEBtdDFzLnZpdm94LmNvbSIsImV4cCI6MTYwMDM0OTQwMH0.KIk1eaT7dUv-eLhcpZg4SJbEJoHIePzlLmULg2YuCIQ

Call /api2/viv_chan_cmd.php with the following parameters:

  • access_token - The token used in the preceding example
  • auth_token - The token that viv_signin.php returns for blindmelon-AppName-dev-Admin
  • chan_uri - sip:confctl-g-blindmelon.the-channel@mt1s.vivox.com
  • mode - mute_all
https://mt1s.www.vivox.com/api2/viv_chan_cmd.php?mode=mute_all&access_token=e30.eyJ2eGkiOjEsImYiOiJzaXA6YmxpbmRtZWxvbi1BcHBOYW1lLWRldi1BZG1pbkBtdDFzLnZpdm94LmNvbSIsImlzcyI6ImJsaW5kbWVsb24tQXBwTmFtZS1kZXYiLCJ2eGEiOiJtdXRlIiwidCI6InNpcDpjb25mY3RsLWctYmxpbmRtZWxvbi1BcHBOYW1lLWRldi50aGUtY2hhbm5lbEBtdDFzLnZpdm94LmNvbSIsImV4cCI6MTYwMDM0OTQwMH0.KIk1eaT7dUv-eLhcpZg4SJbEJoHIePzlLmULg2YuCIQ&auth_token=blindmelon-AppName-dev-Admin:1278945699:220a34213b4273a1eab1ac18b5fe67b6:TesterAlias:1&chan_uri=sip:confctl-g-blindmelon.the-channel@mt1s.vivox.com