[dahdi-commits] tzafrir: tools/trunk r7224 - in /tools/trunk/xpp: ./ perl_modules/Dahdi/Confi...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Sun Sep 27 10:01:23 CDT 2009


Author: tzafrir
Date: Sun Sep 27 10:01:20 2009
New Revision: 7224

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7224
Log:
dahdi_perl: improved config generation for T1 CAS

A few extra options for a CAS span signalling.

xpp rev: 7343, 7346, 7369

Modified:
    tools/trunk/xpp/genconf_parameters
    tools/trunk/xpp/perl_modules/Dahdi/Config/Gen.pm
    tools/trunk/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm
    tools/trunk/xpp/perl_modules/Dahdi/Config/Gen/System.pm
    tools/trunk/xpp/perl_modules/Dahdi/Config/Params.pm

Modified: tools/trunk/xpp/genconf_parameters
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/genconf_parameters?view=diff&rev=7224&r1=7223&r2=7224
==============================================================================
--- tools/trunk/xpp/genconf_parameters (original)
+++ tools/trunk/xpp/genconf_parameters Sun Sep 27 10:01:20 2009
@@ -107,8 +107,23 @@
 # chan_dahdi.conf . The meaning of this may be extended somehow to support
 # R2 through openr2/chan_dahdi later on.
 #pri_connection_type	R2
+#pri_connection_type	CAS
+#
+# Explicitly set the idle bits for E1 CAS (Sample value is the default):
 #r2_idle_bits		1101
-
+#
+#
+# Use E&M on CAS (default is FXS/FXO). If set, E1 spans will be used as
+# E&M-E1 and T1 will use the requested type:
+#em_signalling em
+#em_signalling em_w
+#em_signalling featd
+#em_signalling featdtmf
+#em_signalling featdtmf_ta
+#em_signalling featb
+#em_signalling fgccama
+#em_signalling fgccamamf
+#
 # pri_termtype contains a list of settings:
 # Currently the only setting is for TE or NT (the default is TE). This
 # sets two different but normally related configuration items:

Modified: tools/trunk/xpp/perl_modules/Dahdi/Config/Gen.pm
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/perl_modules/Dahdi/Config/Gen.pm?view=diff&rev=7224&r1=7223&r2=7224
==============================================================================
--- tools/trunk/xpp/perl_modules/Dahdi/Config/Gen.pm (original)
+++ tools/trunk/xpp/perl_modules/Dahdi/Config/Gen.pm Sun Sep 27 10:01:20 2009
@@ -205,10 +205,12 @@
 		bri_hardhdlc
 		bri_sig_style
 		r2_idle_bits
+		tdm_framing
 		echo_can
 		brint_overlap
 		pri_termtype
 		pri_connection_type
+		em_signalling
 		);
 	foreach my $k (@trivial) {
 		$gconfig->{$k} = $p->item($k);

Modified: tools/trunk/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm?view=diff&rev=7224&r1=7223&r2=7224
==============================================================================
--- tools/trunk/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm (original)
+++ tools/trunk/xpp/perl_modules/Dahdi/Config/Gen/Chandahdi.pm Sun Sep 27 10:01:20 2009
@@ -94,6 +94,12 @@
 	# Fake type for signalling
 	my $faketype = ($termtype eq 'TE') ? 'FXO' : 'FXS';
 	my $sig = $gconfig->{'chan_dahdi_signalling'}{$faketype};
+	my $em_signalling = $gconfig->{'em_signalling'};
+	if ($em_signalling ne 'none') {
+		$sig = $em_signalling;
+		# FIXME: but we don't handle E1 yet
+		$sig = 'em_e1' if $span->proto eq 'E1';
+	}
 	my @to_reset = qw/context group/;
 	my $chans = Dahdi::Config::Gen::chan_range($span->chans());
 	$group .= "," . (10 + $num);	# Invent unique group per span

Modified: tools/trunk/xpp/perl_modules/Dahdi/Config/Gen/System.pm
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/perl_modules/Dahdi/Config/Gen/System.pm?view=diff&rev=7224&r1=7223&r2=7224
==============================================================================
--- tools/trunk/xpp/perl_modules/Dahdi/Config/Gen/System.pm (original)
+++ tools/trunk/xpp/perl_modules/Dahdi/Config/Gen/System.pm Sun Sep 27 10:01:20 2009
@@ -58,19 +58,25 @@
 	my $dchan_type;
 	my $chan_range;
 	if($span->is_pri()) {
-		if ($gconfig->{'pri_connection_type'} eq 'PRI') {
+		if ($pri_connection_type eq 'PRI') {
 			$chan_range = Dahdi::Config::Gen::bchan_range($span);
 			printf "bchan=%s\n", $chan_range;
 			my $dchan = $span->dchan();
 			printf "dchan=%d\n", $dchan->num();
-		} elsif ($gconfig->{'pri_connection_type'} eq 'R2' ) {
+		} elsif ($pri_connection_type eq 'R2' ) {
 			my $idle_bits = $gconfig->{'r2_idle_bits'};
 			$chan_range = Dahdi::Config::Gen::bchan_range($span);
 			printf "cas=%s:$idle_bits\n", $chan_range;
 			printf "dchan=%d\n", $span->dchan()->num();
-		} elsif ($gconfig->{'pri_connection_type'} eq 'CAS' ) {
+		} elsif ($pri_connection_type eq 'CAS' ) {
 			my $type = ($termtype eq 'TE') ? 'FXO' : 'FXS';
 			my $sig = $gconfig->{'dahdi_signalling'}{$type};
+			my $em_signalling = $gconfig->{'em_signalling'};
+			if ($em_signalling ne 'none') {
+				$sig = 'e&m';
+				# FIXME: but we don't handle E1 yet
+				$sig = 'e&me1' if $proto eq 'E1';
+			}
 			die "unknown default dahdi signalling for chan $num type $type" unless defined $sig;
 			$chan_range = Dahdi::Config::Gen::chan_range($span->chans());
 			printf "%s=%s\n", $sig, $chan_range;
@@ -202,7 +208,7 @@
 		if($span->is_digital) {
 			if($span->is_pri) {
 				if($gconfig->{'pri_connection_type'} eq 'CAS') {
-					$self->gen_cas($gconfig, $span);
+					$self->gen_t1_cas($gconfig, $span);
 				} else {
 					$self->gen_digital($gconfig, $span);
 				}

Modified: tools/trunk/xpp/perl_modules/Dahdi/Config/Params.pm
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/perl_modules/Dahdi/Config/Params.pm?view=diff&rev=7224&r1=7223&r2=7224
==============================================================================
--- tools/trunk/xpp/perl_modules/Dahdi/Config/Params.pm (original)
+++ tools/trunk/xpp/perl_modules/Dahdi/Config/Params.pm Sun Sep 27 10:01:20 2009
@@ -101,6 +101,7 @@
 			fxs_immediate		=> 'no',
 			fxs_default_start	=> 'ks',
 			fxo_default_start	=> 'ks',
+			em_signalling		=> 'none',
 			lc_country		=> 'us',
 			context_lines		=> 'from-pstn',
 			context_phones		=> 'from-internal',
@@ -114,6 +115,7 @@
 			bri_hardhdlc		=> 'auto',
 			pri_connection_type	=> 'PRI',
 			r2_idle_bits		=> '1101',
+			tdm_framing		=> 'esf',
 			'pri_termtype'		=> [ 'SPAN/* TE' ],
 		);
 	return $self->{$key} if exists($self->{$key}) or $options{NODEFAULTS};




More information about the dahdi-commits mailing list