From 7b7c7c8b42a8c25b30b07a8cd524cccbb60173b3 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Wed, 6 Feb 2013 13:48:45 +0000 Subject: Close #1242: Single re-INVITE/UPDATE for both lock codec and ICE negotiation updates. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4342 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsua-lib/pjsua.h | 20 ++++++++++++++++++++ pjsip/include/pjsua-lib/pjsua_internal.h | 11 ++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) (limited to 'pjsip/include') diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 40975e4e..5114189d 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -2656,6 +2656,16 @@ typedef struct pjsua_ice_config */ pj_bool_t ice_no_rtcp; + /** + * Send re-INVITE/UPDATE every after ICE connectivity check regardless + * the default ICE transport address is changed or not. When this is set + * to PJ_FALSE, re-INVITE/UPDATE will be sent only when the default ICE + * transport address is changed. + * + * Default: yes + */ + pj_bool_t ice_always_update; + } pjsua_ice_config; /** @@ -5550,6 +5560,16 @@ struct pjsua_media_config */ pj_bool_t ice_no_rtcp; + /** + * Send re-INVITE/UPDATE every after ICE connectivity check regardless + * the default ICE transport address is changed or not. When this is set + * to PJ_FALSE, re-INVITE/UPDATE will be sent only when the default ICE + * transport address is changed. + * + * Default: yes + */ + pj_bool_t ice_always_update; + /** * Enable TURN relay candidate in ICE. */ diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h index d08b599d..12048ade 100644 --- a/pjsip/include/pjsua-lib/pjsua_internal.h +++ b/pjsip/include/pjsua-lib/pjsua_internal.h @@ -155,10 +155,7 @@ struct pjsua_call char last_text_buf_[128]; /**< Buffer for last_text. */ struct { - pj_timer_entry reinv_timer;/**< Reinvite retry timer. */ - pj_uint32_t sdp_ver; /**< SDP version of the bad answer */ int retry_cnt; /**< Retry count. */ - pj_bool_t pending; /**< Pending until CONFIRMED state */ } lock_codec; /**< Data for codec locking when answer contains multiple codecs. */ @@ -185,6 +182,10 @@ struct pjsua_call offer. */ unsigned rem_vid_cnt; /**< No of active video in last remote offer. */ + + pj_timer_entry reinv_timer; /**< Reinvite retry timer. */ + pj_bool_t reinv_pending;/**< Pending until CONFIRMED state. */ + pj_bool_t reinv_ice_sent;/**< Has reinvite for ICE upd sent? */ }; @@ -816,6 +817,10 @@ PJ_DECL(void) pjsua_vid_win_reset(pjsua_vid_win_id wid); # define pjsua_vid_win_reset(wid) #endif +/* + * Schedule check for the need of re-INVITE/UPDATE after media update + */ +void pjsua_call_schedule_reinvite_check(pjsua_call *call, unsigned delay_ms); PJ_END_DECL -- cgit v1.2.3