Exemplo n.º 1
0
 private static void CallMobile(string phoneNum)
 {
     string jsonData = "{\"action\":\"callDailBack\",\"src\":\"" + phoneNum + "\",\"dst\":\"" + phoneNum + "\",\"appid\":\"" + appID + "\",\"credit\":\"" + "10" + "\"}";
     //2、云通信平台接口请求URL
     string url    = "/call/DailbackCall.wx";
     string result = CommenHelper.SendRequest(url, jsonData);
 }
Exemplo n.º 2
0
        public static string SendRequest(string accountsid, string authtoken, string url, string jsonData)
        {
            string Authorization;
            string Sign;
            string version = "201512";

            if (url == "/call/TeleMeeting.wx" || url == "/account/getBlance.wx" || url == "/call/MeetingQuery.wx" || url == "/traffic/Traffic.wx")
            {
                version = "201612";
            }
            CommenHelper.CreatAuthorizationAndSign(accountsid, authtoken, out Authorization, out Sign);
            string urlSign = restIP + "/" + version + "/sid/" + accountsid + url + "?Sign=" + Sign;

            return(SendRequest(urlSign, jsonData, Authorization));
        }