• 描述:
    此接口用于接收第三方终端发起呼叫请求

  • 第三方下发呼叫请求URL
    api/OpenApi/ThirdStartTalking

  • 请求参数:
  • 请求示例:

    {
          "appid":"yme51ef06b32ac6cf1",
          "account":"xuguangshui1",
          "rand":"1",
          "key":"bcbde7aa27af7dcc",
          "eventNo":"",
          "type":"1",
          "sign":"4051580228A95CD19253EA7DB6374B8B"
    }
  • 返回参数:

  • 返回示例:

    {
      "resultcode": 0,
      "msg": "发送对讲房间失败",
      "actionName": "startIntercom",
      "data": ""
    }
    {
      "resultcode":1,
      "msg":"发起对讲下发房间号成功",
      "actionName":"startIntercom",
      "data":{
                  "eventNo":"2208191905185353",
                  "dr_account":"wy002",
                  "dr_pwd":"123456",
                  "dr_ppsvraddr":"livesfm.188park.net:7781",
                  "dr_talktype":"2"
              }
    }
    
  • demo (C#)

    //发起呼叫
    var callurl="第三方业务平台呼叫处理接口"; 具体请查看 第三方业务平台处理逻辑下的附件 【第三方业务平台处理demo】
              var json = JsonConvert.SerializeObject(new { userid="1630583033426149",
               method="applycall",
                  deviceno= textBox1.Text.Trim(), });
    
              string res=   httpcom.Post(callurl,json);
              if(!string.IsNullOrEmpty(res))
              {
                  dynamic dy = JsonConvert.DeserializeObject<dynamic>(res);
                  if (dy.code.ToString() == "1")
                  {
    
                      eventNo = dy.data.eventNo.ToString();
                      string acount= dy.data.dr_account.ToString();
                      string dr_pwd = dy.data.dr_pwd.ToString();
                      string dr_ppsvraddr= dy.data.dr_ppsvraddr.ToString();
                      string dr_talktype= dy.data.dr_talktype.ToString();
    
                      IntPtr picHandle = picVideo.Handle;
    
                      byte[] retValue = new byte[1024];
    
                      //pgLiveSDK.LiveClean(_iLiveInstID1);
                      int iRet = pgLiveSDK.LiveInit(dr_ppsvraddr, ConnectArgsModel.ppmonitorType, ref _iLiveInstID1, retValue, s_PgNotifyOutHandler);
                      if (iRet != 0)
                      {
                          MessageBox.Show("对讲视频初始化失败");
                          return;
                      }
    
                      byte[] retValue2 = new byte[1024];
                      //pgLiveSDK.DevClose(_iLiveInstID1);
                      int iRet2 = pgLiveSDK.DevOpen(_iLiveInstID1, acount, picHandle, "", "", retValue2);
                      if (iRet2 != 0)
                      {
                          MessageBox.Show("对讲视频打开失败");
                          return;
                      }
                  }
              }
作者:郭祥西  创建时间:2024-04-10 16:52
最后编辑:郭祥西  更新时间:2024-11-07 15:18