Changeset 6146
- Timestamp:
- 07/23/08 12:38:15 (1 month ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/bin/retrieve_op_conf_from_mysql.pl
r6048 r6146 215 215 216 216 if (table_exists($dbh,"devices")) { 217 $statement = "SELECT description,id,dial from devices";217 $statement = "SELECT description,id,dial,tech from devices"; 218 218 $result = $dbh->selectall_arrayref($statement); 219 219 @resultSet = @{$result}; … … 319 319 my $id = @{ $row }[1]; 320 320 my $dial = @{ $row }[2]; 321 322 323 # Support for real mailbox settings - 324 my $tech = @{ $row }[3]; 325 # some sensible defaults for voicemail ext and context 326 my $vmext = @{ $row }[1]; 327 my $vmcontext = "default"; 328 # database table name for iax2 is just iax but sip and zap are ok 329 if ($tech eq "iax2") {$tech = "iax";} 330 # get mailbox setting from relevant tech table and split into ext and content 331 if (table_exists($dbh,$tech)) { 332 $statement = "SELECT data from $tech WHERE id = '$id' AND keyword = 'mailbox' "; 333 $result = $dbh->selectall_arrayref($statement); 334 @resultSet = @{$result}; 335 if ( $#resultSet == -1 ) {print "Notice: no mailbox defined\n";} 336 my $mailbox = $resultSet[0][0]; 337 my @values = split('@', $mailbox); 338 if (exists($values[0])) {$vmext = $values[0];} 339 if (exists($values[0])) {$vmcontext = $values[1];} 340 } else { print "Table does not exist: $tech\n"; } 341 # - Support for real mailbox settings 342 343 344 321 345 # # next if ($account eq ""); 322 346 $btn=get_next_btn($extenpos,$btn); 323 347 $icon='4'; 324 print EXTEN "[$dial]\nPosition=$btn\nLabel=\"$id : $description\"\nExtension=$id\nContext=from-internal\nIcon=$icon\nVoicemail_Context= default\nVoiceMailExt=*$id\@from-internal\nPanel_Context=$panelcontext\n";348 print EXTEN "[$dial]\nPosition=$btn\nLabel=\"$id : $description\"\nExtension=$id\nContext=from-internal\nIcon=$icon\nVoicemail_Context=$vmcontext\nVoiceMailExt=*$vmext\@from-internal\nPanel_Context=$panelcontext\n"; 325 349 } 326 350 freepbx/trunk/amp_conf/htdocs_panel/op_server.cfg
r5779 r6146 55 55 ; Poll for voicemail status (only necesary when you access the 56 56 ; voicemail directories outside asterisk itself - eg. web access) 57 poll_voicemail= 057 poll_voicemail=1 58 58 59 59 ; 1 Enable automatic hangup of zombies
