[asterisk-commits] jdixon: branch jdixon/chan_usbradio-1.4 r155509 - /team/jdixon/chan_usbradio-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Nov 8 14:11:19 CST 2008


Author: jdixon
Date: Sat Nov  8 14:11:18 2008
New Revision: 155509

URL: http://svn.digium.com/view/asterisk?view=rev&rev=155509
Log:
Added announcement of echolink callsign (if avail) 

Modified:
    team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c

Modified: team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c?view=diff&rev=155509&r1=155508&r2=155509
==============================================================================
--- team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c Sat Nov  8 14:11:18 2008
@@ -22,7 +22,7 @@
 /*! \file
  *
  * \brief Radio Repeater / Remote Base program 
- *  version 0.162 11/7/08 
+ *  version 0.163 11/8/08 
  * 
  * \author Jim Dixon, WB6NIL <jim at lambdatel.com>
  *
@@ -408,7 +408,7 @@
 /*! Stop the tones from playing */
 void ast_playtones_stop(struct ast_channel *chan);
 
-static  char *tdesc = "Radio Repeater / Remote Base  version 0.162  11/7/2008";
+static  char *tdesc = "Radio Repeater / Remote Base  version 0.163  11/8/2008";
 
 static char *app = "Rpt";
 
@@ -3997,13 +3997,26 @@
 	return res;
 }
 
+static int sayphoneticstr(struct ast_channel *mychannel,char *str)
+{
+int	res;
+
+	res = ast_say_phonetic_str(mychannel,str,NULL,mychannel->language);
+	if (!res) 
+		res = ast_waitstream(mychannel, "");
+	else
+		 ast_log(LOG_WARNING, "ast_streamfile failed on %s\n", mychannel->name);
+	ast_stopstream(mychannel);
+	return res;
+}
+
 /* say a node and nodename. Try to look in dir referred to by nodenames in
 config, and see if there's a custom node file to play, and if so, play it */
 
 static int saynode(struct rpt *myrpt, struct ast_channel *mychannel, char *name)
 {
 int	res;
-char	*val,fname[300];
+char	*val,fname[300],dbstr[100],actstr[100];
 
 	val = (char *) ast_variable_retrieve(myrpt->cfg, myrpt->name, "nodenames");
 	if (!val) val = NODENAMES;
@@ -4013,6 +4026,11 @@
 	res = sayfile(mychannel,"rpt/node");
 	if (!res) 
 		res = ast_say_character_str(mychannel,name,NULL,mychannel->language);
+	if (name[0] != '3') return res;
+	if (ast_db_get(EL_DB_ROOT,"active",actstr,sizeof(actstr) - 1)) return res;
+	sprintf(dbstr,"%s/nodenum-call/%d",actstr,atoi(name + 1));
+	if (ast_db_get(EL_DB_ROOT,dbstr,fname,sizeof(fname))) return res;
+	res = sayphoneticstr(mychannel,fname);
 	return res;
 }
 
@@ -6835,17 +6853,7 @@
 			}
 			else
 			{
-#if	0
-				char actstr[10],dbstr[40],str1[40];
-#endif
-
 				if (strlen(digitbuf) < 7) break;
-#if	0
-				if (ast_db_get(EL_DB_ROOT,"active",actstr,sizeof(actstr) - 1))
-					return DC_ERROR;
-				sprintf(dbstr,"%s/nodenum/%d",actstr,atoi(digitbuf + 1));
-				if (ast_db_get(EL_DB_ROOT,dbstr,str1,sizeof(str1))) return DC_ERROR;
-#endif
 			}
 			rpt_mutex_lock(&myrpt->lock);
 			strcpy(myrpt->lastlinknode,digitbuf);




More information about the asterisk-commits mailing list