src/api/ChannelsAPI.js
/**
   * POST /channels/{channelId}/moh
   *
   * Play music on hold to the channel. Using media operations such as /play
   * on a channel playing music on hold in this manner will suspend music on
   * hold without resuming automatically. If continuing music on hold is desired,
   * the stasis application must re-initiate it.
   *
   * @param {object} params
   * @param {string} params.channelId The id of the channel to play music on
   *  hold to.
   * @param {string} [params.mohClass] The class of music on hold to play.
   * @returns {Promise} Resolves when the music has successfully started
   *  playing. Rejects when the channel is not found (status 404) or the
   *  channel is not in a stasis application (status 409).
   */
POST /channels/{channelId}/moh
Play music on hold to the channel. Using media operations such as /play
on a channel playing music on hold in this manner will suspend music on
hold without resuming automatically. If continuing music on hold is desired,
the stasis application must re-initiate it.

@param {object} params
@param {string} params.channelId The id of the channel to play music on
hold to.
@param {string} [params.mohClass] The class of music on hold to play.
@returns {Promise} Resolves when the music has successfully started
playing. Rejects when the channel is not found (status 404) or the
channel is not in a stasis application (status 409).
POST / channels / { channelId } / moh Play music on hold to the channel . Using media operations such as / play on a channel playing music on hold in this manner will suspend music on hold without resuming automatically . If continuing music on hold is desired the stasis application must re - initiate it . @param { object } params @param { string } params . channelId The id of the channel to play music on hold to . @param { string } [ params . mohClass ] The class of music on hold to play . @returns { Promise } Resolves when the music has successfully started playing . Rejects when the channel is not found ( status 404 ) or the channel is not in a stasis application ( status 409 ) .
startMusicOnHold(params) {
    const { channelId, mohClass } = params;
    const id = encodeURIComponent(channelId);
    return this._request({
      method: "POST",
      url: `${this._baseUrl}/channels/${id}/moh`,
      params: { mohClass },
    });
  }
startMusicOnHold ( params ) { const { channelId , mohClass } = params ; const id = encodeURIComponent ( channelId ) ; return this . _request ( { method : "POST" , url : ` ${ this . _baseUrl } ${ id } ` , params : { mohClass } , } ) ; }
POST /channels/{channelId}/moh
 Play music on hold to the channel.
POST / channels / { channelId } / moh Play music on hold to the channel .