Skip to content
Open
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
4 changes: 4 additions & 0 deletions etc/gemeinschaft/gemeinschaft.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@
$SNOM_PROV_PB_NUM_RESULTS = 15;
# number of results in phonebook search on Snom phone

$SNOM_PROV_SIP_INFO = false;
# Use Sip-Info to reprovision the phone after changes.
# The phone does not have to reboot for this.

# Before you do firmware updates be sure to read
# doc/other/snom-and-cisco-switches.txt
# Set $LOG_LEVEL to "NOTICE" or even "DEBUG" and
Expand Down
11 changes: 3 additions & 8 deletions opt/gemeinschaft/dialplan-scripts/in-user-get-ringer.agi
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,8 @@ if (strToLower(subStr($user['phone_type'],0,4)) === 'snom') {

if (@$ringtones[$source]['file']) {
gs_agi_set_variable( 'ringer', ('<'. GS_PROV_SCHEME .'://'. GS_PROV_HOST . (GS_PROV_PORT ? ':'.GS_PROV_PORT : '') . GS_PROV_PATH .'ringtones/'. $ringtones[$source]['file'] .'-snom.wav>') );
} elseif (array_key_exists('bellcore', $ringtones[$source])) {
if (@$ringtones[$source]['bellcore'] == 1) exit();
if (@$ringtones[$source]['bellcore'] != 0) {
gs_agi_set_variable( 'ringer', ('<http://127.0.0.1/Bellcore-dr'. $ringtones[$source]['bellcore']. '>') );
} else {
gs_agi_set_variable( 'ringer', ('<http://127.0.0.1/Bellcore-dr0>') );
}
} else {
gs_agi_set_variable( 'ringer', ('<http://www.notused.com>;info=alert-' . $source . ';x-line-id=0') );
}

}
Expand Down Expand Up @@ -215,4 +210,4 @@ else {

}

?>
?>
13 changes: 9 additions & 4 deletions opt/gemeinschaft/dialplan-scripts/out-route.agi
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ require_once( GS_DIR .'inc/agi-fns.php' );
require_once( GS_DIR .'inc/pcre_check.php' );
include_once( GS_DIR .'inc/group-fns.php' );
include_once( GS_DIR .'inc/get-listen-to-ids.php' );
include_once( GS_DIR .'inc/nobody-extensions.php' );

ini_set('implicit_flush', 1);
ob_implicit_flush(1);
Expand Down Expand Up @@ -194,10 +195,14 @@ foreach ($gate_grps as $ggrp_id) {
if ($qualify_cid
&& ! in_array(strToLower($out_cid_num), array('anonymous', 'unknown', ''), true)) # no action for "anonymous"
{
$user_cid_override = $db->executeGetOne(
'SELECT `cid_ext` '.
'FROM `gate_cids` '.
'WHERE `grp_id` = '.$ggrp_id.' AND `cid_int` = \''.$db->escape($out_cid_num).'\'' );
if (gs_is_nobody_extension($out_cid_num)) {
$user_cid_override = 0;
} else {
$user_cid_override = $db->executeGetOne(
'SELECT `cid_ext` '.
'FROM `gate_cids` '.
'WHERE `grp_id` = '.$ggrp_id.' AND `cid_int` = \''.$db->escape($out_cid_num).'\'' );
}
if ($user_cid_override !== false) {
gs_agi_verbose( '### Overriding caller ID "'.$out_cid_num.'" -> "'.$user_cid_override.'" for gategroup ID: '. $ggrp_id );
$out_cid_num = preg_replace('/[^0-9+a-zA-Z\-_.]/', '', $user_cid_override);
Expand Down
9 changes: 6 additions & 3 deletions opt/gemeinschaft/htdocs/gui/mod/calls_queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@
$rs = $DB->execute(
'SELECT SQL_CALC_FOUND_ROWS
`d`.`timestamp` `ts`, `d`.`number`, `d`.`remote_name`,
`u`.`id` `r_uid`, `u`.`lastname` `r_ln`, `u`.`firstname` `r_fn`
`u`.`id` `r_uid`, `u`.`lastname` `r_ln`, `u`.`firstname` `r_fn`,
`s`.`callerid`
FROM
`dial_log` `d` LEFT JOIN
`users` `u` ON (`u`.`id`=`d`.`remote_user_id`)
`users` `u` ON (`u`.`id`=`d`.`remote_user_id`) LEFT JOIN
`ast_sipfriends` `s` ON (`d`.`user_id` = `s`.`_user_id`)
WHERE
`d`.`user_id`='. (int)@$_SESSION['sudo_user']['info']['id'] .' AND
`d`.`type`=\''. $DB->escape($type) .'\' AND
`d`.`timestamp`>'. (time()-GS_PROV_DIAL_LOG_LIFE) .' AND
`d`.`number` <> \''. $DB->escape( @$_SESSION['sudo_user']['info']['ext'] ) .'\'
Expand All @@ -83,6 +84,7 @@
<tr>
<th style="width:140px;"><?php echo __('Nummer'); ?></th>
<th style="width:210px;"><?php echo __('Name'); ?></th>
<th style="width:210px;"><?php echo __('Angenommen'); ?></th>
<th style="width:120px;"><span class="sort-col"><?php echo __('Datum'); ?></span></th>
<th style="width:100px;"><?php echo __('Seite'), ' ', ($page+1), ' / ', $num_pages; ?></th>
</tr>
Expand Down Expand Up @@ -131,6 +133,7 @@
if ($r['r_fn'] != '') $name .= ', ' . $r['r_fn'];
}
echo '<td>', htmlEnt($name), '</td>';
echo '<td>', htmlEnt($r['callerid']), '</td>';

echo '<td>', date_human($r['ts']), '</td>';

Expand Down
26 changes: 25 additions & 1 deletion opt/gemeinschaft/htdocs/gui/mod/home_home.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@

if (! @$_SESSION['sudo_user']['info']['host_is_foreign']) {

if ($action === 'checkcfg') {

gs_prov_phone_checkcfg_by_ext( $_SESSION['sudo_user']['info']['ext'], false );

}
if ($action === 'reboot') {

gs_prov_phone_checkcfg_by_ext( $_SESSION['sudo_user']['info']['ext'], true );
Expand Down Expand Up @@ -374,11 +379,30 @@
<div style="height:20px;"></div>

<div class="fr">
<form method="get" action="<?php echo GS_URL_PATH; ?>">
<?php
if (gs_get_conf('GS_SNOM_PROV_SIP_INFO')) {
?>
<form method="post" action="<?php echo GS_URL_PATH; ?>">
<?php echo gs_form_hidden($SECTION, $MODULE); ?>
<input type="hidden" name="action" value="checkcfg" />
<input type="submit" value="<?php echo __('Telefon aktualisieren'); ?>" />
</form>
<form method="post" action="<?php echo GS_URL_PATH; ?>">
<?php echo gs_form_hidden($SECTION, $MODULE); ?>
<input type="hidden" name="action" value="reboot" />
<input type="submit" value="<?php echo __('Telefon aktualisieren (Problembehebung)'); ?>" />
</form>
<?php
} else {
?>
<form method="post" action="<?php echo GS_URL_PATH; ?>">
<?php echo gs_form_hidden($SECTION, $MODULE); ?>
<input type="hidden" name="action" value="reboot" />
<input type="submit" value="<?php echo __('Telefon aktualisieren'); ?>" />
</form>
<?php
}
?>
</div>

<br style="clear:right" />
2 changes: 1 addition & 1 deletion opt/gemeinschaft/htdocs/gui/mod/ringtones_ringtones.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
?>
<p class="small" style="max-width:48em;">
<sup>[1]</sup>
<?php echo __('Das Snom unterst&uuml;tzt Ringer 1-5 und lautlos.<br /> F&uuml;r das Snom kann nur entweder f&uuml;r interne oder f&uuml;r externe Anrufe eine eigene Klingeltondatei eingestellt sein, nicht f&uuml;r beides. Die L&auml;nge wird auf wenige Sekunden begrenzt.'); ?>
<?php echo __('F&uuml;r das Snom wird die eigene Klingeltondatei auf wenige Sekunden begrenzt.'); ?>
</p>
<?php
//}
Expand Down
Loading