Add PJSUA_LOCK_CODEC_DONT_USE_UPDATE for forcing lock codec to always use INVITE method. (#3230)
This commit is contained in:
parent
505b027920
commit
d98f3c3036
|
@ -4944,6 +4944,24 @@ PJ_DECL(pj_status_t) pjsua_acc_set_transport(pjsua_acc_id acc_id,
|
|||
# define PJSUA_MAX_VID_WINS 16
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Specifies if lock codec feature should always use INVITE method.
|
||||
* This will also affect ICE completion update in updating default address
|
||||
* in SDP.
|
||||
*
|
||||
* This can be useful when communicating with endpoints that do not
|
||||
* respond to UPDATE properly while indicating UPDATE support (by
|
||||
* specifying UPDATE in its SIP Allow header).
|
||||
*
|
||||
* Note that UPDATE can be sent when dialog is still in early state,
|
||||
* while re-INVITE needs to wait until the dialog is confirmed.
|
||||
*/
|
||||
#ifndef PJSUA_LOCK_CODEC_DONT_USE_UPDATE
|
||||
# define PJSUA_LOCK_CODEC_DONT_USE_UPDATE 0
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Video window ID.
|
||||
*/
|
||||
|
|
|
@ -4166,7 +4166,8 @@ static pj_status_t process_pending_reinvite(pjsua_call *call)
|
|||
if (inv->state == PJSIP_INV_STATE_EARLY) {
|
||||
if (pjsip_dlg_remote_has_cap(inv->dlg, PJSIP_H_ALLOW, NULL,
|
||||
&ST_UPDATE) == PJSIP_DIALOG_CAP_SUPPORTED &&
|
||||
inv->sdp_done_early_rel)
|
||||
inv->sdp_done_early_rel &&
|
||||
!PJSUA_LOCK_CODEC_DONT_USE_UPDATE)
|
||||
{
|
||||
/* Yes, remote supports UPDATE and SDP negotiation was done
|
||||
* using reliable provisional responses. We can proceed.
|
||||
|
@ -4193,7 +4194,8 @@ static pj_status_t process_pending_reinvite(pjsua_call *call)
|
|||
/* Okay! So we need to send re-INVITE/UPDATE */
|
||||
|
||||
/* Check if remote support UPDATE */
|
||||
rem_can_update = pjsip_dlg_remote_has_cap(inv->dlg, PJSIP_H_ALLOW, NULL,
|
||||
rem_can_update = !PJSUA_LOCK_CODEC_DONT_USE_UPDATE &&
|
||||
pjsip_dlg_remote_has_cap(inv->dlg, PJSIP_H_ALLOW, NULL,
|
||||
&ST_UPDATE) ==
|
||||
PJSIP_DIALOG_CAP_SUPPORTED;
|
||||
|
||||
|
|
Loading…
Reference in New Issue