[asterisk-commits] jdixon: branch jdixon/chan_usbradio-1.4 r149858 - /team/jdixon/chan_usbradio-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Oct 15 16:41:35 CDT 2008
Author: jdixon
Date: Wed Oct 15 16:41:35 2008
New Revision: 149858
URL: http://svn.digium.com/view/asterisk?view=rev&rev=149858
Log:
Some fixes??
Modified:
team/jdixon/chan_usbradio-1.4/dev-1.0/apps/app_rpt.c
Modified: team/jdixon/chan_usbradio-1.4/dev-1.0/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/dev-1.0/apps/app_rpt.c?view=diff&rev=149858&r1=149857&r2=149858
==============================================================================
--- team/jdixon/chan_usbradio-1.4/dev-1.0/apps/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/dev-1.0/apps/app_rpt.c Wed Oct 15 16:41:35 2008
@@ -21,9 +21,9 @@
*/
/*! \file
*
- * \brief Radio Repeater / Remote Base program
- * version 0.909 (1.0-dev4) 8/18/08
- *
+ * \brief Radio Repeater / Remote Base program
+ * version 0.910 (1.0-dev10) 10/15/08
+ *
* \author Jim Dixon, WB6NIL <jim at lambdatel.com>
*
* \note Serious contributions by Steve RoDgers, WA6ZFT <hwstar at rodgers.sdcoxmail.com>
@@ -37,7 +37,7 @@
* Normal mode:
* See the function list in rpt.conf (autopatchup, autopatchdn)
* autopatchup can optionally take comma delimited setting=value pairs:
- *
+ *
*
* context=string : Override default context with "string"
* dialtime=ms : Specify the max number of milliseconds between phone number digits (1000 milliseconds = 1 second)
@@ -81,7 +81,7 @@
* 17 - User functions (time, id, etc) enable
* 18 - User functions (time, id, etc) disable
* 19 - Select alternate hang timer
- * 20 - Select standard hang timer
+ * 20 - Select standard hang timer
* 21 - Enable Parrot Mode
* 22 - Disable Parrot Mode
* 23 - Birdbath (Current Parrot Cleanup/Flush)
@@ -139,8 +139,10 @@
* 200 thru 215 - (Send DTMF 0-9,*,#,A-D) (200=0, 201=1, 210=*, etc)
*
* playback cmds:
- * specify the name of the file to be played (for example, 25=rpt/foo)
+ * specify the name of the file to be played globally (for example, 25=rpt/foo)
*
+ * localplay cmds:
+ * specify the name of the file to be played locally (for example, 25=rpt/foo)
*
* 'duplex' modes: (defaults to duplex=2)
*
@@ -266,6 +268,8 @@
#define MAXCONNECTTIME 5000
+#define MAXCONNECTTIME_IRLP 25000
+
#define MAXNODESTR 300
#define MAXNODELEN 16
@@ -298,17 +302,19 @@
#define ALLOW_LOCAL_CHANNELS
+#define EL_DB_ROOT "echolink"
+
enum {REM_OFF,REM_MONITOR,REM_TX};
#define TALKER_MAIN (struct rpt_link*)(0xFFFFFFFF)
enum{ID,PROC,TERM,COMPLETE,UNKEY,REMDISC,REMALREADY,REMNOTFOUND,REMGO,
CONNECTED,CONNFAIL,STATUS,TIMEOUT,ID1, STATS_TIME, PLAYBACK,
- STATS_VERSION, IDTALKOVER, ARB_ALPHA, TEST_TONE, REV_PATCH,
+ LOCALPLAY, STATS_VERSION, IDTALKOVER, ARB_ALPHA, TEST_TONE, REV_PATCH,
TAILMSG, MACRO_NOTFOUND, MACRO_BUSY, LASTNODEKEY, FULLSTATUS,
MEMNOTFOUND, INVFREQ, REMMODE, REMLOGIN, REMXXX, REMSHORTSTATUS,
REMLONGSTATUS, LOGINREQ, SCAN, SCANSTAT, TUNE, SETREMOTE, TOPKEY,
- TIMEOUT_WARNING, ACT_TIMEOUT_WARNING, LINKUNKEY, UNAUTHTX,
+ TIMEOUT_WARNING, ACT_TIMEOUT_WARNING, LINKUNKEY, UNAUTHTX, PARROT,
STATS_TIME_LOCAL};
@@ -377,6 +383,8 @@
#include "asterisk/cdr.h"
#include "asterisk/options.h"
#include "asterisk/manager.h"
+#include "asterisk/astdb.h"
+#include "asterisk/app.h"
#include "asterisk/indications.h"
#include <termios.h>
@@ -390,13 +398,13 @@
/*! Stop the tones from playing */
void ast_playtones_stop(struct ast_channel *chan);
-static char *tdesc = "Radio Repeater / Remote Base version 0.909 8/18/2008";
+static char *tdesc = "Radio Repeater / Remote Base version 0.910 10/15/2008";
static char *app = "Rpt";
static char *synopsis = "Radio Repeater/Remote Base Control System";
-static char *descrip =
+static char *descrip =
" Rpt(nodename[|options][|M][|*]): \n"
" Radio Remote Link or Remote Base Link Endpoint Process.\n"
"\n"
@@ -437,7 +445,7 @@
" funcchar (*) key on the telephone set. In addition, the transmitter\n"
" will turn off if the endchar (#) key is pressed. When a user first\n"
" calls in, the transmitter will be off, and the user can listen for\n"
-" radio traffic. When the user wants to transmit, they press the *\n"
+" radio traffic. When the user wants to transmit, they press the *\n"
" key, start talking, then press the * key again or the # key to turn\n"
" the transmitter off. No other functions can be executed by the\n"
" user on the phone when this mode is selected. Note: If your\n"
@@ -481,7 +489,7 @@
static char *remote_rig_ic706="ic706";
static char *remote_rig_rtx150="rtx150";
static char *remote_rig_rtx450="rtx450";
-static char *remote_rig_ppp16="ppp16"; // parallel port programmable 16 channels
+static char *remote_rig_ppp16="ppp16"; // parallel port programmable 16 channels
#define ISRIG_RTX(x) ((!strcmp(x,remote_rig_rtx150)) || (!strcmp(x,remote_rig_rtx450)))
#define IS_XPMR(x) (!strncasecmp(x->rxchanname,"rad",3))
@@ -527,7 +535,7 @@
struct ast_channel *chan;
char cmode;
#ifdef OLD_ASTERISK
- AST_LIST_HEAD(, ast_frame) telq;
+ AST_LIST_HEAD(, ast_frame) telq;
#else
AST_LIST_HEAD_NOLOCK(, ast_frame) telq;
#endif
@@ -582,10 +590,11 @@
struct rpt_link *prev;
struct rpt_mixer_sample conf_sample;
char mode; /* 1 if in tx mode */
- char ready;
+ char ready;
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;
@@ -601,7 +610,7 @@
char killme;
long elaptime;
long disctime;
- long retrytimer;
+ long retrytimer;
long retxtimer;
long rerxtimer;
int retries;
@@ -625,12 +634,12 @@
struct ast_trans_pvt *read_path;
struct ast_trans_pvt *write_path;
#ifdef OLD_ASTERISK
- AST_LIST_HEAD(, ast_frame) rxq;
+ AST_LIST_HEAD(, ast_frame) rxq;
#else
AST_LIST_HEAD_NOLOCK(, ast_frame) rxq;
#endif
#ifdef OLD_ASTERISK
- AST_LIST_HEAD(, rpt_linkrx) linq;
+ AST_LIST_HEAD(, rpt_linkrx) linq;
#else
AST_LIST_HEAD_NOLOCK(, rpt_linkrx) linq;
#endif
@@ -671,14 +680,14 @@
struct function_table_tag
{
char action[ACTIONSIZE];
- int (*function)(struct rpt *myrpt, char *param, char *digitbuf,
+ int (*function)(struct rpt *myrpt, char *param, char *digitbuf,
int command_source, struct rpt_link *mylink);
} ;
/* Used to store the morse code patterns */
struct morse_bits
-{
+{
int len;
int ddcomb;
} ;
@@ -724,9 +733,9 @@
ast_mutex_t statpost_lock;
struct ast_config *cfg;
char reload;
- char xlink; // cross link state of a share repeater/remote radio
+ char xlink; // cross link state of a share repeater/remote radio
char firstone;
- char ready;
+ char ready;
unsigned int statpost_seqno;
char *name;
@@ -881,7 +890,7 @@
int link_longestfunc;
int longestfunc;
int longestnode;
- int threadrestarts;
+ int threadrestarts;
int tailmessagen;
time_t disgorgetime;
time_t lastthreadrestarttime;
@@ -897,7 +906,7 @@
time_t start_time,last_activity_time;
char lasttone[32];
struct rpt_tele *active_telem;
- struct rpt_topkey topkey[TOPKEYN];
+ struct rpt_topkey topkey[TOPKEYN];
int topkeystate;
time_t topkeytime;
int topkeylong;
@@ -905,8 +914,8 @@
char wasvox;
int voxtotimer;
char voxtostate;
- int linkposttimer;
- int keyposttimer;
+ int linkposttimer;
+ int keyposttimer;
char newkey;
char inpadtest;
struct rpt_mixer_sample pconf_sample;
@@ -919,7 +928,7 @@
struct ast_trans_pvt *read_path;
struct ast_trans_pvt *write_path;
#ifdef OLD_ASTERISK
- AST_LIST_HEAD(, rpt_linkrx) inq;
+ AST_LIST_HEAD(, rpt_linkrx) inq;
#else
AST_LIST_HEAD_NOLOCK(, rpt_linkrx) inq;
#endif
@@ -954,7 +963,7 @@
unsigned short lastunit;
#endif
struct rpt_cmd_struct cmdAction;
-} rpt_vars[MAXRPTS];
+} rpt_vars[MAXRPTS];
struct nodelog {
struct nodelog *next;
@@ -972,6 +981,7 @@
static int setrtx_check(struct rpt *myrpt);
static int channel_revert(struct rpt *myrpt);
static int channel_steer(struct rpt *myrpt, char *data);
+static void rpt_telemetry(struct rpt *myrpt,int mode, void *data);
AST_MUTEX_DEFINE_STATIC(nodeloglock);
@@ -1185,7 +1195,7 @@
ast_mutex_unlock(&nodeloglock);
}
-static struct ast_frame *rpt_translate(struct ast_trans_pvt *tr,
+static struct ast_frame *rpt_translate(struct ast_trans_pvt *tr,
struct ast_frame *f, int consume)
{
struct ast_frame *f1;
@@ -1261,7 +1271,7 @@
return;
}
-
+
static void rpt_mixer_voyeur(struct rpt_mixer *src,struct rpt_mixer *dst)
{
int i;
@@ -1282,18 +1292,18 @@
int n,x,ntalkers;
struct ast_frame fr;
struct rpt_link *talker;
- char buf[(RPT_MIXER_BLOCKSIZE * sizeof(short)) +
+ char buf[(RPT_MIXER_BLOCKSIZE * sizeof(short)) +
AST_FRIENDLY_OFFSET + 10],remrx,totx,remnomute;
struct timeval now;
struct rpt_link *l,*m;
struct ast_frame *f1;
struct rpt_linkrx *lf;
struct rpt_rxtelem *rxtelem;
-
+
for(n = 0; n < nrpts; n++)
{
if (!rpt_vars[n].ready) continue;
-#ifdef APP_RPT_LOCK_DEBUG
+#ifdef APP_RPT_LOCK_DEBUG
_rpt_mutex_lock(&rpt_vars[n].lock,&rpt_vars[n],__LINE__);
#else
rpt_mutex_lock(&rpt_vars[n].lock);
@@ -1308,8 +1318,8 @@
else
{
/* if this guy still talking, thats it */
- if (rpt_vars[n].talker &&
- (rpt_vars[n].talker->lastrx))
+ if (rpt_vars[n].talker &&
+ (rpt_vars[n].talker->lastrx))
talker = rpt_vars[n].talker;
}
ntalkers = 0;
@@ -1334,9 +1344,9 @@
lf = AST_LIST_REMOVE_HEAD(&rpt_vars[n].inq,linkrx_list);
rpt_mixer_put(&rpt_vars[n].conf,lf->flin->data,NULL);
ast_frfree(lf->flin);
- if (rpt_vars[n].talker == TALKER_MAIN)
+ if (rpt_vars[n].talker == TALKER_MAIN)
rpt_vars[n].fraw = lf->fraw;
- else
+ else
ast_frfree(lf->fraw);
ast_free(lf);
}
@@ -1357,11 +1367,11 @@
rpt_vars[n].pcq,&rpt_vars[n].pconf_sample);
rpt_vars[n].pcqflag = 0;
}
- /* go thru all links */
- if ((!rpt_vars[n].remote) && (rpt_vars[n].links.next != &rpt_vars[n].links))
- for(l = rpt_vars[n].links.next; l != &rpt_vars[n].links; l = l->next)
- {
- if (!l->chan) continue;
+ /* go thru all links */
+ if ((!rpt_vars[n].remote) && (rpt_vars[n].links.next != &rpt_vars[n].links))
+ for(l = rpt_vars[n].links.next; l != &rpt_vars[n].links; l = l->next)
+ {
+ if (!l->chan) continue;
if (!l->ready) continue;
if (l->lastrx)
{
@@ -1378,9 +1388,9 @@
lf = AST_LIST_REMOVE_HEAD(&l->linq,linkrx_list);
rpt_mixer_put(&rpt_vars[n].conf,lf->flin->data,&l->conf_sample);
ast_frfree(lf->flin);
- if (l == talker)
+ if (l == talker)
rpt_vars[n].fraw = lf->fraw;
- else
+ else
ast_frfree(lf->fraw);
ast_free(lf);
}
@@ -1391,9 +1401,9 @@
{
lf = AST_LIST_REMOVE_HEAD(&l->linq,linkrx_list);
ast_frfree(lf->flin);
- if (l == talker)
+ if (l == talker)
rpt_vars[n].fraw = lf->fraw;
- else
+ else
ast_frfree(lf->fraw);
free(lf);
}
@@ -1422,9 +1432,9 @@
}
rxtelem = rxtelem->qe_forw;
}
- if (rpt_vars[n].p.parrotmode &&
- (((rpt_vars[n].parrotstate == 1) &&
- ((rpt_vars[n].parrotcnt > PARROTMAX) ||
+ if (rpt_vars[n].p.parrotmode &&
+ (((rpt_vars[n].parrotstate == 1) &&
+ ((rpt_vars[n].parrotcnt > PARROTMAX) ||
(rpt_vars[n].parrottimer <= 0)))
|| (rpt_vars[n].parrotstate == 2)))
{
@@ -1432,21 +1442,21 @@
rpt_vars[n].parrotstate = 2;
rpt_vars[n].parrotcnt = 0;
f1 = AST_LIST_REMOVE_HEAD(&rpt_vars[n].parrotq,frame_list);
- if (f1)
+ if (f1)
{
f2 = rpt_translate(rpt_vars[n].parrotout_path,f1,1);
rpt_mixer_put(&rpt_vars[n].txconf,f2->data,NULL);
ast_frfree(f2);
- }
+ }
else
{
rpt_vars[n].parrotstate = 0;
}
- }
- rpt_mixer_voyeur(&rpt_vars[n].conf,&rpt_vars[n].txconf);
- rpt_mixer_next(&rpt_vars[n].conf);
- rpt_mixer_next(&rpt_vars[n].txconf);
-#ifdef APP_RPT_LOCK_DEBUG
+ }
+ rpt_mixer_voyeur(&rpt_vars[n].conf,&rpt_vars[n].txconf);
+ rpt_mixer_next(&rpt_vars[n].conf);
+ rpt_mixer_next(&rpt_vars[n].txconf);
+#ifdef APP_RPT_LOCK_DEBUG
_rpt_mutex_unlock(&rpt_vars[n].lock,&rpt_vars[n],__LINE__);
#else
rpt_mutex_unlock(&rpt_vars[n].lock);
@@ -1466,23 +1476,23 @@
for(n = 0; n < nrpts; n++)
{
if (!rpt_vars[n].ready) continue;
-#ifdef APP_RPT_LOCK_DEBUG
+#ifdef APP_RPT_LOCK_DEBUG
_rpt_mutex_lock(&rpt_vars[n].lock,&rpt_vars[n],__LINE__);
#else
rpt_mutex_lock(&rpt_vars[n].lock);
#endif
- /* go thru all links */
- if ((!rpt_vars[n].remote) && (rpt_vars[n].links.next != &rpt_vars[n].links))
- for(l = rpt_vars[n].links.next; l != &rpt_vars[n].links; l = l->next)
- {
- if (!l || !l->chan) continue;
+ /* go thru all links */
+ if ((!rpt_vars[n].remote) && (rpt_vars[n].links.next != &rpt_vars[n].links))
+ for(l = rpt_vars[n].links.next; l != &rpt_vars[n].links; l = l->next)
+ {
+ if (!l || !l->chan) continue;
if (!l->ready) continue;
- rpt_mixer_next_sample(&l->conf_sample);
- }
- rpt_mixer_get(&rpt_vars[n].txconf,fr.data,NULL);
+ rpt_mixer_next_sample(&l->conf_sample);
+ }
+ rpt_mixer_get(&rpt_vars[n].txconf,fr.data,NULL);
if ((!rpt_vars[n].remote) && (rpt_vars[n].p.duplex < 2))
{
- if (rpt_vars[n].txrealkeyed)
+ if (rpt_vars[n].txrealkeyed)
{
if ((!rpt_vars[n].myfirsttx) && rpt_vars[n].callmode)
{
@@ -1509,7 +1519,7 @@
{
char doraw = 0;
- f1 = AST_LIST_REMOVE_HEAD(&rpt_vars[n].txq,
+ f1 = AST_LIST_REMOVE_HEAD(&rpt_vars[n].txq,
frame_list);
if (rpt_vars[n].p.mixmode && rpt_vars[n].talker)
@@ -1521,11 +1531,11 @@
if ((!rpt_vars[n].keyed) && (rpt_vars[n].ntalkers < 1)) doraw = 0;
if (rpt_vars[n].fraw == NULL) doraw = 0;
if (rpt_vars[n].talker && (rpt_vars[n].talker != TALKER_MAIN) &&
- (rpt_vars[n].txchannel->writeformat !=
+ (rpt_vars[n].txchannel->writeformat !=
rpt_vars[n].talker->chan->readformat)) doraw = 0;
if (doraw) /* output raw */
- {
+ {
ast_write(rpt_vars[n].txchannel,rpt_vars[n].fraw);
}
else /* output linearly */
@@ -1533,7 +1543,7 @@
struct ast_frame *f2;
f2 = rpt_translate(rpt_vars[n].write_path,f1,0);
- ast_write(rpt_vars[n].txchannel,f2);
+ ast_write(rpt_vars[n].txchannel,f2);
ast_frfree(f2);
}
if (rpt_vars[n].p.parrotmode && (
@@ -1546,7 +1556,7 @@
AST_LIST_INSERT_TAIL(&rpt_vars[n].parrotq,
f1,frame_list);
rpt_vars[n].parrotcnt++;
- } else ast_frfree(f1);
+ } else ast_frfree(f1);
}
}
else
@@ -1564,17 +1574,17 @@
if ((!rpt_vars[n].keyed) && (rpt_vars[n].ntalkers < 1)) doraw = 0;
if (rpt_vars[n].fraw == NULL) doraw = 0;
if (rpt_vars[n].talker && (rpt_vars[n].talker != TALKER_MAIN) &&
- (rpt_vars[n].txchannel->writeformat !=
+ (rpt_vars[n].txchannel->writeformat !=
rpt_vars[n].talker->chan->readformat)) doraw = 0;
if (doraw) /* output raw */
- {
+ {
ast_write(rpt_vars[n].txchannel,rpt_vars[n].fraw);
}
else /* output linearly */
{
f1 = rpt_translate(rpt_vars[n].write_path,&fr,0);
- ast_write(rpt_vars[n].txchannel,f1);
+ ast_write(rpt_vars[n].txchannel,f1);
ast_frfree(f1);
}
}
@@ -1582,7 +1592,7 @@
{
ast_write(rpt_vars[n].remchannel,&fr);
}
- if (rpt_vars[n].p.parrotmode &&
+ if (rpt_vars[n].p.parrotmode &&
(rpt_vars[n].parrotstate == 1))
{
struct ast_frame *f2;
@@ -1600,20 +1610,20 @@
if ((!rpt_vars[n].remote) && (rpt_vars[n].pchannel && rpt_vars[n].callmode))
{
rpt_mixer_next_sample(&rpt_vars[n].pconf_sample);
- rpt_mixer_get(&rpt_vars[n].conf,fr.data,
+ rpt_mixer_get(&rpt_vars[n].conf,fr.data,
&rpt_vars[n].pconf_sample);
- ast_write(rpt_vars[n].pchannel,&fr);
- }
- /* go thru all links */
- if ((!rpt_vars[n].remote) && (rpt_vars[n].links.next != &rpt_vars[n].links))
- for(l = rpt_vars[n].links.next; l != &rpt_vars[n].links; l = l->next)
- {
+ ast_write(rpt_vars[n].pchannel,&fr);
+ }
+ /* go thru all links */
+ if ((!rpt_vars[n].remote) && (rpt_vars[n].links.next != &rpt_vars[n].links))
+ for(l = rpt_vars[n].links.next; l != &rpt_vars[n].links; l = l->next)
+ {
char doraw = 0;
- if (!l->chan) continue;
+ if (!l->chan) continue;
if (!l->ready) continue;
- rpt_mixer_get(&rpt_vars[n].conf,fr.data,
- &l->conf_sample);
+ rpt_mixer_get(&rpt_vars[n].conf,fr.data,
+ &l->conf_sample);
if (rpt_vars[n].p.mixmode && rpt_vars[n].talker)
{
@@ -1628,34 +1638,34 @@
{
if (rpt_vars[n].talker == TALKER_MAIN)
{
- if (l->chan->writeformat !=
+ if (l->chan->writeformat !=
rpt_vars[n].txchannel->writeformat) doraw = 0;
}
else
- {
- if (l->chan->writeformat !=
+ {
+ if (l->chan->writeformat !=
rpt_vars[n].talker->chan->readformat) doraw = 0;
}
}
if (l->name[0] == '0') doraw = 0;
if (l->phonemode) doraw = 0;
if (doraw) /* output raw */
- {
+ {
ast_write(l->chan,rpt_vars[n].fraw);
}
else /* output linearly */
{
f1 = rpt_translate(l->write_path,&fr,0);
- ast_write(l->chan,f1);
+ ast_write(l->chan,f1);
ast_frfree(f1);
}
- }
+ }
if (rpt_vars[n].fraw)
{
ast_frfree(rpt_vars[n].fraw);
rpt_vars[n].fraw = NULL;
- }
-#ifdef APP_RPT_LOCK_DEBUG
+ }
+#ifdef APP_RPT_LOCK_DEBUG
_rpt_mutex_unlock(&rpt_vars[n].lock,&rpt_vars[n],__LINE__);
#else
rpt_mutex_unlock(&rpt_vars[n].lock);
@@ -1665,14 +1675,14 @@
{
if (!rpt_vars[n].ready) continue;
if (rpt_vars[n].remote) continue;
-#ifdef APP_RPT_LOCK_DEBUG
+#ifdef APP_RPT_LOCK_DEBUG
_rpt_mutex_lock(&rpt_vars[n].lock,&rpt_vars[n],__LINE__);
#else
rpt_mutex_lock(&rpt_vars[n].lock);
#endif
- /* go thru all links */
- if (rpt_vars[n].links.next != &rpt_vars[n].links)
- for(l = rpt_vars[n].links.next; l != &rpt_vars[n].links; l = l->next)
+ /* go thru all links */
+ if (rpt_vars[n].links.next != &rpt_vars[n].links)
+ for(l = rpt_vars[n].links.next; l != &rpt_vars[n].links; l = l->next)
{
remrx = 0;
/* see if any other links are receiving */
@@ -1688,10 +1698,10 @@
(ast_tvdiff_ms(now,l->lastlinktv) >= 19))
{
l->lastlinktv = now;
- remnomute = rpt_vars[n].localtx &&
- (!(rpt_vars[n].cmdnode[0] ||
+ remnomute = rpt_vars[n].localtx &&
+ (!(rpt_vars[n].cmdnode[0] ||
(rpt_vars[n].dtmfidx > -1)));
- totx = (((l->isremote) ? (remnomute) :
+ totx = (((l->isremote) ? (remnomute) :
rpt_vars[n].exttx) || remrx) && l->mode;
if (l->phonemode == 0 && l->chan && (l->lasttx != totx))
{
@@ -1717,7 +1727,7 @@
l->lasttx = totx;
}
}
-#ifdef APP_RPT_LOCK_DEBUG
+#ifdef APP_RPT_LOCK_DEBUG
_rpt_mutex_unlock(&rpt_vars[n].lock,&rpt_vars[n],__LINE__);
#else
rpt_mutex_unlock(&rpt_vars[n].lock);
@@ -1737,7 +1747,7 @@
if(!strcmp(myrpt->remoterig, remote_rig_ic706))
return 1;
return 0;
-}
+}
static void voxinit_rpt(struct rpt *myrpt,char enable)
{
@@ -1778,7 +1788,7 @@
float esquare = 0.0;
float energy = 0.0;
float threshold = 0.0;
-
+
if (v->voxena < 0) return(v->lastvox);
for(i = 0; i < bs; i++)
{
@@ -1795,7 +1805,7 @@
v->noise_energy += (energy - v->noise_energy) / 64;
else
v->noise_energy += (energy - v->noise_energy) / 4;
-
+
if (v->voxena) threshold = v->speech_energy / 8;
else
{
@@ -1807,7 +1817,7 @@
{
if (v->voxena) v->noise_energy *= 0.75;
v->voxena = 1;
- } else v->voxena = 0;
+ } else v->voxena = 0;
if (v->lastvox != v->voxena)
{
if (v->enacount++ >= ((v->lastvox) ? v->offdebcnt : v->ondebcnt))
@@ -1835,6 +1845,8 @@
static int rpt_do_local_nodes(int fd, int argc, char *argv[]);
static int rpt_do_reload(int fd, int argc, char *argv[]);
static int rpt_do_restart(int fd, int argc, char *argv[]);
+static int rpt_do_playback(int fd, int argc, char *argv[]);
+static int rpt_do_localplay(int fd, int argc, char *argv[]);
static int rpt_do_fun(int fd, int argc, char *argv[]);
static int rpt_do_fun1(int fd, int argc, char *argv[]);
static int rpt_do_cmd(int fd, int argc, char *argv[]);
@@ -1871,6 +1883,14 @@
"Usage: rpt restart\n"
" Restarts app_rpt\n";
+static char playback_usage[] =
+"Usage: rpt playback <nodename> <sound_file_base_name>\n"
+" Send an Audio File to a node, send to all other connected nodes (global)\n";
+
+static char localplay_usage[] =
+"Usage: rpt localplay <nodename> <sound_file_base_name>\n"
+" Send an Audio File to a node, do not send to other connected nodes (local)\n";
+
static char fun_usage[] =
"Usage: rpt fun <nodename> <command>\n"
" Send a DTMF function to a node\n";
@@ -1882,47 +1902,55 @@
#ifndef NEW_ASTERISK
static struct ast_cli_entry cli_debug =
- { { "rpt", "debug", "level" }, rpt_do_debug,
+ { { "rpt", "debug", "level" }, rpt_do_debug,
"Enable app_rpt debugging", debug_usage };
static struct ast_cli_entry cli_dump =
- { { "rpt", "dump" }, rpt_do_dump,
+ { { "rpt", "dump" }, rpt_do_dump,
"Dump app_rpt structs for debugging", dump_usage };
static struct ast_cli_entry cli_stats =
- { { "rpt", "stats" }, rpt_do_stats,
+ { { "rpt", "stats" }, rpt_do_stats,
"Dump node statistics", dump_stats };
static struct ast_cli_entry cli_nodes =
- { { "rpt", "nodes" }, rpt_do_nodes,
+ { { "rpt", "nodes" }, rpt_do_nodes,
"Dump node list", dump_nodes };
static struct ast_cli_entry cli_local_nodes =
- { { "rpt", "localnodes" }, rpt_do_local_nodes,
+ { { "rpt", "localnodes" }, rpt_do_local_nodes,
"Dump list of local node numbers", usage_local_nodes };
static struct ast_cli_entry cli_lstats =
- { { "rpt", "lstats" }, rpt_do_lstats,
+ { { "rpt", "lstats" }, rpt_do_lstats,
"Dump link statistics", dump_lstats };
static struct ast_cli_entry cli_reload =
- { { "rpt", "reload" }, rpt_do_reload,
+ { { "rpt", "reload" }, rpt_do_reload,
"Reload app_rpt config", reload_usage };
static struct ast_cli_entry cli_restart =
- { { "rpt", "restart" }, rpt_do_restart,
+ { { "rpt", "restart" }, rpt_do_restart,
"Restart app_rpt", restart_usage };
+static struct ast_cli_entry cli_playback =
+ { { "rpt", "playback" }, rpt_do_playback,
+ "Play Back an Audio File Globally", playback_usage };
+
+static struct ast_cli_entry cli_localplay =
+ { { "rpt", "localplay" }, rpt_do_localplay,
+ "Play Back an Audio File Locally", localplay_usage };
+
static struct ast_cli_entry cli_fun =
- { { "rpt", "fun" }, rpt_do_fun,
+ { { "rpt", "fun" }, rpt_do_fun,
"Execute a DTMF function", fun_usage };
static struct ast_cli_entry cli_fun1 =
- { { "rpt", "fun1" }, rpt_do_fun1,
+ { { "rpt", "fun1" }, rpt_do_fun1,
"Execute a DTMF function", fun_usage };
static struct ast_cli_entry cli_cmd =
- { { "rpt", "cmd" }, rpt_do_cmd,
+ { { "rpt", "cmd" }, rpt_do_cmd,
"Execute a DTMF function", cmd_usage };
#endif
@@ -1973,6 +2001,8 @@
static int function_remote(struct rpt *myrpt, char *param, char *digitbuf, int command_source, struct rpt_link *mylink);
static int function_macro(struct rpt *myrpt, char *param, char *digitbuf, int command_source, struct rpt_link *mylink);
static int function_playback(struct rpt *myrpt, char *param, char *digitbuf, int command_source, struct rpt_link *mylink);
+static int function_localplay(struct rpt *myrpt, char *param, char *digitbuf, int command_source, struct rpt_link *mylink);
+
/*
* Function table
*/
@@ -1985,7 +2015,8 @@
{"status", function_status},
{"remote", function_remote},
{"macro", function_macro},
- {"playback", function_playback}
+ {"playback", function_playback},
+ {"localplay", function_localplay}
} ;
static long diskavail(struct rpt *myrpt)
@@ -2037,7 +2068,7 @@
{
struct rpt_link *l;
char *reverse_patch_state;
- int numoflinks;
+ int numoflinks;
reverse_patch_state = "DOWN";
numoflinks = 0;
@@ -2054,7 +2085,7 @@
// continue;
//}
numoflinks++;
-
+
l = l->next;
}
if (debug) ast_log(LOG_DEBUG, "numoflinks=%i\n",numoflinks);
@@ -2075,13 +2106,13 @@
val = (char *) ast_variable_retrieve(myrpt->cfg, myrpt->p.memory, memory);
if (!val){
return -1;
- }
+ }
strncpy(tmp,val,sizeof(tmp) - 1);
tmp[sizeof(tmp)-1] = 0;
s = strchr(tmp,',');
if (!s)
- return 1;
+ return 1;
*s++ = 0;
s1 = strchr(s,',');
if (!s1)
@@ -2100,7 +2131,7 @@
case 'a':
strcpy(myrpt->rxpl, "100.0");
strcpy(myrpt->txpl, "100.0");
- myrpt->remmode = REM_MODE_AM;
+ myrpt->remmode = REM_MODE_AM;
break;
case 'B':
case 'b':
@@ -2114,35 +2145,35 @@
case 'L':
case 'l':
myrpt->powerlevel = REM_LOWPWR;
- break;
+ break;
case 'H':
case 'h':
myrpt->powerlevel = REM_HIPWR;
break;
-
+
case 'M':
case 'm':
myrpt->powerlevel = REM_MEDPWR;
break;
-
+
case '-':
myrpt->offset = REM_MINUS;
break;
-
+
case '+':
myrpt->offset = REM_PLUS;
break;
-
+
case 'S':
case 's':
myrpt->offset = REM_SIMPLEX;
break;
-
+
case 'T':
case 't':
myrpt->txplon = 1;
break;
-
+
case 'R':
case 'r':
myrpt->rxplon = 1;
@@ -2189,23 +2220,23 @@
/* go thru all the links */
while(l != &myrpt->links)
{
- if (!l->phonemode)
- {
- l = l->next;
- continue;
- }
- /* dont send to self */
- if (mylink && (l == mylink))
- {
- l = l->next;
- continue;
- }
+ if (!l->phonemode)
+ {
+ l = l->next;
+ continue;
+ }
+ /* dont send to self */
+ if (mylink && (l == mylink))
+ {
+ l = l->next;
+ continue;
+ }
#ifdef NEW_ASTERISK
- if (l->chan) ast_senddigit(l->chan,c,0);
+ if (l->chan) ast_senddigit(l->chan,c,0);
#else
- if (l->chan) ast_senddigit(l->chan,c);
+ if (l->chan) ast_senddigit(l->chan,c);
#endif
- l = l->next;
+ l = l->next;
}
return;
}
@@ -2237,7 +2268,7 @@
if (c)
{
snprintf(myrpt->dtmf_local_str + strlen(myrpt->dtmf_local_str),sizeof(myrpt->dtmf_local_str) - 1,"%c",c);
- if (!myrpt->dtmf_local_timer)
+ if (!myrpt->dtmf_local_timer)
myrpt->dtmf_local_timer = DTMF_LOCAL_STARTTIME;
}
/* if at timeout */
@@ -2258,18 +2289,25 @@
}
myrpt->dtmf_local_str[i - 1] = 0;
myrpt->dtmf_local_timer = DTMF_LOCAL_TIME;
- rpt_mutex_unlock(&myrpt->lock);
- if (digit >= '0' && digit <='9')
- ast_playtones_start(myrpt->txchannel, 0, dtmf_tones[digit-'0'], 0);
- else if (digit >= 'A' && digit <= 'D')
- ast_playtones_start(myrpt->txchannel, 0, dtmf_tones[digit-'A'+10], 0);
- else if (digit == '*')
- ast_playtones_start(myrpt->txchannel, 0, dtmf_tones[14], 0);
- else if (digit == '#')
- ast_playtones_start(myrpt->txchannel, 0, dtmf_tones[15], 0);
- else {
- /* not handled */
- ast_log(LOG_DEBUG, "Unable to generate DTMF tone '%c' for '%s'\n", digit, myrpt->txchannel->name);
+
+ if (!strncasecmp(myrpt->txchannel->name,"rtpdir",6))
+ {
+ ast_senddigit(myrpt->txchannel,digit);
+ }
+ else
+ {
+ if (digit >= '0' && digit <='9')
+ ast_playtones_start(myrpt->txchannel, 0, dtmf_tones[digit-'0'], 0);
+ else if (digit >= 'A' && digit <= 'D')
+ ast_playtones_start(myrpt->txchannel, 0, dtmf_tones[digit-'A'+10], 0);
+ else if (digit == '*')
+ ast_playtones_start(myrpt->txchannel, 0, dtmf_tones[14], 0);
+ else if (digit == '#')
+ ast_playtones_start(myrpt->txchannel, 0, dtmf_tones[15], 0);
+ else {
+ /* not handled */
+ ast_log(LOG_DEBUG, "Unable to generate DTMF tone '%c' for '%s'\n", digit, myrpt->txchannel->name);
+ }
}
rpt_mutex_lock(&myrpt->lock);
}
@@ -2325,23 +2363,23 @@
#ifndef SOLARIS
cfmakeraw(&mode);
#else
- mode.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
- |INLCR|IGNCR|ICRNL|IXON);
- mode.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
- mode.c_cflag &= ~(CSIZE|PARENB|CRTSCTS);
- mode.c_cflag |= CS8;
+ mode.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
+ |INLCR|IGNCR|ICRNL|IXON);
+ mode.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
+ mode.c_cflag &= ~(CSIZE|PARENB|CRTSCTS);
+ mode.c_cflag |= CS8;
mode.c_cc[VTIME] = 3;
- mode.c_cc[VMIN] = 1;
+ mode.c_cc[VMIN] = 1;
#endif
cfsetispeed(&mode, B9600);
cfsetospeed(&mode, B9600);
- if (tcsetattr(fd, TCSANOW, &mode))
+ if (tcsetattr(fd, TCSANOW, &mode))
ast_log(LOG_WARNING, "Unable to set serial parameters on %s: %s\n", fname, strerror(errno));
- if(!strcmp(myrpt->remoterig, remote_rig_kenwood)) setdtr(fd,0);
+ if(!strcmp(myrpt->remoterig, remote_rig_kenwood)) setdtr(fd,0);
usleep(100000);
if (debug)ast_log(LOG_NOTICE,"Opened serial port %s\n",fname);
- return(fd);
+ return(fd);
}
static void mdc1200_notify(struct rpt *myrpt,char *fromnode, unsigned int unit)
@@ -2381,13 +2419,13 @@
/* otherwise, send it to all of em */
while(l != &myrpt->links)
{
- if (l->name[0] == '0')
+ if (l->name[0] == '0')
{
l = l->next;
continue;
}
wf.data = str;
- if (l->chan) ast_write(l->chan,&wf);
+ if (l->chan) ast_write(l->chan,&wf);
l = l->next;
}
return;
@@ -2457,54 +2495,54 @@
* strp- list of pointers to substrings (this is built by this function), NULL will be placed at end of list
* limit- maximum number of substrings to process
*/
-
+
static int finddelim(char *str, char *strp[], int limit)
{
int i,l,inquo;
- inquo = 0;
- i = 0;
- strp[i++] = str;
- if (!*str)
- {
- strp[0] = 0;
- return(0);
- }
- for(l = 0; *str && (l < limit) ; str++)
- {
- if (*str == QUOTECHR)
- {
- if (inquo)
- {
- *str = 0;
- inquo = 0;
- }
- else
- {
- strp[i - 1] = str + 1;
- inquo = 1;
- }
- }
- if ((*str == DELIMCHR) && (!inquo))
- {
- *str = 0;
+ inquo = 0;
+ i = 0;
+ strp[i++] = str;
+ if (!*str)
+ {
+ strp[0] = 0;
+ return(0);
+ }
+ for(l = 0; *str && (l < limit) ; str++)
+ {
+ if (*str == QUOTECHR)
+ {
+ if (inquo)
+ {
+ *str = 0;
+ inquo = 0;
+ }
+ else
+ {
+ strp[i - 1] = str + 1;
+ inquo = 1;
+ }
+ }
+ if ((*str == DELIMCHR) && (!inquo))
+ {
+ *str = 0;
l++;
- strp[i++] = str + 1;
- }
- }
- strp[i] = 0;
- return(i);
+ strp[i++] = str + 1;
+ }
+ }
+ strp[i] = 0;
+ return(i);
}
/*
send asterisk frame text message on the current tx channel
*/
-static int send_usb_txt(struct rpt *myrpt, char *txt)
+static int send_usb_txt(struct rpt *myrpt, char *txt)
{
struct ast_frame wf;
-
+
if (debug)ast_log(LOG_NOTICE, "send_usb_txt %s\n",txt);
wf.frametype = AST_FRAME_TEXT;
wf.subclass = 0;
@@ -2513,7 +2551,7 @@
wf.datalen = strlen(txt) + 1;
wf.data = txt;
wf.samples = 0;
- ast_write(myrpt->txchannel,&wf);
+ ast_write(myrpt->txchannel,&wf);
return 0;
}
/* must be called locked */
@@ -2536,7 +2574,7 @@
/* figure out mode to report */
mode = 'T'; /* use Tranceive by default */
if (!l->mode) mode = 'R'; /* indicate RX for our mode */
- if (!l->thisconnected) mode = 'C'; /* indicate connecting */
+ if (!l->thisconnected) mode = 'C'; /* indicate connecting */
spos = strlen(buf); /* current buf size (b4 we add our stuff) */
if (spos)
{
@@ -2650,7 +2688,7 @@
return(NULL);
}
- /* determine longest node length again */
+ /* determine longest node length again */
longestnode = 0;
vp = ast_variable_browse(myrpt->cfg, myrpt->p.nodes);
while(vp){
@@ -2692,7 +2730,7 @@
if(!strncmp(string, keywords[i], ls)){
if(param)
*param = string + ls;
- return i + 1;
+ return i + 1;
}
}
*param = NULL;
@@ -2706,7 +2744,7 @@
static char *skipchars(char *string, char *charlist)
{
-int i;
+int i;
while(*string){
for(i = 0; charlist[i] ; i++){
if(*string == charlist[i]){
@@ -2718,8 +2756,8 @@
return string;
}
return string;
-}
-
+}
+
static int myatoi(char *str)
@@ -2766,10 +2804,10 @@
f = &myrpt->filters[j];
if (!*f->desc) continue;
f->x0 = f->x1; f->x1 = f->x2;
- f->x2 = ((float)buf[i]) / f->gain;
- f->y0 = f->y1; f->y1 = f->y2;
- f->y2 = (f->x0 + f->x2) + f->const0 * f->x1
- + (f->const1 * f->y0) + (f->const2 * f->y1);
+ f->x2 = ((float)buf[i]) / f->gain;
+ f->y0 = f->y1; f->y1 = f->y2;
+ f->y2 = (f->x0 + f->x2) + f->const0 * f->x1
+ + (f->const1 * f->y0) + (f->const2 * f->y1);
buf[i] = (short)f->y2;
}
}
@@ -2785,7 +2823,7 @@
If /etc/localtime is not present, you will get
GMT time! This is especially important on systems
running embedded linux distributions as they don't usually
- have support for locales.
+ have support for locales.
If OLD_ASTERISK is defined, then the older localtime_r
function will be used. The /etc/localtime file is not
@@ -2818,31 +2856,31 @@
/* Retrieve an int from a config file */
-
+
static int retrieve_astcfgint(struct rpt *myrpt,char *category, char *name, int min, int max, int defl)
{
- char *var;
- int ret;
+ char *var;
+ int ret;
char include_zero = 0;
if(min < 0){ /* If min is negative, this means include 0 as a valid entry */
min = -min;
include_zero = 1;
- }
-
- var = (char *) ast_variable_retrieve(myrpt->cfg, category, name);
- if(var){
- ret = myatoi(var);
+ }
+
+ var = (char *) ast_variable_retrieve(myrpt->cfg, category, name);
+ if(var){
+ ret = myatoi(var);
if(include_zero && !ret)
return 0;
- if(ret < min)
- ret = min;
- if(ret > max)
- ret = max;
- }
- else
- ret = defl;
- return ret;
+ if(ret < min)
+ ret = min;
+ if(ret > max)
+ ret = max;
+ }
+ else
+ ret = defl;
+ return ret;
}
@@ -2869,12 +2907,12 @@
#endif
if (!cfg) {
ast_mutex_unlock(&rpt_vars[n].lock);
- ast_log(LOG_NOTICE, "Unable to open radio repeater configuration rpt.conf. Radio Repeater disabled.\n");
+ ast_log(LOG_NOTICE, "Unable to open radio repeater configuration rpt.conf. Radio Repeater disabled.\n");
pthread_exit(NULL);
}
- rpt_vars[n].cfg = cfg;
+ rpt_vars[n].cfg = cfg;
this = rpt_vars[n].name;
- memset(&rpt_vars[n].p,0,sizeof(rpt_vars[n].p));
+ memset(&rpt_vars[n].p,0,sizeof(rpt_vars[n].p));
if (init)
{
char *cp;
@@ -2891,7 +2929,7 @@
rpt_vars[n].links.prev = &rpt_vars[n].links;
rpt_vars[n].rpt_thread = AST_PTHREADT_NULL;
rpt_vars[n].tailmessagen = 0;
- rpt_vars[n].parrotin_path =
+ rpt_vars[n].parrotin_path =
ast_translator_build_path(AST_FORMAT_G726,AST_FORMAT_SLINEAR);
if (!rpt_vars[n].parrotin_path)
{
@@ -2899,7 +2937,7 @@
ast_log(LOG_NOTICE,"Unable to build path for parrot mode\n");
pthread_exit(NULL);
}
- rpt_vars[n].parrotout_path =
+ rpt_vars[n].parrotout_path =
ast_translator_build_path(AST_FORMAT_SLINEAR,AST_FORMAT_G726);
if (!rpt_vars[n].parrotout_path)
{
@@ -2945,10 +2983,10 @@
val = (char *) ast_variable_retrieve(cfg,this,"statpost_program");
if (val) rpt_vars[n].p.statpost_program = val;
else rpt_vars[n].p.statpost_program = STATPOST_PROGRAM;
- rpt_vars[n].p.statpost_url =
+ rpt_vars[n].p.statpost_url =
(char *) ast_variable_retrieve(cfg,this,"statpost_url");
- rpt_vars[n].p.tailmessagetime = retrieve_astcfgint(&rpt_vars[n],this, "tailmessagetime", 0, 2400000, 0);
- rpt_vars[n].p.tailsquashedtime = retrieve_astcfgint(&rpt_vars[n],this, "tailsquashedtime", 0, 2400000, 0);
+ rpt_vars[n].p.tailmessagetime = retrieve_astcfgint(&rpt_vars[n],this, "tailmessagetime", 0, 2400000, 0);
+ rpt_vars[n].p.tailsquashedtime = retrieve_astcfgint(&rpt_vars[n],this, "tailsquashedtime", 0, 2400000, 0);
rpt_vars[n].p.duplex = retrieve_astcfgint(&rpt_vars[n],this,"duplex",0,4,2);
rpt_vars[n].p.idtime = retrieve_astcfgint(&rpt_vars[n],this, "idtime", -60000, 2400000, IDTIME); /* Enforce a min max including zero */
rpt_vars[n].p.politeid = retrieve_astcfgint(&rpt_vars[n],this, "politeid", 30000, 300000, POLITEID); /* Enforce a min max */
@@ -2982,11 +3020,11 @@
{
val = FUNCTIONS;
rpt_vars[n].p.simple = 1;
- }
+ }
rpt_vars[n].p.functions = val;
val = (char *) ast_variable_retrieve(cfg,this,"link_functions");
if (val) rpt_vars[n].p.link_functions = val;
- else
+ else
rpt_vars[n].p.link_functions = rpt_vars[n].p.functions;
val = (char *) ast_variable_retrieve(cfg,this,"phone_functions");
if (val) rpt_vars[n].p.phone_functions = val;
@@ -2995,11 +3033,11 @@
val = (char *) ast_variable_retrieve(cfg,this,"alt_functions");
if (val) rpt_vars[n].p.alt_functions = val;
val = (char *) ast_variable_retrieve(cfg,this,"funcchar");
- if (!val) rpt_vars[n].p.funcchar = FUNCCHAR; else
- rpt_vars[n].p.funcchar = *val;
+ if (!val) rpt_vars[n].p.funcchar = FUNCCHAR; else
+ rpt_vars[n].p.funcchar = *val;
val = (char *) ast_variable_retrieve(cfg,this,"endchar");
- if (!val) rpt_vars[n].p.endchar = ENDCHAR; else
- rpt_vars[n].p.endchar = *val;
+ if (!val) rpt_vars[n].p.endchar = ENDCHAR; else
+ rpt_vars[n].p.endchar = *val;
val = (char *) ast_variable_retrieve(cfg,this,"nobusyout");
if (val) rpt_vars[n].p.nobusyout = ast_true(val);
val = (char *) ast_variable_retrieve(cfg,this,"notelemtx");
@@ -3022,38 +3060,38 @@
val = (char *) ast_variable_retrieve(cfg,this,"archivedir");
if (val) rpt_vars[n].p.archivedir = val;
val = (char *) ast_variable_retrieve(cfg,this,"authlevel");
- if (val) rpt_vars[n].p.authlevel = atoi(val);
+ if (val) rpt_vars[n].p.authlevel = atoi(val);
else rpt_vars[n].p.authlevel = 0;
val = (char *) ast_variable_retrieve(cfg,this,"parrot");
if (val) rpt_vars[n].p.parrotmode = (ast_true(val) & 1) * 2;
else rpt_vars[n].p.parrotmode = 0;
val = (char *) ast_variable_retrieve(cfg,this,"parrottime");
- if (val) rpt_vars[n].p.parrottime = atoi(val);
+ if (val) rpt_vars[n].p.parrottime = atoi(val);
else rpt_vars[n].p.parrottime = PARROTTIME;
val = (char *) ast_variable_retrieve(cfg,this,"mixmode");
if (val) rpt_vars[n].p.mixmode = atoi(val);
val = (char *) ast_variable_retrieve(cfg,this,"rptnode");
rpt_vars[n].p.rptnode = val;
val = (char *) ast_variable_retrieve(cfg,this,"mars");
- if (val) rpt_vars[n].p.remote_mars = atoi(val);
+ if (val) rpt_vars[n].p.remote_mars = atoi(val);
else rpt_vars[n].p.remote_mars = 0;
val = (char *) ast_variable_retrieve(cfg,this,"monminblocks");
- if (val) rpt_vars[n].p.monminblocks = atol(val);
+ if (val) rpt_vars[n].p.monminblocks = atol(val);
[... 6924 lines stripped ...]
More information about the asterisk-commits
mailing list