public sDeployedOutgoingSipTrunk(OutgoingSIPTrunk trunk) { _name = trunk.Name; _userName = trunk.UserName; _password = trunk.Password; _register = trunk.Register; _regType = trunk.RegistrationType; _context = trunk.Profile.Context.Name; _pingInterval = trunk.PingInterval; _retrySeconds = trunk.RetrySeconds; _fromUser = trunk.FromUser; _fromDomain = trunk.FromDomain; _extension = trunk.Extension; _proxy = trunk.Proxy; _registerProxy = trunk.RegisterProxy; _expireSeconds = trunk.ExpireSeconds; _realm = trunk.Realm; _profileName = trunk.Profile.Name; }
public void LoadFromElement(XmlElement element) { _name = element.Attributes["name"].Value; _userName = element.Attributes["username"].Value; _password = element.Attributes["password"].Value; _register = bool.Parse(element.Attributes["register"].Value); _regType = (OutgoingSIPTrunk.RegistrationTypes)Enum.Parse(typeof(OutgoingSIPTrunk.RegistrationTypes), element.Attributes["regType"].Value); _context = element.Attributes["context"].Value; _pingInterval = int.Parse(element.Attributes["pingInterval"].Value); _retrySeconds = int.Parse(element.Attributes["retryseconds"].Value); _realm = element.Attributes["realm"].Value; _profileName = element.Attributes["profileName"].Value; if (element.Attributes["fromUser"] != null) { _fromUser = element.Attributes["fromUser"].Value; } if (element.Attributes["fromDomain"] != null) { _fromDomain = element.Attributes["fromDomain"].Value; } if (element.Attributes["extension"] != null) { _extension = element.Attributes["extension"].Value; } if (element.Attributes["proxy"] != null) { _proxy = element.Attributes["proxy"].Value; } if (element.Attributes["registerProxy"] != null) { _registerProxy = element.Attributes["registerProxy"].Value; } if (element.Attributes["expireSeconds"] != null) { _expireSeconds = int.Parse(element.Attributes["expireSeconds"].Value); } }
public void LoadFromElement(XmlElement element) { _name = element.Attributes["name"].Value; _userName = element.Attributes["username"].Value; _password = element.Attributes["password"].Value; _register = bool.Parse(element.Attributes["register"].Value); _regType = (OutgoingSIPTrunk.RegistrationTypes)Enum.Parse(typeof(OutgoingSIPTrunk.RegistrationTypes), element.Attributes["regType"].Value); _context = element.Attributes["context"].Value; _pingInterval = int.Parse(element.Attributes["pingInterval"].Value); _retrySeconds = int.Parse(element.Attributes["retryseconds"].Value); _realm = element.Attributes["realm"].Value; _profileName = element.Attributes["profileName"].Value; if (element.Attributes["fromUser"] != null) _fromUser = element.Attributes["fromUser"].Value; if (element.Attributes["fromDomain"] != null) _fromDomain = element.Attributes["fromDomain"].Value; if (element.Attributes["extension"] != null) _extension = element.Attributes["extension"].Value; if (element.Attributes["proxy"] != null) _proxy = element.Attributes["proxy"].Value; if (element.Attributes["registerProxy"] != null) _registerProxy = element.Attributes["registerProxy"].Value; if (element.Attributes["expireSeconds"] != null) _expireSeconds = int.Parse(element.Attributes["expireSeconds"].Value); }