From 17276f318cc81d64c26aa766ae763b2773659dbf Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Fri, 2 Oct 2015 02:08:17 +0000 Subject: Close #1892: Add pjsua/pjsua2 callback on_call_tx_offer()/Call::onCallTxOffer() to notify incoming re-INVITE without offer. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5185 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsua-lib/pjsua_call.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pjsip/src/pjsua-lib') diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index 0c8e872a..c1bea3b0 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -4181,8 +4181,14 @@ static void pjsua_call_on_create_offer(pjsip_inv_session *inv, } #endif + if (pjsua_var.ua_cfg.cb.on_call_tx_offer) { + cleanup_call_setting_flag(&call->opt); + (*pjsua_var.ua_cfg.cb.on_call_tx_offer)(call->index, NULL, + &call->opt); + } + /* We may need to re-initialize media before creating SDP */ - if (call->med_prov_cnt == 0) { + if (call->med_prov_cnt == 0 || pjsua_var.ua_cfg.cb.on_call_tx_offer) { status = apply_call_setting(call, &call->opt, NULL); if (status != PJ_SUCCESS) goto on_return; -- cgit v1.2.3