Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string ret = null;
                        //ip格式如下,不带https://
            CCPRestSDK.CCPRestSDK api = new CCPRestSDK.CCPRestSDK();
            bool isInit = api.init("sandboxapp.cloopen.com", "8883");
            api.setAccount(主帐号, 主帐号令牌);
            api.setAppId(应用ID);

            try
            {
                if (isInit)
                {
                    Dictionary<string, object> retData = api.LandingCall(接听号码, 语音文件名称, 文本内容, 接听侧显示号码, 播放次数, 语音文件名的类型, 外呼通知状态通知回调地址);
                    ret = getDictionaryData(retData);
                }
                else
                {
                    ret = "初始化失败";
                }
            }
            catch (Exception exc)
            {
                ret = exc.Message;
            }
            finally
            {
                Response.Write(ret);
            }
        }