Changeset 3481
- Timestamp:
- 01/02/07 06:25:59 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/bin/retrieve_op_conf_from_mysql.pl
r3191 r3481 70 70 next; 71 71 } 72 73 # check if trunk or extension 74 if($line =~ /^context=from-pstn/) { 75 $istrunk=1; 76 next; 77 } 78 if($line =~ /^context=from-zaptel/) { 79 $istrunk=1; 80 next; 81 } 82 if($line =~ /^context=from-internal/) { 83 $istrunk=0; 84 next; 85 } 86 72 87 if($line =~ /^[b]?channel\s*=\s*[>]?\s*([\d\,-]+)\s*$/) { 73 88 $ampwildcard and next; … … 84 99 $newlabel=~s/\%n/$lastlabelnum/; 85 100 $newlabel=~s/\%N/$lastlabelnum/; 101 102 # only add if A) this is a trunk 103 # and B) we haven't already defined any zaplines at the top of the file 104 # (I use this to customize it so instead of saying "Zap 1" it will 105 # say something more useful -- like the phone # of the line 106 107 if($istrunk) { 108 $inzaplines=0; 109 foreach my $row ( @zaplines ) { 110 $tempvalue=@{$row}[0]; 111 if($tempvalue eq "Zap/$c") { 112 $inzaplines=1; 113 } 114 } 115 116 if ($inzaplines==0) { 117 @zaplines=(@zaplines,[ "Zap/$c","$newlabel" ]); 118 } 119 } 120 86 121 87 @zaplines=(@zaplines,[ "Zap/$c","$newlabel" ]);88 122 } 89 123
