From eb06c1715a94dc137f37e602d231e4a9b87883d7 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sun, 27 Sep 2009 15:01:20 +0000 Subject: dahdi_perl: improved config generation for T1 CAS A few extra options for a CAS span signalling. xpp rev: 7343, 7346, 7369 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@7224 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- xpp/perl_modules/Dahdi/Config/Gen/System.pm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'xpp/perl_modules/Dahdi/Config/Gen/System.pm') diff --git a/xpp/perl_modules/Dahdi/Config/Gen/System.pm b/xpp/perl_modules/Dahdi/Config/Gen/System.pm index c408298..eacfb15 100644 --- a/xpp/perl_modules/Dahdi/Config/Gen/System.pm +++ b/xpp/perl_modules/Dahdi/Config/Gen/System.pm @@ -58,19 +58,25 @@ sub gen_cas($$) { 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 @@ HEAD 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); } -- cgit v1.2.3