[asterisk-commits] tilghman: branch group/issue10217 r204746 - /team/group/issue10217/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 2 12:14:18 CDT 2009
Author: tilghman
Date: Thu Jul 2 12:14:14 2009
New Revision: 204746
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=204746
Log:
Several changes, prior to fixing merge
Modified:
team/group/issue10217/channels/chan_dahdi.c
Modified: team/group/issue10217/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue10217/channels/chan_dahdi.c?view=diff&rev=204746&r1=204745&r2=204746
==============================================================================
--- team/group/issue10217/channels/chan_dahdi.c (original)
+++ team/group/issue10217/channels/chan_dahdi.c Thu Jul 2 12:14:14 2009
@@ -1605,11 +1605,6 @@
ast_channel_datastore_add(chan, ds);
}
-static const char *transcap2txt(int tc)
-{
- return cap[tc];
-}
-
static int llc_read(struct ast_channel *chan, const char *cmd, char *data, struct ast_str **buf, ssize_t len)
{
/* LOWLEVELCOMPAT(rec,name) */
@@ -1662,7 +1657,29 @@
char rate[12];
snprintf(rate, sizeof(rate), "%d", llc->llc[recnum].transmultiplier);
value = rate;
- } /* TODO */
+ } else if (!strcasecmp(args.name, "layer1proto")) {
+ const char *proto[32] = { "", "V.110", "G.711u", "G.711a", "G.721", "H.221", "H.223", "NON-ITU",
+ "V.120", "X.31", };
+ value = proto[llc->llc[recnum].layer1proto];
+ } else if (!strncasecmp(args.name, "layer1.", 7)) {
+ /* LAYER 1 SUBSET */
+ char *subset = args.name + 7;
+ int proto = llc->llc[recnum].layer1proto;
+
+ if (!strcasecmp(subset, "async")) {
+ value = llc->llc[recnum].layer1.async ? "1" : "0";
+ } else if (!strcasecmp(subset, "inband")) {
+ value = llc->llc[recnum].layer1.negot ? "1" : "0";
+ } else if (!strcasecmp(subset, "userrate")) {
+ const char *rate[32] = { "UNSPEC", "0.6K", "1.2K", "2.4K", "3.6K", "4.8K", "7.2K", "8K",
+ "9.6K", "14.4K", "16K", "19.2K", "32K", "38.4K", "48K", "56K",
+ "64K", "", "57.6K", "28.8K", "24K", "0.1345K", "0.100K", "0.075/1.2K",
+ "1.2/0.075K", "0.050K", "0.075K", "0.110K", "0.150K", "0.200K", "0.300K", "12K" };
+ value = rate[llc->llc[recnum].layer1.userrate];
+ } else if (!strcasecmp(subset, "interrate")) {
+ const char *rate[4] = { "UNSPEC", "8K", "16K", "32K" };
+ } /* TODO Remaining layer 1 subset */
+ } /* TODO Layers 2 and 3 subsets */
ast_str_set(buf, len, "%s", value);
return 0;
}
More information about the asterisk-commits
mailing list