From 89e2d0efedc95e1717c37c57a0cef6316a21b4cd Mon Sep 17 00:00:00 2001 From: markster Date: Tue, 4 May 2004 03:20:08 +0000 Subject: Add RBS support to DACS (bug #1451) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@384 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- ztcfg.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'ztcfg.c') 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 }, -- cgit v1.2.3