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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 21 17:02:16 CDT 2008


Author: jdixon
Date: Thu Aug 21 17:02:15 2008
New Revision: 139341

URL: http://svn.digium.com/view/asterisk?view=rev&rev=139341
Log:
New stuff to support full inbound functionality for echolink

Modified:
    team/jdixon/chan_usbradio-1.4/apps/app_rpt.c

Modified: team/jdixon/chan_usbradio-1.4/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_rpt.c?view=diff&rev=139341&r1=139340&r2=139341
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_rpt.c Thu Aug 21 17:02:15 2008
@@ -21,7 +21,7 @@
 /*! \file
  *
  * \brief Radio Repeater / Remote Base program 
- *  version 0.124 8/20/08 2055 EDT
+ *  version 0.125 8/21/08 2055 EDT
  * 
  * \author Jim Dixon, WB6NIL <jim at lambdatel.com>
  *
@@ -374,7 +374,7 @@
 /*! Stop the tones from playing */
 void ast_playtones_stop(struct ast_channel *chan);
 
-static  char *tdesc = "Radio Repeater / Remote Base  version 0.124  8/20/2008";
+static  char *tdesc = "Radio Repeater / Remote Base  version 0.125  8/21/2008";
 
 static char *app = "Rpt";
 
@@ -7148,8 +7148,16 @@
 					SOURCE_ALT,mylink);
 				break;
 			    default:
-				res = collect_function_digits(myrpt, cmd, 
-					SOURCE_LNK, mylink);
+				if (!strncasecmp(mylink->chan->name,"echolink",8))
+				{
+					res = collect_function_digits(myrpt, cmd, 
+						SOURCE_RPT, mylink);
+				}
+				else
+				{
+					res = collect_function_digits(myrpt, cmd, 
+						SOURCE_LNK, mylink);
+				}
 				break;
 			}
 
@@ -12586,47 +12594,50 @@
 				{
 					int ismuted,n1;
 
-					if ((l->phonemode) && (l->phonevox))
+					if (((l->phonemode) && (l->phonevox)) || (!strncasecmp(l->chan->name,"echolink",8)))
 					{
-						n1 = dovox(&l->vox,
-							f->data,f->datalen / 2);
-						if (n1 != l->wasvox)
+						if (l->phonevox)
 						{
-							if (debug)ast_log(LOG_DEBUG,"Link Node %s, vox %d\n",l->name,n1);
-							l->wasvox = n1;
-							l->voxtostate = 0;
-							if (n1) l->voxtotimer = myrpt->p.voxtimeout_ms;
-							else l->voxtotimer = 0;
-						}
-						if (l->lastrealrx || n1)
-						{
-							if (!myfirst)
+							n1 = dovox(&l->vox,
+								f->data,f->datalen / 2);
+							if (n1 != l->wasvox)
 							{
-							    x = 0;
-							    AST_LIST_TRAVERSE(&l->rxq, f1,
-								frame_list) x++;
-							    for(;x < myrpt->p.simplexphonedelay; x++)
+								if (debug)ast_log(LOG_DEBUG,"Link Node %s, vox %d\n",l->name,n1);
+								l->wasvox = n1;
+								l->voxtostate = 0;
+								if (n1) l->voxtotimer = myrpt->p.voxtimeout_ms;
+								else l->voxtotimer = 0;
+							}
+							if (l->lastrealrx || n1)
+							{
+								if (!myfirst)
 								{
-									f1 = ast_frdup(f);
-									memset(f1->data,0,f1->datalen);
-									AST_LIST_INSERT_TAIL(&l->rxq,
-										f1,frame_list);
-							    }
-							    myfirst = 1;
+								    x = 0;
+								    AST_LIST_TRAVERSE(&l->rxq, f1,
+									frame_list) x++;
+								    for(;x < myrpt->p.simplexphonedelay; x++)
+									{
+										f1 = ast_frdup(f);
+										memset(f1->data,0,f1->datalen);
+										AST_LIST_INSERT_TAIL(&l->rxq,
+											f1,frame_list);
+								    }
+								    myfirst = 1;
+								}
+								f1 = ast_frdup(f);
+								AST_LIST_INSERT_TAIL(&l->rxq,f1,frame_list);
+							} else myfirst = 0; 
+							x = 0;
+							AST_LIST_TRAVERSE(&l->rxq, f1,frame_list) x++;
+							if (!x)
+							{
+								memset(f->data,0,f->datalen);
 							}
-							f1 = ast_frdup(f);
-							AST_LIST_INSERT_TAIL(&l->rxq,f1,frame_list);
-						} else myfirst = 0; 
-						x = 0;
-						AST_LIST_TRAVERSE(&l->rxq, f1,frame_list) x++;
-						if (!x)
-						{
-							memset(f->data,0,f->datalen);
-						}
-						else
-						{
-							ast_frfree(f);
-							f = AST_LIST_REMOVE_HEAD(&l->rxq,frame_list);
+							else
+							{
+								ast_frfree(f);
+								f = AST_LIST_REMOVE_HEAD(&l->rxq,frame_list);
+							}
 						}
 						if (ioctl(l->chan->fds[0], ZT_GETCONFMUTE, &ismuted) == -1)
 						{
@@ -12634,7 +12645,8 @@
 						}
 						/* if not receiving, zero-out audio */
 						ismuted |= (!l->lastrx);
-						if (l->dtmfed && l->phonemode) ismuted = 1;
+						if (l->dtmfed && 
+							(l->phonemode || (!strncasecmp(l->chan->name,"echolink",8)))) ismuted = 1;
 						l->dtmfed = 0;
 						if (ismuted)
 						{




More information about the asterisk-commits mailing list