From cc827eaa67b4f593e594372dd5d8e23b5ac13897 Mon Sep 17 00:00:00 2001 From: smorlat Date: Fri, 25 Sep 2009 07:46:04 +0000 Subject: [PATCH] add parameter git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@679 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/coreapi/exevents.c | 3 ++- linphone/coreapi/linphonecore.c | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/linphone/coreapi/exevents.c b/linphone/coreapi/exevents.c index 66aa7e8ec..f82de7847 100644 --- a/linphone/coreapi/exevents.c +++ b/linphone/coreapi/exevents.c @@ -33,7 +33,8 @@ static bool_t linphone_call_matches_event(LinphoneCall *call, eXosip_event_t *ev static void linphone_call_proceeding(LinphoneCore *lc, eXosip_event_t *ev){ if (lc->call==NULL || (lc->call->cid!=-1 && !linphone_call_matches_event(lc->call,ev)) ) { - ms_warning("This call has been canceled."); + ms_warning("This call has been canceled: call=%p, call->cid=%i, ev->cid=%i", + lc->call,lc->call->cid,ev->cid); eXosip_lock(); eXosip_call_terminate(ev->cid,ev->did); eXosip_unlock(); diff --git a/linphone/coreapi/linphonecore.c b/linphone/coreapi/linphonecore.c index caf8a6100..e5d753ab9 100644 --- a/linphone/coreapi/linphonecore.c +++ b/linphone/coreapi/linphonecore.c @@ -1360,8 +1360,10 @@ int linphone_core_invite(LinphoneCore *lc, const char *url) ms_warning("Could not build initial invite"); goto end; } - osip_message_set_header(invite, "Session-expires", "200"); - osip_message_set_supported(invite, "timer"); + if (lp_config_get_int(lc->config,"sip","use_session_timers",0)==1){ + osip_message_set_header(invite, "Session-expires", "200"); + osip_message_set_supported(invite, "timer"); + } /* make sdp message */ osip_from_init(&parsed_url2); @@ -1747,8 +1749,9 @@ int linphone_core_accept_call(LinphoneCore *lc, const char *url) ms_error("Fail to build answer for call: err=%i",err); return -1; } - - if (call->supports_session_timers) osip_message_set_supported(msg, "timer"); + if (lp_config_get_int(lc->config,"sip","use_session_timers",0)==1){ + if (call->supports_session_timers) osip_message_set_supported(msg, "timer"); + } /*try to be best-effort in giving real local or routable contact address, except when the user choosed to override the ipaddress */ if (linphone_core_get_firewall_policy(lc)!=LINPHONE_POLICY_USE_NAT_ADDRESS)