mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-23 14:44:28 +00:00
Add the flags column so that if it's set to '1' then that record is not included in the output extensions file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/perl -Tw
|
#!/usr/bin/perl -Tw
|
||||||
# Use these commands to create the appropriate tables in MySQL
|
# Use these commands to create the appropriate tables in MySQL
|
||||||
|
# If flags is 1 then this record is not included in the output extensions file
|
||||||
#
|
#
|
||||||
#CREATE TABLE extensions (
|
#CREATE TABLE extensions (
|
||||||
# context CHAR(20) DEFAULT 'default' NOT NULL,
|
# context CHAR(20) DEFAULT 'default' NOT NULL,
|
||||||
@@ -8,6 +9,7 @@
|
|||||||
# application CHAR(20) NOT NULL,
|
# application CHAR(20) NOT NULL,
|
||||||
# args CHAR(50),
|
# args CHAR(50),
|
||||||
# descr TEXT,
|
# descr TEXT,
|
||||||
|
# flags INT(1) DEFAULT '0' NOT NULL,
|
||||||
# PRIMARY KEY(context, extension, priority)
|
# PRIMARY KEY(context, extension, priority)
|
||||||
#);
|
#);
|
||||||
#
|
#
|
||||||
@@ -96,11 +98,13 @@ foreach my $row ( @{ $result } ) {
|
|||||||
}
|
}
|
||||||
foreach my $row ( @{ $result } ) {
|
foreach my $row ( @{ $result } ) {
|
||||||
my @result = @{ $row };
|
my @result = @{ $row };
|
||||||
print EXTEN "exten => $result[1],$result[2],$result[3]";
|
if ($result[6] == 0) {
|
||||||
print EXTEN "($result[4])" if defined $result[4];
|
print EXTEN "exten => $result[1],$result[2],$result[3]";
|
||||||
print EXTEN "\t" if not defined $result[4];
|
print EXTEN "($result[4])" if defined $result[4];
|
||||||
print EXTEN "\t; $result[5]" if defined $result[5];
|
print EXTEN "\t" if not defined $result[4];
|
||||||
print EXTEN "\n";
|
print EXTEN "\t; $result[5]" if defined $result[5];
|
||||||
|
print EXTEN "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print EXTEN "\n";
|
print EXTEN "\n";
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/perl -Tw
|
#!/usr/bin/perl -Tw
|
||||||
# Use these commands to create the appropriate tables in MySQL
|
# Use these commands to create the appropriate tables in MySQL
|
||||||
|
# If flags is 1 then this record is not included in the output extensions file
|
||||||
#
|
#
|
||||||
#CREATE TABLE extensions (
|
#CREATE TABLE extensions (
|
||||||
# context CHAR(20) DEFAULT 'default' NOT NULL,
|
# context CHAR(20) DEFAULT 'default' NOT NULL,
|
||||||
@@ -8,6 +9,7 @@
|
|||||||
# application CHAR(20) NOT NULL,
|
# application CHAR(20) NOT NULL,
|
||||||
# args CHAR(50),
|
# args CHAR(50),
|
||||||
# descr TEXT,
|
# descr TEXT,
|
||||||
|
# flags INT(1) DEFAULT '0' NOT NULL,
|
||||||
# PRIMARY KEY(context, extension, priority)
|
# PRIMARY KEY(context, extension, priority)
|
||||||
#);
|
#);
|
||||||
#
|
#
|
||||||
@@ -96,11 +98,13 @@ foreach my $row ( @{ $result } ) {
|
|||||||
}
|
}
|
||||||
foreach my $row ( @{ $result } ) {
|
foreach my $row ( @{ $result } ) {
|
||||||
my @result = @{ $row };
|
my @result = @{ $row };
|
||||||
print EXTEN "exten => $result[1],$result[2],$result[3]";
|
if ($result[6] == 0) {
|
||||||
print EXTEN "($result[4])" if defined $result[4];
|
print EXTEN "exten => $result[1],$result[2],$result[3]";
|
||||||
print EXTEN "\t" if not defined $result[4];
|
print EXTEN "($result[4])" if defined $result[4];
|
||||||
print EXTEN "\t; $result[5]" if defined $result[5];
|
print EXTEN "\t" if not defined $result[4];
|
||||||
print EXTEN "\n";
|
print EXTEN "\t; $result[5]" if defined $result[5];
|
||||||
|
print EXTEN "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print EXTEN "\n";
|
print EXTEN "\n";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user