[asterisk-commits] file: trunk r403259 - in /trunk: ./ res/res_pjsip_t38.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Dec 1 14:04:57 CST 2013


Author: file
Date: Sun Dec  1 14:04:55 2013
New Revision: 403259

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403259
Log:
res_pjsip_t38: Add the framehook to the channel only on first INVITE.

The check for determining whether the T.38 framehook should be added to
the channel or not has now been changed to guarantee adding only occurs
on the first incoming or outgoing INVITE.
........

Merged revisions 403258 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_pjsip_t38.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Sun Dec  1 14:04:55 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403175,403179,403207,403209,403221,403223,403240,403256
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403175,403179,403207,403209,403221,403223,403240,403256,403258

Modified: trunk/res/res_pjsip_t38.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_t38.c?view=diff&rev=403259&r1=403258&r2=403259
==============================================================================
--- trunk/res/res_pjsip_t38.c (original)
+++ trunk/res/res_pjsip_t38.c Sun Dec  1 14:04:55 2013
@@ -446,8 +446,10 @@
 		.event_cb = t38_framehook,
 	};
 
-	if (!session->channel || (ast_channel_state(session->channel) == AST_STATE_UP) ||
-	    !session->endpoint->media.t38.enabled) {
+	/* Only attach the framehook on the first outgoing INVITE or the first incoming INVITE */
+	if ((session->inv_session->state != PJSIP_INV_STATE_NULL &&
+		session->inv_session->state != PJSIP_INV_STATE_INCOMING) ||
+		!session->endpoint->media.t38.enabled) {
 		return;
 	}
 




More information about the asterisk-commits mailing list