[asterisk-commits] branch oej/t38passthrough r12498 - /team/oej/t38passthrough/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Mar 10 14:26:59 MST 2006


Author: oej
Date: Fri Mar 10 15:26:56 2006
New Revision: 12498

URL: http://svn.digium.com/view/asterisk?rev=12498&view=rev
Log:
Add support for checking T38 in the dialplan. My thought was to
be able to take invites to a lot of extensions, but redirect
it in the dialplan to a T38 capable extension if we have 
T38 offers.

I have not checked this. Please check!

Modified:
    team/oej/t38passthrough/channels/chan_sip.c

Modified: team/oej/t38passthrough/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/channels/chan_sip.c?rev=12498&r1=12497&r2=12498&view=diff
==============================================================================
--- team/oej/t38passthrough/channels/chan_sip.c (original)
+++ team/oej/t38passthrough/channels/chan_sip.c Fri Mar 10 15:26:56 2006
@@ -10151,6 +10151,13 @@
 		ast_copy_string(buf, p->useragent, len);
 	} else  if (!strcasecmp(data, "peername")) {
 		ast_copy_string(buf, p->peername, len);
+#ifdef T38_SUPPORT
+	} else  if (!strcasecmp(data, "t38passthrough")) {
+		if (p->t38.state == T38_DISABLED)
+			ast_copy_string(buf, "0", sizeof("0"));
+		else	/* T38 is offered or enabled in this call */
+			ast_copy_string(buf, "1", sizeof("1"));
+#endif
 	} else {
 		ast_mutex_unlock(&chan->lock);
 		return -1;
@@ -10173,6 +10180,9 @@
 	"- uri                   The URI from the Contact: header.\n"
 	"- useragent             The useragent.\n"
 	"- peername              The name of the peer.\n"
+#ifdef T38_SUPPORT
+	"- t38passthrough        1 if T38 is offered or enabled in this channel, otherwise 0\n"
+#endif
 };
 
 /*! \brief  parse_moved_contact: Parse 302 Moved temporalily response */



More information about the asterisk-commits mailing list