From 998a1fa8fdb03e9922184fb1202d1e4705086030 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 23 Apr 2009 11:50:25 +0000 Subject: Fixed ticket #794: Bug with generating SDP version in origin line (thanks Joel Dodson for the report) - the INVITE session now correctly uses the SDP offer "fixed" by the negotiator, hence it will have the correct origin fields. - removed update_sdp_version() from PJSUA-LIB - the negotiator now also fixes the session ID of subsequent answer so that it's identical to the previous SDP git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2643 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip-ua/sip_inv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pjsip/src/pjsip-ua') diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c index 71c5a16a..a54a5f36 100644 --- a/pjsip/src/pjsip-ua/sip_inv.c +++ b/pjsip/src/pjsip-ua/sip_inv.c @@ -2248,11 +2248,16 @@ PJ_DEF(pj_status_t) pjsip_inv_update ( pjsip_inv_session *inv, goto on_error; } + /* Notify negotiator about the new offer. This will fix the offer + * with correct SDP origin. + */ status = pjmedia_sdp_neg_modify_local_offer(inv->pool,inv->neg, offer); if (status != PJ_SUCCESS) goto on_error; + /* Retrieve the "fixed" offer from negotiator */ + pjmedia_sdp_neg_get_neg_local(inv->neg, &offer); /* Update Contact if required */ if (new_contact) { @@ -3619,9 +3624,16 @@ static void inv_on_state_confirmed( pjsip_inv_session *inv, pjsip_event *e) if (mod_inv.cb.on_create_offer) { (*mod_inv.cb.on_create_offer)(inv, &sdp); if (sdp) { + /* Notify negotiator about the new offer. This will + * fix the offer with correct SDP origin. + */ status = pjmedia_sdp_neg_modify_local_offer(dlg->pool, inv->neg, sdp); + + /* Retrieve the "fixed" offer from negotiator */ + if (status==PJ_SUCCESS) + pjmedia_sdp_neg_get_neg_local(inv->neg, &sdp); } } -- cgit v1.2.3