Пример #1
0
 public sDeployedExtension(Extension ext)
 {
     _domainName           = ext.Domain.Name;
     _number               = ext.Number;
     _password             = ext.Password;
     _vm                   = null;
     _context              = ext.Context.Name;
     _internalCallerID     = ext.InternalCallerID;
     _internalCallerIDName = ext.InternalCallerIDName;
     _externalCallerID     = ext.ExternalCallerID;
     _externalCallerIDName = ext.ExternalCallerIDName;
     _voicemailTimeout     = ext.VoicemailTimeout;
     if (ext.HasVoicemail)
     {
         _vm = new sDeployedVoicemail(VoiceMail.Load(ext.Number, ext.Context), Number, DomainName);
     }
 }
Пример #2
0
        public void LoadFromElement(XmlElement element)
        {
            _domainName = element.Attributes["domainName"].Value;
            _number     = element.Attributes["number"].Value;
            _password   = element.Attributes["password"].Value;
            _context    = element.Attributes["context"].Value;
            if (element.Attributes["internalCallerID"] != null)
            {
                _internalCallerID = element.Attributes["internalCallerID"].Value;
            }
            if (element.Attributes["externalCallerID"] != null)
            {
                _externalCallerID = element.Attributes["externalCallerID"].Value;
            }
            if (element.Attributes["internalCallerIDName"] != null)
            {
                _internalCallerIDName = element.Attributes["internalCallerIDName"].Value;
            }
            if (element.Attributes["externalCallerIDName"] != null)
            {
                _externalCallerIDName = element.Attributes["externalCallerIDName"].Value;
            }
            if (element.Attributes["voicemailTimeout"] != null)
            {
                _voicemailTimeout = int.Parse(element.Attributes["voicemailTimeout"].Value);
            }
            string ixml = element.InnerXml.Trim();

            if (ixml != "")
            {
                _vm = (sDeployedVoicemail)Utility.ConvertObjectFromXML(ixml);
            }
            else
            {
                _vm = null;
            }
        }
 public void LoadFromElement(XmlElement element)
 {
     _domainName = element.Attributes["domainName"].Value;
     _number = element.Attributes["number"].Value;
     _password = element.Attributes["password"].Value;
     _context = element.Attributes["context"].Value;
     if (element.Attributes["internalCallerID"] != null)
         _internalCallerID = element.Attributes["internalCallerID"].Value;
     if (element.Attributes["externalCallerID"] != null)
         _externalCallerID = element.Attributes["externalCallerID"].Value;
     if (element.Attributes["internalCallerIDName"] != null)
         _internalCallerIDName = element.Attributes["internalCallerIDName"].Value;
     if (element.Attributes["externalCallerIDName"] != null)
         _externalCallerIDName = element.Attributes["externalCallerIDName"].Value;
     if (element.Attributes["voicemailTimeout"] != null)
         _voicemailTimeout = int.Parse(element.Attributes["voicemailTimeout"].Value);
     string ixml = element.InnerXml.Trim();
     if (ixml != "")
         _vm = (sDeployedVoicemail)Utility.ConvertObjectFromXML(ixml);
     else
         _vm = null;
 }
 public sDeployedExtension(Extension ext)
 {
     _domainName = ext.Domain.Name;
     _number = ext.Number;
     _password = ext.Password;
     _vm = null;
     _context = ext.Context.Name;
     _internalCallerID = ext.InternalCallerID;
     _internalCallerIDName = ext.InternalCallerIDName;
     _externalCallerID = ext.ExternalCallerID;
     _externalCallerIDName = ext.ExternalCallerIDName;
     _voicemailTimeout = ext.VoicemailTimeout;
     if (ext.HasVoicemail)
         _vm = new sDeployedVoicemail(VoiceMail.Load(ext.Number,ext.Context), Number,DomainName);
 }