Hallo,

anbei ein Patch für Rev. 5099 (etwas ältere sollten auch gehen), der ein paar 
in den letzten Wochen hier diskutierten Problem / Features löst.

Einfach im Verzeichnis gemeinschaft-trunk mit
patch -p1 < p.diff
aufrufen.

Changes:
Telefonbuch Snom:
- beim Wählen am Telefon über die Telefonbücher privat und imported wird 
eine '0' vorangestellt
Damit funktioniert die Telefonbuch-Wahl aus Gui und Telefon. Vorausgesetzt die 
Nummern im Telefonbuch sind ohne Amts-0 hinterlegt

- Namensauflösung für eingehende Anrufe anhand von Einträgen aus imported 
Telefonbuch (setzt callerid{name}. Namen werden dann am Telefonbuch und z.B. 
auch in der Gui Ansicht der VM angezeigt.

Mit freundlichen Grüßen
-- 
 Maik Außendorf                        maik.aussendorf (at) dass-it.de
 dass IT GmbH                                Phone: +49.221.3565666-93
 http://www.dass-IT.de                         Fax: +49.221.3565666-10

 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRB52500 
 Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens, P. Storz
diff -Naurp gemeinschaft-trunk/opt/gemeinschaft/dialplan-scripts/get-callername-from-pb.agi gemeinschaft-patch/opt/gemeinschaft/dialplan-scripts/get-callername-from-pb.agi
--- gemeinschaft-trunk/opt/gemeinschaft/dialplan-scripts/get-callername-from-pb.agi	1970-01-01 01:00:00.000000000 +0100
+++ gemeinschaft-patch/opt/gemeinschaft/dialplan-scripts/get-callername-from-pb.agi	2008-09-23 13:27:02.000000000 +0200
@@ -0,0 +1,57 @@
+#!/usr/bin/php -q
+<?php
+/*******************************************************************\
+*            Gemeinschaft - asterisk cluster gemeinschaft
+* 
+* $Revision:  $
+* 
+* Copyright 2008, dass IT GmbH, Germany
+* http://www.dass-it.de/
+* Maik Aussendorf maik.aussendorf @ dass-it.de
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA 02110-1301, USA.
+\*******************************************************************/
+
+define( 'GS_VALID', true );  /// this is a parent file
+require_once( dirName(__FILE__) .'/../inc/conf.php' );
+require_once( GS_DIR .'inc/agi-fns.php' );
+
+ini_set('implicit_flush', 1);
+ob_implicit_flush(1);
+
+$number = trim(@$argv[1]);
+
+include_once( GS_DIR .'inc/db_connect.php' );
+
+
+$db = gs_db_slave_connect();
+
+$sqlstmt='SELECT `firstname`, `lastname` FROM `pb_ldap` WHERE `number`=\''. $number . '\'';
+
+$rs = $db->execute( $sqlstmt );
+
+if ($r = $rs->fetchRow()) {
+	$callername=$r['lastname'] . ', ' . $r['firstname'];
+	echo 'SET VARIABLE CALLERID(NAME) '. gs_agi_str_esc($callername);
+} else {
+
+//	echo 'SET VARIABLE CALLERID(NAME) '. gs_agi_str_esc('unbekannt');
+}
+
+//fFlush(STDOUT); // <- do not use. not defined in php-cgi!
+
+
+?>
diff -Naurp gemeinschaft-trunk/opt/gemeinschaft/etc/asterisk/e-internal.ael gemeinschaft-patch/opt/gemeinschaft/etc/asterisk/e-internal.ael
--- gemeinschaft-trunk/opt/gemeinschaft/etc/asterisk/e-internal.ael	2008-09-11 10:47:29.000000000 +0200
+++ gemeinschaft-patch/opt/gemeinschaft/etc/asterisk/e-internal.ael	2008-09-23 13:27:02.000000000 +0200
@@ -551,7 +551,10 @@ context to-internal-users-self {
 			Set(__origext=${EXTEN});			
 		
 		&set-callerid-by-clir();
-		
+
+	        // test callername
+		AGI(/opt/gemeinschaft/dialplan-scripts/get-callername-from-pb.agi,${CALLERID(num)});
+
 		// check the type of the called extension:
 		AGI(/opt/gemeinschaft/dialplan-scripts/in-get-type.agi,${EXTEN});
 		Verbose(1,### Incoming call to ${EXTEN}\, type: ${exttype}\, forwards: ${forwards});
diff -Naurp gemeinschaft-trunk/opt/gemeinschaft/htdocs/prov/snom/pb.php gemeinschaft-patch/opt/gemeinschaft/htdocs/prov/snom/pb.php
--- gemeinschaft-trunk/opt/gemeinschaft/htdocs/prov/snom/pb.php	2008-09-12 10:15:05.000000000 +0200
+++ gemeinschaft-patch/opt/gemeinschaft/htdocs/prov/snom/pb.php	2008-09-23 13:27:02.000000000 +0200
@@ -313,7 +313,7 @@ LIMIT '. $num_results;
 		       '<Prompt>Prompt</Prompt>', "\n";
 		while ($r = $rs->fetchRow()) {
 			$name = $r['ln'] .( strLen($r['fn'])>0 ? (', '.$r['fn']) : '' );
-			$number = $r['ext'];
+			$number = '0' . $r['ext'];
 			echo '<DirectoryEntry>',
 			       '<Name>', snomXmlEsc( $name ) ,'</Name>',
 			       '<Telephone>', $number ,'</Telephone>',
@@ -477,7 +477,7 @@ LIMIT '. $num_results;
 		       '<Prompt>Prompt</Prompt>', "\n";
 		while ($r = $rs->fetchRow()) {
 			$name = $r['ln'] .( strLen($r['fn'])>0 ? (', '.$r['fn']) : '' );
-			$number = $r['number'];
+			$number = '0' . $r['ext'];
 			echo '<DirectoryEntry>',
 			       '<Name>', snomXmlEsc( $name ) ,'</Name>',
 			       '<Telephone>', $number ,'</Telephone>',
@@ -505,4 +505,4 @@ LIMIT '. $num_results;
 #################################### PRIVATE PHONEBOOK }
 
 
-?>
\ No newline at end of file
+?>

Antwort per Email an