--- svn/A10u.pm	2008-05-29 13:11:33.000000000 -0400
+++ A10u.pm	2008-05-29 15:12:48.000000000 -0400
@@ -219,7 +219,12 @@
 	open(FH, $wanpipe_ss7_interfaces_template) or die "Can't open $wanpipe_ss7_interfaces_template";
 	my $wp_file='';
        	while (<FH>) {
-       		$wp_file .= $_;
+		if (($ss7_tdminterface == ' ') && (($wanpipe_ss7_interfaces_template =~ m/2/) || ($wanpipe_ss7_interfaces_template =~ m/5/))){
+			#donothing
+			$wp_file= ' ';
+		}else{
+			$wp_file .= $_;
+		}
 	}
 	close (FH);
 
@@ -274,31 +279,24 @@
 		exit 1;
        	}
 
-        if ($self->fe_media eq 'T1'){
-		if ($is_freebsd && ($self->signalling eq 'PRI CPE' | $self->signalling eq 'PRI NET')){
-			 $te_sig_mode=''; 
-			 $dchan = 0;
-		}elsif ($self->signalling eq 'PRI CPE' | $self->signalling eq 'PRI NET'){
-			  $te_sig_mode = '';	
-			  $dchan = 24;
-		}
-		$fe_lbo='0DB';
-	}else{
-		if ($is_freebsd && ($self->signalling eq 'PRI CPE' | $self->signalling eq 'PRI NET')){
-			  $dchan = 0;
-		}elsif($self->signalling eq 'PRI CPE' | $self->signalling eq 'PRI NET'){
-	 		 $dchan=16;
+
+	$dchan = 0;
+	if(!$is_freebsd){
+		if ($self->signalling  =~ m/PRI/ | $self->signalling  =~ m/SS7/ ){
+			if(($self->fe_media eq 'T1')){
+				$dchan=24;
+			}else{ 
+				$dchan=16;
+			}
 		}
-		$fe_lbo='120OH';
 	}
-
-	
-	if ($te_sig_mode eq ''){
+   	if($self->fe_media eq 'T1'){
 		$te_sig_mode_line='';
+		$fe_lbo='0DB';
 	}else{
+		$fe_lbo='120OH';
 		$te_sig_mode_line= 'TE_SIG_MODE     = '.$te_sig_mode;
 	}
-
 	open(FH, $wanpipe_conf_template ) or die "Cannot open $wanpipe_conf_template";
 	my $wp_file='';
        	while (<FH>) {
