예제 #1
0
        /// <summary>
        /// 修改账户
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public CommentResponse EditSipNumber(AddSIPInfo info)
        {
            CommentResponse result = eSDKServiceHelper.editSipNumber(info);

            return(result);
        }
예제 #2
0
        public static CommentResponse editSipNumber(AddSIPInfo info)
        {
            CommentResponse result = eSDKServiceHelper.CallService <CommentResponse>(ECConstUri.sip_uri, HttpMethod.PUT, info);

            return(result);
        }
예제 #3
0
        //修改SIP号码
        private void btn_editSipNumber_Click(object sender, EventArgs e)
        {
            try
            {
                AddSIPInfo _info = new AddSIPInfo();
                _info.userId = this.txt_sipUser.Text.Trim();

                SIPAccount _account = new SIPAccount();
                _account.gwIp            = this.txt_gwIp.Text.Trim();
                _account.joint           = this.cbx_isJoint.Text.Trim();
                _account.number          = this.txt_SipNumber.Text.Trim();
                _account.rightLevel      = this.cbx_rightLevel.Text.Trim();
                _account.addPrefix       = this.cbx_addPrefix.Text.Trim();
                _account.ueType          = this.cbx_deviceType.Text.Trim();
                _account.subPbx          = "1";
                _account.longNum         = "14";
                _account.localGwIp       = "";
                _account.sipUe           = "100018695237";
                _account.bOutgoingRights = "";
                _account.cOutgoingRights = "";

                SIPAuth _auth = new SIPAuth();
                _auth.type     = this.cbx_authType.Text.Trim();
                _auth.password = this.txt_authPw5.Text.Trim();
                _auth.ip       = this.txt_authIp.Text.Trim();

                UsmSip _usmSip = new UsmSip();
                _usmSip.crgName          = "";
                _usmSip.domainName       = "";
                _usmSip.sipServerId      = "";
                _usmSip.isSyncLocalGw    = "";
                _usmSip.localGwName      = "";
                _usmSip.mrGroupName      = "";
                _usmSip.sourceCode       = "";
                _usmSip.stationGroupName = "";

                _account.sipAuth = _auth;
                _account.usmSip  = _usmSip;
                _info.sip        = _account;

                CommentResponse result = ecBusiness.EditSipNumber(_info);
                if (result != null)
                {
                    this.txt_ResultCode.Text = result.resultCode;
                    this.txt_Content.Text    = result.resultContext;
                    this.txt_ResultInfo.Text = eSDKServiceHelper.GetJsonString(result);
                    if (result.resultCode == "0")
                    {
                        this.WriteLog("call edit sip number success.");
                    }
                    else
                    {
                        this.WriteLog("call edit sip number failed," + result.resultContext);
                    }
                }
                else
                {
                    this.WriteLog("call edit sip number fail,response is null.");
                }
            }
            catch (Exception ex)
            {
                this.WriteLog("call edit sip number fail," + ex.Message);
            }
        }