private static void CallMobile(string phoneNum) { string jsonData = "{\"action\":\"callDailBack\",\"src\":\"" + phoneNum + "\",\"dst\":\"01053189990\",\"appid\":\"" + appID + "\",\"credit\":\"" + "10" + "\"}"; //2、云通信平台接口请求URL string url = "/call/DailbackCall.wx"; string result = CommenHelper.SendRequest(url, jsonData); runLog.log("call :" + result); }
//public CALL(ILogger logger) //{ // _logger = logger; //} public async Task <bool> templateNoticeCall(string mobile, string code, string birdhouse_name, string content) { //0、电话号码 验证码 验证 //1、构建访问参数 string jsonData = "{\"action\":\"templateNoticeCall\",\"isdtmfcallback\":\"1\",\"dst\":\"" + mobile + "\",\"appid\":\"" + appID + "\",\"templateId\":\"2821\",\"dstclid\":\"" + code + "\",\"datas\":[\"" + birdhouse_name + "\", \"" + content + "\"]}"; //2、云通信平台接口请求URL isdtmfcallback string url = "/call/NoticeCall.wx"; LogHelper.Error("NoticeCall" + jsonData); //3、发送http请求,接收返回错误消息 var result = CommenHelper.SendRequest(url, jsonData); LogHelper.Error("CodeCallOut" + result); if (result.Contains("提交成功")) { return(true); } else { return(false); } }