summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib/pjsua_call.c
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2011-12-13 04:59:15 +0000
committerNanang Izzuddin <nanang@teluu.com>2011-12-13 04:59:15 +0000
commita69e3e09bcebcdec20e3224c6b073f58d4618d67 (patch)
tree3990f039aa271758d7ea0ea44bf2ccf825021e95 /pjsip/src/pjsua-lib/pjsua_call.c
parent18e7622287344908ae3ce02164a40336da99d664 (diff)
Close #1424: Added new pjsua callback: on_call_rx_offer().
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3908 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_call.c')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 15288538..ece37d51 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -3555,6 +3555,22 @@ static void pjsua_call_on_rx_offer(pjsip_inv_session *inv,
call->index));
pj_log_push_indent();
+ if (pjsua_var.ua_cfg.cb.on_call_rx_offer) {
+ pjsip_status_code code = PJSIP_SC_OK;
+ pjsua_call_setting opt = call->opt;
+
+ (*pjsua_var.ua_cfg.cb.on_call_rx_offer)(call->index, offer, NULL,
+ &code, &opt);
+
+ if (code != PJSIP_SC_OK) {
+ PJ_LOG(4,(THIS_FILE, "Rejecting updated media offer on call %d",
+ call->index));
+ goto on_return;
+ }
+
+ call->opt = opt;
+ }
+
/* Re-init media for the new remote offer before creating SDP */
status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAS,
call->secure_level,