aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/net/java/sip/communicator/service/protocol/sip/SIPAccountRegistration.java38
1 files changed, 26 insertions, 12 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/sip/SIPAccountRegistration.java b/src/net/java/sip/communicator/service/protocol/sip/SIPAccountRegistration.java
index 9719b8c..5355855 100644
--- a/src/net/java/sip/communicator/service/protocol/sip/SIPAccountRegistration.java
+++ b/src/net/java/sip/communicator/service/protocol/sip/SIPAccountRegistration.java
@@ -24,7 +24,7 @@ import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
import org.jitsi.service.neomedia.*;
-
+import org.jitsi.util.StringUtils;
import org.osgi.framework.*;
/**
@@ -257,23 +257,37 @@ public class SIPAccountRegistration
encodingsRegistration.storeProperties(this.accountProperties);
- if (isModification)
+ if(isMessageWaitingIndicationsEnabled())
{
- if (isMessageWaitingIndicationsEnabled())
+ if(!StringUtils.isNullOrEmpty(getVoicemailURI(), true))
+ accountProperties.put(
+ ProtocolProviderFactory.VOICEMAIL_URI,
+ getVoicemailURI());
+ else if(isModification)
+ accountProperties.put(ProtocolProviderFactory.VOICEMAIL_URI, "");
+
+ if(!StringUtils.isNullOrEmpty(
+ getVoicemailCheckURI(), true))
+ accountProperties.put(
+ ProtocolProviderFactory.VOICEMAIL_CHECK_URI,
+ getVoicemailCheckURI());
+ else if(isModification)
+ accountProperties.put(
+ ProtocolProviderFactory.VOICEMAIL_CHECK_URI, "");
+
+ if(isModification)
{
- setVoicemailURI("");
- setVoicemailCheckURI("");
// remove the property as true is by default,
// and null removes property
- removeAccountProperty(
- ProtocolProviderFactory.VOICEMAIL_ENABLED);
- } else
- {
- accountProperties.put(
- ProtocolProviderFactory.VOICEMAIL_ENABLED,
- Boolean.FALSE.toString());
+ accountProperties.put(ProtocolProviderFactory.VOICEMAIL_ENABLED,
+ null);
}
}
+ else if(isModification)
+ {
+ accountProperties.put(ProtocolProviderFactory.VOICEMAIL_ENABLED,
+ Boolean.FALSE.toString());
+ }
super.storeProperties(
protocolIconPath, accountIconPath, accountProperties);