[asterisk-commits] jdixon: branch jdixon/chan_usbradio-1.4 r143125 - /team/jdixon/chan_usbradio-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Sep 15 08:56:00 CDT 2008
Author: jdixon
Date: Mon Sep 15 08:56:00 2008
New Revision: 143125
URL: http://svn.digium.com/view/asterisk?view=rev&rev=143125
Log:
Fixed simplex transmit/receive priority and allow option for monitor only
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=143125&r1=143124&r2=143125
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_rpt.c Mon Sep 15 08:56:00 2008
@@ -22,7 +22,7 @@
/*! \file
*
* \brief Radio Repeater / Remote Base program
- * version 0.149 9/14/08
+ * version 0.150 9/15/08
*
* \author Jim Dixon, WB6NIL <jim at lambdatel.com>
*
@@ -380,7 +380,7 @@
/*! Stop the tones from playing */
void ast_playtones_stop(struct ast_channel *chan);
-static char *tdesc = "Radio Repeater / Remote Base version 0.149 9/14/2008";
+static char *tdesc = "Radio Repeater / Remote Base version 0.150 9/15/2008";
static char *app = "Rpt";
@@ -539,6 +539,7 @@
char isremote;
char phonemode;
char phonevox; /* vox the phone */
+ char phonemonitor; /* no tx or funs for the phone */
char name[MAXNODESTR]; /* identifier (routing) string */
char lasttx;
char lasttx1;
@@ -7205,6 +7206,8 @@
sprintf(str,"DTMF(P),%s,%c",mylink->name,c);
donodelog(myrpt,str);
}
+ if (mylink->phonemonitor) return;
+
rpt_mutex_lock(&myrpt->lock);
if (mylink->phonemode == 3) /*If in simplex dumb phone mode */
@@ -11730,6 +11733,8 @@
myrpt->p.althangtime : /* Initialize tail timer */
myrpt->p.hangtime;
}
+ /* if in 1/2 or 3/4 duplex, give rx priority */
+ if ((myrpt->p.duplex < 2) && (myrpt->keyed)) totx = 0;
/* Disable the local transmitter if we are timed out */
totx = totx && myrpt->totimer;
/* if timed-out and not said already, say it */
@@ -11828,6 +11833,8 @@
totx = totx && !myrpt->p.s[myrpt->p.sysstate_cur].txdisable;
myrpt->txrealkeyed = totx;
totx = totx || (!AST_LIST_EMPTY(&myrpt->txq));
+ /* if in 1/2 or 3/4 duplex, give rx priority */
+ if ((myrpt->p.duplex < 2) && (myrpt->keyed)) totx = 0;
if (totx && (!lasttx))
{
char mydate[100],myfname[100];
@@ -13489,7 +13496,7 @@
{
int res=-1,i,rem_totx,rem_rx,remkeyed,n,phone_mode = 0;
int iskenwood_pci4,authtold,authreq,setting,notremming,reming;
- int ismuted,dtmfed,phone_vox = 0;
+ int ismuted,dtmfed,phone_vox = 0, phone_monitor = 0;
#ifdef OLD_ASTERISK
struct localuser *u;
#endif
@@ -13662,7 +13669,8 @@
ast_set_callerid(chan,"0","app_rpt user","0");
val = 1;
ast_channel_setoption(chan,AST_OPTION_TONE_VERIFY,&val,sizeof(char),0);
- if ((*(options + 1) == 'V') || (*(options + 1) == 'v')) phone_vox = 1;
+ if (strchr(options + 1,'v') || strchr(options + 1,'V')) phone_vox = 1;
+ if (strchr(options + 1,'m') || strchr(options + 1,'M')) phone_monitor = 1;
}
else
{
@@ -13990,6 +13998,7 @@
l->reconnects = reconnects;
l->phonemode = phone_mode;
l->phonevox = phone_vox;
+ l->phonemonitor = phone_monitor;
l->lastf1 = NULL;
l->lastf2 = NULL;
l->dtmfed = 0;
More information about the asterisk-commits
mailing list