private void Update()
{
try
{
m_sipAccount.SIPPassword = m_sipAccountPassword.Text;
m_sipAccount.OutDialPlanName = (m_outDialPlan.SelectedIndex != -1) ? m_outDialPlan.SelectedItem as string : null;
m_sipAccount.InDialPlanName = (m_inDialPlan.SelectedIndex != -1) ? m_inDialPlan.SelectedItem as string : null;
m_sipAccount.IsIncomingOnly = m_statusIncomingOnlyRadio.IsChecked.Value;
m_sipAccount.SendNATKeepAlives = m_keepAlivesCheckBox.IsChecked.Value;
m_sipAccount.IsUserDisabled = m_statusDisabledRadio.IsChecked.Value;
m_sipAccount.NetworkID = m_sipAccountNetworkId.Text.Trim();
m_sipAccount.IPAddressACL = m_sipAccountIPAddressACL.Text.Trim();
m_sipAccount.IsSwitchboardEnabled = m_isSwitchboardEnabledCheckBox.IsChecked.Value;
if (m_sipAccount.HasValidationErrors)
{
WriteStatusMessage(MessageLevelsEnum.Warn, m_sipAccount.ValidationErrors.First().ErrorMessage);
}
else
{
SIPAccount.Clean(m_sipAccount);
WriteStatusMessage(MessageLevelsEnum.Info, "Attempting to update SIP Account " + m_sipAccount.SIPUsername + "@" + m_sipAccount.SIPDomain + " please wait...");
UpdateSIPAccount_External(m_sipAccount);
}
}
catch (Exception excp)
{
WriteStatusMessage(MessageLevelsEnum.Error, "Update SIPAccount Exception. " + excp.Message);
}
}