[Semsdev] r1362 - trunk/core
sayer at mail.berlios.de
sayer at mail.berlios.de
Wed May 6 14:53:02 CEST 2009
Author: sayer
Date: 2009-05-06 14:53:00 +0200 (Wed, 06 May 2009)
New Revision: 1362
Modified:
trunk/core/AmB2BSession.cpp
trunk/core/AmB2BSession.h
Log:
optionally relay early media (180 .. 183) into caller leg of B2B sessions.
note this effects only applications where call is accepted before creating
second call leg, i.e. it does not affect call_timer/auth_b2b.
based on a patch by Tom van der Geer
Modified: trunk/core/AmB2BSession.cpp
===================================================================
--- trunk/core/AmB2BSession.cpp 2009-05-06 12:39:14 UTC (rev 1361)
+++ trunk/core/AmB2BSession.cpp 2009-05-06 12:53:00 UTC (rev 1362)
@@ -236,7 +236,7 @@
AmB2BCallerSession::AmB2BCallerSession()
: AmB2BSession(),
- callee_status(None)
+ callee_status(None), sip_relay_early_media_sdp(false)
{
}
@@ -244,6 +244,11 @@
{
}
+void AmB2BCallerSession::set_sip_relay_early_media_sdp(bool r)
+{
+ sip_relay_early_media_sdp = r;
+}
+
void AmB2BCallerSession::terminateLeg()
{
AmB2BSession::terminateLeg();
@@ -275,6 +280,10 @@
case Ringing:
if(reply.code < 200){
+ if ((!sip_relay_only) && sip_relay_early_media_sdp &&
+ reply.code>=180 && reply.code<=183 && (!reply.body.empty())) {
+ reinviteCaller(reply);
+ }
callee_status = Ringing;
}
Modified: trunk/core/AmB2BSession.h
===================================================================
--- trunk/core/AmB2BSession.h 2009-05-06 12:39:14 UTC (rev 1361)
+++ trunk/core/AmB2BSession.h 2009-05-06 12:53:00 UTC (rev 1362)
@@ -191,6 +191,12 @@
virtual void createCalleeSession();
void relayEvent(AmEvent* ev);
+ /** Tell if the session should
+ * relay early media SDPs to
+ * caller leg
+ */
+ bool sip_relay_early_media_sdp;
+
public:
AmB2BCallerSession();
virtual ~AmB2BCallerSession();
@@ -215,6 +221,7 @@
AmSipRequest* getInviteReq() { return &invite_req; }
+ void set_sip_relay_early_media_sdp(bool r);
};
/** \brief Callee leg of a B2B session */
More information about the Semsdev
mailing list