[asterisk-commits] file: branch 12 r403258 - /branches/12/res/res_pjsip_t38.c

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


Author: file
Date: Sun Dec  1 14:04:02 2013
New Revision: 403258

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403258
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.

Modified:
    branches/12/res/res_pjsip_t38.c

Modified: branches/12/res/res_pjsip_t38.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_t38.c?view=diff&rev=403258&r1=403257&r2=403258
==============================================================================
--- branches/12/res/res_pjsip_t38.c (original)
+++ branches/12/res/res_pjsip_t38.c Sun Dec  1 14:04:02 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