[svn-commits] file: branch file/gulp_fax r394134 - /team/file/gulp_fax/channels/chan_gulp.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 11 12:25:53 CDT 2013


Author: file
Date: Thu Jul 11 12:25:51 2013
New Revision: 394134

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394134
Log:
Implement the queryoption callback in a basic fashion to allow T.38 negotiation requests to occur.

Modified:
    team/file/gulp_fax/channels/chan_gulp.c

Modified: team/file/gulp_fax/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_fax/channels/chan_gulp.c?view=diff&rev=394134&r1=394133&r2=394134
==============================================================================
--- team/file/gulp_fax/channels/chan_gulp.c (original)
+++ team/file/gulp_fax/channels/chan_gulp.c Thu Jul 11 12:25:51 2013
@@ -145,6 +145,7 @@
 static int gulp_transfer(struct ast_channel *ast, const char *target);
 static int gulp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
 static int gulp_devicestate(const char *data);
+static int gulp_queryoption(struct ast_channel *ast, int option, void *data, int *datalen);
 
 /*! \brief PBX interface structure for channel registration */
 static struct ast_channel_tech gulp_tech = {
@@ -165,6 +166,7 @@
 	.transfer = gulp_transfer,
 	.fixup = gulp_fixup,
 	.devicestate = gulp_devicestate,
+	.queryoption = gulp_queryoption,
 	.properties = AST_CHAN_TP_WANTSJITTER | AST_CHAN_TP_CREATESJITTER
 };
 
@@ -897,6 +899,26 @@
 	}
 
 	return state;
+}
+
+/*! \brief Function called to query options on a channel */
+static int gulp_queryoption(struct ast_channel *ast, int option, void *data, int *datalen)
+{
+	struct gulp_pvt *pvt = ast_channel_tech_pvt(ast);
+	struct ast_sip_session *session = pvt->session;
+	int res = -1;
+
+	switch (option) {
+	case AST_OPTION_T38_STATE:
+		*((enum ast_t38_state *) data) = session->endpoint->t38udptl ? T38_STATE_UNKNOWN : T38_STATE_UNAVAILABLE;
+		res = 0;
+
+		break;
+	default:
+		break;
+	}
+
+	return res;
 }
 
 struct indicate_data {




More information about the svn-commits mailing list