| | 552 | $nt = notifications::create($db); |
|---|
| | 553 | |
|---|
| | 554 | $conf_change = _("Conference Room App Changed"); |
|---|
| | 555 | $conf_change_desc = _("Your Conference Room App (ASTCONFAPP) was automatically changed from %s to %s because %s is not installed on your Asterisk installation"); |
|---|
| | 556 | |
|---|
| | 557 | $conf_missing = _("No Conference Room App"); |
|---|
| | 558 | $conf_missing_desc = _("Neither app_meetme nor app_confbridge is configured in Asterisk, conferencing, paging and other functionality will not work properly"); |
|---|
| | 559 | |
|---|
| | 560 | if ($amp_conf['ASTCONFAPP'] == 'app_meetme' && !$astman->app_exists('meetme')) { |
|---|
| | 561 | if ($astman->app_exists('confbridge')) { |
|---|
| | 562 | $freepbx_conf->set_conf_values(array('ASTCONFAPP' => 'app_confbridge'), true, true); |
|---|
| | 563 | $nt->add_notice('framework', 'ASTCONFAPPCHG', $conf_change, sprintf($conf_change_desc,'app_meetme','app_confbridge','app_meetme')); |
|---|
| | 564 | $nt->delete('framework', 'ASTCONFAPPMISSING'); |
|---|
| | 565 | } else { |
|---|
| | 566 | $nt->add_error('framework', 'ASTCONFAPPMISSING', $conf_missing, $conf_missing_desc); |
|---|
| | 567 | } |
|---|
| | 568 | } elseif ($amp_conf['ASTCONFAPP'] == 'app_confbridge' && !$astman->app_exists('confbridge')) { |
|---|
| | 569 | if ($astman->app_exists('meetme')) { |
|---|
| | 570 | $freepbx_conf->set_conf_values(array('ASTCONFAPP' => 'app_meetme'), true, true); |
|---|
| | 571 | $nt->add_notice('framework', 'ASTCONFAPPCHG', $conf_change, sprintf($conf_change_desc,'app_confbridge','app_meetme','app_confbridge')); |
|---|
| | 572 | $nt->delete('framework', 'ASTCONFAPPMISSING'); |
|---|
| | 573 | } else { |
|---|
| | 574 | $nt->add_error('framework', 'ASTCONFAPPMISSING', $conf_missing, $conf_missing_desc); |
|---|
| | 575 | } |
|---|
| | 576 | } else { |
|---|
| | 577 | $nt->delete('framework', 'ASTCONFAPPMISSING'); |
|---|
| | 578 | } |
|---|
| | 579 | |
|---|