[asterisk-commits] mnicholson: branch irroot/t38gateway-trunk r323865 - /team/irroot/t38gateway-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 15 15:02:52 CDT 2011


Author: mnicholson
Date: Wed Jun 15 15:02:46 2011
New Revision: 323865

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=323865
Log:
support setting the modem type for spandsp t.38 gateways

Modified:
    team/irroot/t38gateway-trunk/res/res_fax_spandsp.c

Modified: team/irroot/t38gateway-trunk/res/res_fax_spandsp.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/res/res_fax_spandsp.c?view=diff&rev=323865&r1=323864&r2=323865
==============================================================================
--- team/irroot/t38gateway-trunk/res/res_fax_spandsp.c (original)
+++ team/irroot/t38gateway-trunk/res/res_fax_spandsp.c Wed Jun 15 15:02:46 2011
@@ -650,7 +650,7 @@
 static int spandsp_fax_gateway_start(struct ast_fax_session *s) {
 	struct spandsp_pvt *p = s->tech_pvt;
 	struct ast_fax_t38_parameters *t38_param;
-	int i;
+	int i, modems = 0;
 	struct ast_channel *peer;
 	static struct ast_generator t30_gen = {
 		alloc: spandsp_fax_gw_gen_alloc,
@@ -695,7 +695,21 @@
 	/* XXX should this be configurable via FAXOPT? */
 	t38_gateway_set_transmit_on_idle(&p->t38_gw_state, TRUE);
 	t38_set_sequence_number_handling(p->t38_core_state, TRUE);
-	t38_gateway_set_supported_modems(&p->t38_gw_state, T30_SUPPORT_V27TER | T30_SUPPORT_V17 | T30_SUPPORT_V29);
+
+	if (AST_FAX_MODEM_V17 & s->details->modems) {
+		modems |= T30_SUPPORT_V17;
+	}
+	if (AST_FAX_MODEM_V27 & s->details->modems) {
+		modems |= T30_SUPPORT_V27TER;
+	}
+	if (AST_FAX_MODEM_V29 & s->details->modems) {
+		modems |= T30_SUPPORT_V29;
+	}
+	if (AST_FAX_MODEM_V34 & s->details->modems) {
+		modems |= T30_SUPPORT_V34;
+	}
+
+	t38_gateway_set_supported_modems(&p->t38_gw_state, modems);
 
 	/* engage udptl nat on other side of T38 line 
 	 * (Asterisk changes media ports thus we send a few packets to reinitialize




More information about the asterisk-commits mailing list