[zaptel-commits] tzafrir: branch 1.2 r4512 - /branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Mon Sep 8 15:34:10 CDT 2008


Author: tzafrir
Date: Mon Sep  8 15:34:10 2008
New Revision: 4512

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4512
Log:
Minor FXS/FXO type fixes in case probe was not done.

Modified:
    branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm

Modified: branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm?view=diff&rev=4512&r1=4511&r2=4512
==============================================================================
--- branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm (original)
+++ branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm Mon Sep  8 15:34:10 2008
@@ -157,8 +157,8 @@
 		# Junghanns GSM card
 		$type = "GSM";
 	} elsif(defined $signalling) {
-		$type = 'FXS' if $signalling =~ /^FXS/;
-		$type = 'FXO' if $signalling =~ /^FXO/;
+		$type = 'FXO' if $signalling =~ /^FXS/;
+		$type = 'FXS' if $signalling =~ /^FXO/;
 	} else {
 		$type = undef;
 	}
@@ -216,6 +216,7 @@
 	my $self = shift or die;
 	my $span = $self->span or die;
 
+	return undef if (not defined $self->type);
 	return undef unless $self->type eq 'FXO';
 	return $self->{BATTERY} if defined $self->{BATTERY};
 




More information about the zaptel-commits mailing list