CMSRecordingControl.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Cisco-Showroom-RoomControl 作者: gbraux 项目源码 文件源码
def SetCMSRecording(callID, state):

    ssl._create_default_https_context = ssl._create_unverified_context
    conn = http.client.HTTPSConnection(Config.cmsFqdn)

    if (state == True):
        payload = "recording=true"
    else:
        payload = "recording=false"

    headers = {
        'authorization': Config.cmsGenericAuthRealm,
        'content-type': "application/x-www-form-urlencoded",
        'cache-control': "no-cache",
        'postman-token': "b5f016ed-5e19-d311-563e-c6aa7fdaa591"
        }

    conn.request("PUT", "/api/v1/calls/" + callID, payload, headers)

    res = conn.getresponse()
    data = res.read()

    print(data.decode("utf-8"))
    print("Recording Bit Set")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号