Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ images+=("${repobase}/${reponame}")
## NethCTI Client ##
#############################
reponame="nethvoice-cti-ui"
container=$(buildah from ghcr.io/nethesis/nethvoice-cti:v0.13.5)
container=$(buildah from ghcr.io/nethesis/nethvoice-cti:v0.13.7)

# Commit the image
buildah commit "${container}" "${repobase}/${reponame}"
Expand Down
4 changes: 3 additions & 1 deletion freepbx/initdb.d/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,6 @@
$stmt->execute();
$stmt = $db->prepare("INSERT IGNORE INTO `asterisk`.`admin` (`variable`, `value`) VALUES ('NETHVOICE_HOST',?)");
$stmt->execute([$_ENV['NETHVOICE_HOST']]);

// Add Audio Test feature code
$stmt = $db->prepare("INSERT IGNORE INTO `featurecodes` (`modulename`,`featurename`,`description`,`helptext`,`defaultcode`,`customcode`,`enabled`,`providedest`) VALUES ('nethcti3','audio_test','Audio Test','NethVoice CTI Audio Test','*41',NULL,1,0)");
$stmt->execute();
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function getQueuesConfiguration() {
public function getFeaturecodesConfiguration() {
try {
$result = array();
$codes_to_pick = array("pickup","confbridge_conf","que_toggle","dnd_toggle","incall_audio"); //Add here more codes
$codes_to_pick = array("pickup","confbridge_conf","que_toggle","dnd_toggle","incall_audio","audio_test"); //Add here more codes
$featurecodes = featurecodes_getAllFeaturesDetailed();
foreach ($featurecodes as $featurcode) {
if (in_array($featurcode['featurename'],$codes_to_pick)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function nethcti3_get_config($engine) {
/*Configure conference*/
$defaultVal = $amp_conf['ASTCONFAPP'];
$amp_conf['ASTCONFAPP'] = 'app_confbridge';
$query='SELECT featurename,IF(customcode IS NULL OR customcode = "",defaultcode,customcode) as defaultcode FROM featurecodes WHERE ( modulename="nethcti3" OR modulename="donotdisturb" ) AND ( featurename="confbridge_conf" OR featurename="incall_audio" OR featurename="dnd_on" OR featurename="dnd_off" OR featurename="dnd_toggle") AND enabled="1"';
$query='SELECT featurename,IF(customcode IS NULL OR customcode = "",defaultcode,customcode) as defaultcode FROM featurecodes WHERE ( modulename="nethcti3" OR modulename="donotdisturb" ) AND ( featurename="confbridge_conf" OR featurename="incall_audio" OR featurename="audio_test" OR featurename="dnd_on" OR featurename="dnd_off" OR featurename="dnd_toggle") AND enabled="1"';
$codes = array();
foreach ($db->getAll($query) as $feature) {
$codes[$feature[0]] = $feature[1];
Expand Down Expand Up @@ -70,6 +70,18 @@ function nethcti3_get_config($engine) {
$ext->add($context2, $exten2, '', new ext_playback('nethcti/incall_audio/file-${EXTEN}'));
$ext->add($context2, $exten2, '', new ext_hangup());
}
if (isset($codes['audio_test']) && $codes['audio_test'] != '') {
$exten=$codes['audio_test'];
$context='audio-test';
$ext->addInclude('ext-test', $context);
$ext->add($context, $exten, '', new ext_noop('Audio Test'));
$ext->add($context, $exten, '', new ext_set('CONNECTEDLINE(name-charset,i)','utf8'));
$ext->add($context, $exten, '', new ext_set('CONNECTEDLINE(name,i)',_("Audio Test")));
$ext->add($context, $exten, '', new ext_set('CONNECTEDLINE(num,i)',$exten));
$ext->add($context, $exten, '', new ext_answer());
$ext->add($context, $exten, '', new ext_playback('silence/2'));
$ext->add($context, $exten, '', new ext_hangup());
}
/* add user and admin profile to confbridge_additional.conf */
if (isset($conferences_conf) && is_a($conferences_conf, "conferences_conf")) {
/* get default language */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ INSERT INTO `featurecodes` (`modulename`,`featurename`,`description`,`helptext`,
("infoservices","echotest","Echo Test","","*43","",1,1),
("infoservices","speakextennum","Speak Your Exten Number","","*65","",1,0),
("infoservices","speakingclock","Speaking Clock","","*60","",1,1),
("nethcti3","incall_audio","Incall Audio","NethCTI 3 Incall Audio","1987",NULL,1,0),
("nethcti3","confbridge_conf","Conference","NethCTI 3 conference","987",NULL,1,0),
("nethcti3","audio_test","Audio Test","NethVoice CTI Audio Test","*41",NULL,1,0),
("nethcti3","incall_audio","Incall Audio","NethVoice CTI Incall Audio","1987",NULL,1,0),
("nethcti3","confbridge_conf","Conference","NethVoice CTI conference","987",NULL,1,0),
("paging","intercom-off","User Intercom Disallow","","*55","",1,0),
("paging","intercom-on","User Intercom Allow","","*54","",1,0),
("paging","intercom-prefix","Intercom prefix","","*80","",1,0),
Expand Down
Loading