Module: sems Branch: 1.4 Commit: fbe3e7bacc82e4f171f07cc74f7e90cc48035f3b URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=fbe3e7bacc82e4f171f07cc74f7e90cc48035f3b
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Sat May 21 14:39:26 2011 +0200 b/f: translate cseq in replies to the INV request sent by connectCallee(). --- core/AmB2BSession.cpp | 15 ++++++++++++--- core/AmB2BSession.h | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp index 0cd9eba..6a78e67 100644 --- a/core/AmB2BSession.cpp +++ b/core/AmB2BSession.cpp @@ -44,7 +44,7 @@ AmB2BSession::AmB2BSession() rtp_relay_enabled(false), rtp_relay_force_symmetric_rtp(false), relay_rtp_streams(NULL), relay_rtp_streams_cnt(0), - est_invite_cseq(0) + est_invite_cseq(0),est_invite_other_cseq(0) { for (unsigned int i=0; i<MAX_RELAY_STREAMS; i++) other_stream_fds[i] = 0; @@ -56,7 +56,7 @@ AmB2BSession::AmB2BSession(const string& other_local_tag) rtp_relay_enabled(false), rtp_relay_force_symmetric_rtp(false), relay_rtp_streams(NULL), relay_rtp_streams_cnt(0), - est_invite_cseq(0) + est_invite_cseq(0),est_invite_other_cseq(0) { for (unsigned int i=0; i<MAX_RELAY_STREAMS; i++) other_stream_fds[i] = 0; @@ -439,7 +439,15 @@ void AmB2BSession::onSipReply(const AmSipReply& reply, } } else { AmSession::onSipReply(reply, old_dlg_status, trans_method); - relayEvent(new B2BSipReplyEvent(reply, false, trans_method)); + + AmSipReply n_reply = reply; + if(est_invite_cseq == reply.cseq){ + n_reply.cseq = est_invite_other_cseq; + } + else { + // the reply here will not have the proper cseq for the other side. + } + relayEvent(new B2BSipReplyEvent(n_reply, false, trans_method)); } } @@ -1143,6 +1151,7 @@ void AmB2BCalleeSession::onB2BEvent(B2BEvent* ev) // save CSeq of establising INVITE est_invite_cseq = dlg.cseq - 1; + est_invite_other_cseq = co_ev->r_cseq; return; } diff --git a/core/AmB2BSession.h b/core/AmB2BSession.h index 57f5037..00265fa 100644 --- a/core/AmB2BSession.h +++ b/core/AmB2BSession.h @@ -144,6 +144,7 @@ class AmB2BSession: public AmSession /** CSeq of the INVITE that established this call */ unsigned int est_invite_cseq; + unsigned int est_invite_other_cseq; auto_ptr<AmSdp> invite_sdp; /** content-type of established session */ _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
