summaryrefslogtreecommitdiff
path: root/ztcfg.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-05-04 03:20:08 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-05-04 03:20:08 +0000
commit89e2d0efedc95e1717c37c57a0cef6316a21b4cd (patch)
tree8f04d4b10ce3ef10f289d6fa1f12ae8d7a556980 /ztcfg.c
parentf7d84bc12d8ecf566ba67545344573ffd0954e54 (diff)
Add RBS support to DACS (bug #1451)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@384 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'ztcfg.c')
-rwxr-xr-xztcfg.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/ztcfg.c b/ztcfg.c
index 13160e9..8005c3f 100755
--- a/ztcfg.c
+++ b/ztcfg.c
@@ -376,7 +376,7 @@ static int chanconfig(char *keyword, char *args)
bzero(chans, sizeof(chans));
strtok(args, ":");
idle = strtok(NULL, ":");
- if (!strcasecmp(keyword, "dacs")) {
+ if (!strcasecmp(keyword, "dacs") || !strcasecmp(keyword, "dacsrbs")) {
res = parse_channel(idle, &dacschan);
}
if (!res)
@@ -389,7 +389,7 @@ static int chanconfig(char *keyword, char *args)
error("Channel %d already configured as '%s' at line %d\n", x, sig[x], slineno[x]);
continue;
}
- if (!strcasecmp(keyword, "dacs") && slineno[dacschan]) {
+ if ((!strcasecmp(keyword, "dacs") || !strcasecmp(keyword, "dacsrbs")) && slineno[dacschan]) {
error("DACS Destination channel %d already configured as '%s' at line %d\n", dacschan, sig[dacschan], slineno[dacschan]);
continue;
} else {
@@ -439,6 +439,16 @@ static int chanconfig(char *keyword, char *args)
cc[dacschan].sigtype = ZT_SIG_DACS;
sig[dacschan] = "DACS";
dacschan++;
+ } else if (!strcasecmp(keyword, "dacsrbs")) {
+ /* Setup channel for monitor */
+ cc[x].idlebits = dacschan;
+ cc[x].sigtype = ZT_SIG_DACS_RBS;
+ sig[x] = "DACS w/ RBS";
+ /* Setup inverse */
+ cc[dacschan].idlebits = x;
+ cc[dacschan].sigtype = ZT_SIG_DACS_RBS;
+ sig[dacschan] = "DACS w/ RBS";
+ dacschan++;
} else if (!strcasecmp(keyword, "unused")) {
sig[x] = "Unused";
cc[x].sigtype = 0;
@@ -574,7 +584,7 @@ static void printconfig()
if ((cc[x].sigtype != ZT_SIG_SLAVE) && (cc[x].sigtype)) {
configs++;
ps = 0;
- if (cc[x].sigtype == ZT_SIG_DACS)
+ if ((cc[x].sigtype & __ZT_SIG_DACS) == __ZT_SIG_DACS)
printf("Channel %02d %s to %02d", x, sig[x], cc[x].idlebits);
else {
printf("Channel %02d: %s (%s)", x, sig[x], laws[cc[x].deflaw]);
@@ -620,6 +630,7 @@ static struct handler {
{ "unused", chanconfig },
{ "cas", chanconfig },
{ "dacs", chanconfig },
+ { "dacsrbs", chanconfig },
{ "user", chanconfig },
{ "alaw", setlaw },
{ "mulaw", setlaw },