Registration interval can be changed through property, which does not affect expires header value

cusax-fix
Damian Minkov 19 years ago
parent c6f5e0d1cb
commit b3677605c6

@ -458,8 +458,36 @@ public void processOK(ClientTransaction clientTransatcion,
}
else
{
int scheduleTime = grantedExpiration;
// registration schedule interval can be forced
// with setting property REGISTRATION_ANTICIPATION to value in seconds
// this does not change expiration header
String regAnticipObj =
(String)sipProvider.getAccountID().getAccountProperties().
get("REGISTRATION_ANTICIPATION");
if(regAnticipObj != null)
{
try
{
int registrationAnticipation =
Integer.valueOf(regAnticipObj).intValue();
if(registrationAnticipation < grantedExpiration)
{
scheduleTime = registrationAnticipation;
}
}
catch (Exception ex)
{
logger.error("Wrong value for REGISTRATION_ANTICIPATION");
}
}
//schedule a reregistration.
scheduleReRegistration(grantedExpiration);
scheduleReRegistration(scheduleTime);
setRegistrationState(
RegistrationState.REGISTERED

Loading…
Cancel
Save