From: Anthony Minessale Date: Mon, 8 Dec 2008 17:37:26 +0000 (+0000) Subject: extend timeout on subscription dialog X-Git-Tag: v1.0.2~311 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f39c3fa3e6ee8ac07e2139576db7cba2ca96ecf;p=thirdparty%2Ffreeswitch.git extend timeout on subscription dialog git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10659 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 7d64f7a94c..098d47ab79 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -1497,7 +1497,7 @@ void sofia_presence_handle_sip_i_subscribe(int status, full_from = sip_header_as_string(profile->home, (void *) sip->sip_from); full_via = sip_header_as_string(profile->home, (void *) sip->sip_via); - exp_raw = (sip->sip_expires ? sip->sip_expires->ex_delta : 600); + exp_raw = (sip->sip_expires ? sip->sip_expires->ex_delta : 3600); exp = (long) switch_timestamp(NULL) + exp_raw + 120; if (sofia_test_pflag(profile, PFLAG_MULTIREG)) { @@ -1563,8 +1563,10 @@ void sofia_presence_handle_sip_i_subscribe(int status, contactstr = profile->tls_contact; } + nua_dialog_usage_set_refresh_range(nh->nh_ds->ds_usage, exp_raw + 120, exp_raw + 120); - nua_respond(nh, SIP_202_ACCEPTED, SIPTAG_CONTACT_STR(contact_str), NUTAG_WITH_THIS(nua), SIPTAG_SUBSCRIPTION_STATE_STR(sstr), + nua_respond(nh, SIP_202_ACCEPTED, SIPTAG_CONTACT_STR(contact_str), NUTAG_WITH_THIS(nua), + SIPTAG_SUBSCRIPTION_STATE_STR(sstr), TAG_IF(sticky, NUTAG_PROXY(sticky)), TAG_END()); switch_safe_free(sticky);