login | register
Sat 17 of May, 2008 [10:21 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.65s
  • Memory usage: 2.29MB
  • Database queries: 32
  • GZIP: Disabled
  • Server load: 0.83

GXP-2000 XML Phonebook

It seems to make sense to put information about the XML phonebook on a page of its own as I expect some cool things to be happening with it soon. Feel free to reformat if you have stuff to add. - Shane Steinbeck (Jul17/06)

Known XML Phonebook Issues

BETA 1.1.1.14

  • Fixed? (Oct03/06) - Setting the Remove Manually-edited entries on Download option to yes still causes phone to crash during the "Sync Phonebook XML...This may take a minute" screen. - acabtp
    • I believe this has been fixed; I do not see this happening with this update (I haven't checked the previous ones, just got around to it now). -Mike
  • Phonebook XML download (Oct18/06) - Seems like it's not possible download and sync more than 6! phonebook items. Tested with identical record adding one by one. I'm confident I could sync more real items early today with beta 1.1.0.13 firmware -MIlan
    • Solved, not a bug thought- the XML page has been generated dynamically and was probably not too fast. The final XML document has not been valid and thus not parsed by GXP-2000.-MIlan





Beta 1.1.1.9

  • MAJOR (Aug18/06) - Setting the Remove Manually-edited entries on Download option to yes still causes phone to crash during the "Sync Phonebook XML...This may take a minute" screen. - acabtp
  • TWEAK (Aug18/06) - The interface for using the phonebook needs some rethinking. With a list of more than 20 entries, it quickly becomes cumbersome to navigate. Suggested changes:
    • Pressing and holding the up or down arrows should scroll the list
    • Pressing up when at the top of the list should take you to the bottom, and vice versa
    • Typing numbers on the keypad should take you through the entries in the list that match that letter... ie, press 3 once for entries starting with D, twice for E, thrice for F... Similar to navigation of phone books on most cell phones.
    • Pressing the Speaker button or lifting the handset with an entry selected in the list should dial it, without having to press the action key to get into the contact and then pressing the action key again to choose Dial. - acabtp
  • FUNCTIONS (Sep10/06) - Suggested adds:
    • An important one nowadays: allow the association of multiple phone numbers to the same contact name (It looks to me as if the XML syntax already caters for that, while the software not yet)
    • Access the download function without having to scroll through all the phonebook entries
    • A DELETE ALL ENTRIES function especially useful when performing complete rehauls of the phonebook. - xavtoit

Beta 1.1.1.7

  • MAJOR (Jul17/06) - There seems to be a memory limit on the number of entries your phonebook can have. With more than approximately 15 entries, the phone will get stuck on Sync Phonebook XML...This may take a minute
  • MAJOR (Jul18/06) - Setting the Remove Manually-edited entries on Download: option to yes causes Sync Phonebook XML...This may take a minute. Only way to fix it is to disconnect the network so it doesn't find the file and disable the option. Is this happening for everybody? - Shane Steinbeck
  • TWEAK (JUL17/06) If download fails for some reason, i.e. database is busy, the phone will act like it never got the command to download the phonebook. In one way this is good, so it doesn't hang up the phone, but on the other hand an error message would be nice after a 30 sec timeout or so.- MikeB
    • TWEAK (JUL18/06) Well the phone doesn't give feedback if it doesn't find a valid file, so if the problem lies between the phone and the script, there is nothing we can do. The one tweak that would be possible would be to write a descriptive "entry" into the XML if the database connection failed. Then the phonebook would contain an entry for Call, Support with a phone number. - Shane Steinbeck


XML Phonebook Manual

From http://www.grandstream.com/BETATEST/GXP2000_BT200/GXP-2000_User_Manual_1.1.1.7.pdf

GXP XML phonebook guide - cervajs

The feature will be activated when “Enable Downloadable Phonebook� Phonebook is set to YES (HTTP or TFTP) AND a valid “Phonebook XML Path� XML Download is set.

When the device boot up and completed the provisioning routine, it will attempt to download the gs_phonebook.xml file specified in “Phonebook XML Path�. During this process the LCD should display some messages to indicate that XML Phonebook download is in progress.

If the “Phonebook Download Interval� is set to a non-zero value, GXP2000 will periodically check and download the updated phonebook available.

If the “Remove manually edited entries on download� option is set to NO (by default), GXP2000 will keep ALL entries edited manually, and insert the downloaded entries, and then save the phonebook. Otherwise ALL the existing phonebook entries on the phone will be erased and filled with the downloaded entries.

At any time, you can trigger an immediate download from by choosing the “Download Phonebook� in the GUI Phone Book Menu (you can use the down arrow key when the phone is on-hook).

Example XML file of gs_phonebook.xml:

<?xml version="1.0"?>
<AddressBook>
<Contact> 
   <LastName>Craig</LastName> 
   <FirstName>Richard</FirstName> 
   <Phone> 
     <phonenumber>6910</phonenumber> 
     <accountindex>0</accountindex> 
   </Phone> 
</Contact> 
<Contact> 
   <LastName>Peterson</LastName> 
   <FirstName>Susan</FirstName> 
   <Phone> 
     <phonenumber>6911</phonenumber> 
     <accountindex>0</accountindex> 
   </Phone> 
 </Contact> 
<Contact> 
   <LastName>Mayer</LastName> 
   <FirstName>Cindy</FirstName> 
   <Phone> 
     <phonenumber>6915</phonenumber> 
     <accountindex>0</accountindex> 
   </Phone> 
 </Contact> 
</AddressBook>

Note: This feature is designed for enterprise user only. Please contact Grandstream for more details.

Generate phonebook from Outlook

The code below shows vbscript that will generate an xml phone book for a given Outlook mail profile. If you use Exchange, this will probably be your name.

I tried to attach a sample hta program (vbscript inside HTML) but couldn't get attachments to work on this website. If you want an example, see http://www.timandjulie.com/GrandstreamExample.txt

Const OUTLOOK_PROFILE = "Tim Smith" '(Change to your mail profile name)
Set oOutlook = CreateObject("Outlook.Application")
Set ns = oOutlook.GetNamespace("MAPI")

crlf = chr(13) & chr(10)
sHtml = "<?xml version=""1.0""?>" & crlf
sHtml = sHtml & "<AddressBook>" & crlf

Set oSession = CreateObject("MAPI.Session")
oSession.Logon OUTLOOK_PROFILE

olFolderContacts = 10
olContactClassID = 40
Set fld = ns.GetDefaultFolder(olFolderContacts)
For Each oContact In fld.Items
  If cint(oContact.Class) = olContactClassID Then
     sHtml = sHtml & ContactToXML(oContact, PhoneType_HOME, oContact.HomeTelephoneNumber)
     ContactToXML = "<Contact>" & crlf
     
     sHtml = sHtml & "<LastName>" & oContact.LastName & "</LastName>"  & crlf
     sHtml = sHtml & "<FirstName>" & oContact.FirstName & "</FirstName>" & crlf
     sHtml = sHtml & "<Phone>" & crlf
        sHtml = sHtml & "<phonenumber>" & oContact.BusinessTelephoneNumber & "</phonenumber>" & crlf
        sHtml = sHtml & "<accountindex>0</accountindex>"  & crlf
     sHtml = sHtml & "</Phone>" & crlf
     sHtml = sHtml & "</Contact>" & crlf
  End If
Next

sHtml = sHtml & "</AddressBook>"



Dynamic XML Phonebook from MySQL table

MySQL table create script

Run the SQL script below in phpmyadmin or the mysql command line. Insert your phonebook entries while you're there. This accepts integer phone numbers only for now.

CREATE TABLE `phonebook` (
 `id` int(11) NOT NULL auto_increment,
 `LastName` varchar(30) NOT NULL,
 `FirstName` varchar(30) NOT NULL,
 `phonenumber` varchar(10) NOT NULL,
 `accountindex` smallint(6) NOT NULL default '0',
 PRIMARY KEY  (`id`),
 KEY `fname` (`LastName`,`FirstName`,`phonenumber`)
) COMMENT='GXP-2000 Phonebook';

I've changed definition of filed "phonenumber" becouse when you used the orginal structure, MySQL cutted-off leading 0 from number. (Marcin Kowalczyk)

PHP script

This script accesses the MySQL table created in the prior section. It generates the xml phonebook dynamically from the populated mysql phonebook table. Save this php script on your web server as gs_phonebook.php in a directory that the GXP-2000 can access via http port 80.

<?php

// File: gs_phonebook.php
// version: 1.0
// Date: 07-17-2006
// Author: Shane Steinbeck http://www.steinbeckconsulting.com
// Description: Realtime XML phonebook from MySQL database for Grandstream GXP-2000 firmware 1.1.1.17

header("Content-type: text/xml");

$host = "localhost";
$user = "dbuser";
$pass = "dbpassword";
$database = "dbname";

$linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host.");
mysql_select_db($database, $linkID) or die("Could not find database.");

$query = "SELECT LastName, FirstName, phonenumber, accountindex FROM phonebook ORDER BY LastName ASC, FirstName ASC";
$resultID = mysql_query($query, $linkID) or die("Data not found.");

$xml_output = "<?xml version=\"1.0\"?>\n";
$xml_output .= "<AddressBook>\n";
for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
 $row = mysql_fetch_assoc($resultID);
 $xml_output .= "\t<Contact>\n";
 $xml_output .= "\t\t<LastName>" . $row['LastName'] . "</LastName>\n";
 $xml_output .= "\t\t<FirstName>" . $row['FirstName'] . "</FirstName>\n";
 $xml_output .= "\t\t\t<Phone>\n\t\t\t\t<phonenumber>" . $row['phonenumber'] . "</phonenumber>\n";
 $xml_output .= "\t\t\t\t<accountindex>" . $row['accountindex'] . "</accountindex>\n";

 $xml_output .=  "\t\t\t</Phone>\n";
 $xml_output .= "\t</Contact>\n";
}

$xml_output .= "</AddressBook>";

/***************************************************************************************
  • Author: Mike
  • Date: 10/03/2006
  • This snipplet will save your xml file to the server for easier updating of your phone.
  • To facilitate automatic updates, add a cron job to run this file at your desired interval (i.e. hourly).
                                                                                                                                                                              • /
$fp = fopen('gs_phonebook.xml', 'wb');
fwrite($fp, $xml_output);
fclose($fp);
/**************************************************************************************/

print($xml_output);
echo $xml_output;
?>

Alternate PHP Script that has additional field 'TYPE'

I created an additional field in my phonebook script called 'type' that will help identify the type of number as follows:
  • H = Home
  • W = Work
  • C = Cell
  • F = Fax
  • P = Pager
  • M = Mobile

This change will require that an additional field be added to your phonebook table:
CREATE TABLE `gxp_phonebook` (
`id` int(10) unsigned NOT NULL auto_increment,
`first_name` tinytext NOT NULL,
`last_name` tinytext NOT NULL,
`phone_number` tinytext NOT NULL,
`account_index` tinyint(3) unsigned NOT NULL default '0',
`type` char(1) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

The following is my script:

<?php
// File: gs_phonebook.php
// version: 1.0
// Date: 07-17-2006
// Author: Shane Steinbeck http://www.steinbeckconsulting.com
// Description: Realtime XML phonebook from MySQL database for Grandstream GXP-2000 firmware 1.1.1.17

header("Content-type: text/xml");

$host = "[server]";
$user = "[uid]";
$pass = "[pwd]";
$database = "[db]";

$linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host.");
mysql_select_db($database, $linkID) or die("Could not find database.");

$query = "SELECT first_name
,last_name
,account_index
,phone_number
,type
FROM gxp_phonebook
ORDER BY last_name ASC
,first_name";
$resultID = mysql_query($query, $linkID) or die("Data not found.");

$xml_output = "<?xml version=\"1.0\"?>\n";
$xml_output .= "<AddressBook>\n";
for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++)
{
$row = mysql_fetch_assoc($resultID);
$xml_output .= "\t<Contact>\n";
$xml_output .= "\t\t<LastName>" . $row['last_name'] . "</LastName>\n";
$xml_output .= "\t\t<FirstName>" . $row['first_name'] . " [" . $row['type'] . "]</FirstName>\n";
$xml_output .= "\t\t\t<Phone>\n\t\t\t\t<phonenumber>" . $row['phone_number'] . "</phonenumber>\n";
$xml_output .= "\t\t\t\t<accountindex>" . $row['account_index'] . "</accountindex>\n";
$xml_output .= "\t\t\t</Phone>\n";
$xml_output .= "\t</Contact>\n";
}
$xml_output .= "</AddressBook>";

$fp = fopen('gs_phonebook.xml', 'wb');
fwrite($fp, $xml_output);
fclose($fp);

print($xml_output);
?>

GXP-2000 Configuration

To get GXP-2000 to use the script
  1. Log into the GXP-2000 web interface and change:
    1. Enable Phonebook XML Download: YES, HTTP.
    2. Phonebook XML Server Path to point to the .php on your webserver (i.e. 192.168.1.1/gs_phonebook.php).
    3. Remove Manually-edited entries on Download: NO
  2. Reboot and it should pull info out of the phonebook table

Dynamic XML Phonebook from Asterisk CallerID database

By Kurgan, 12 Oct 2006

It is possible to load the phonebook from the Asterisk CallerID database, thus using a single database (that is stored in Berkeley DB format inside Asterisk) to show caller names when receiving calls and to call people from the GXP-2000 phonebook.

This setup was tested using Asterisk 1.0.7 from Debian Sarge, and is far from being really "user friendly". It surely needs a better interface to manage the database, but it works and it is user friendly, as log as the users don't mess with the DB.

You need Apache and PHP on the same box that runs asterisk to create the XML phonebook file and to serve it to the phones via HTTP. You also need "sudo" because the user that apache runs as needs to be able to extract the database data from Asterisk. I know it's not really secure, but I have no users other than me on my PBX box, and the web interface is not accessible from the internet, so I suppose it should be acceptable.

First of all, you have to allow Apache to run asterisk to read out the database data, this is done by adding the following rule to /etc/sudoers:

www-data ALL = NOPASSWD: /usr/sbin/asterisk -rx database *


Then, add some test entries in Asterisk CID database. Run "asterisk -r" and enter:
database put cidname <number> <name>


Then, edit your dialplan (extensions.conf) to add the command to lookup cid name when a call comes in.

exten=> s,1,LookupCIDName(${CALLERIDNUM})


Then, put this script (named cid-xml.php) where it can be executed by your web server:


<?php
print("<?xml version=\"1.0\"?>\n<AddressBook>\n");
set_time_limit(5);
system("sudo /usr/sbin/asterisk -rx \"database show cidname\" > /tmp/asterisk_cid-list.txt");
$fd=fopen("/tmp/asterisk_cid-list.txt","r");
while ($line=fgets($fd,1000))
{
  if (strpos ($line,"cidname") == true) {
    $nome=trim(substr($line,strpos($line,":")+1));
    $numero=trim(substr($line,strpos($line,"cidname")+8,strlen($line)-strpos($line,":")-1));
    print("<Contact>\n<LastName>");
    print($nome);
    print("</LastName>\n<Phone>\n<phonenumber>");
    print($numero);
    print("</phonenumber>\n<accountindex>0</accountindex>\n</Phone>\n</Contact>\n");
  }
}
fclose ($fd);
print("</AddressBook>");
?>


Finally, configure the phones to load XML phonebook using HTTP, setting the URL to your script.

This setup is based on ideas taken from Asterisk cmd LookupCIDName and Asterisk tips managing CID names. You should check these pages too.



See Also

Created by Shane Steinbeck, Last modification by Tim Smith on Sat 01 of Sep, 2007 [03:55 UTC]

Comments Filter

Re:

by Lester Vecsey on Saturday 20 of October, 2007 [20:26:33 UTC]
I'm also noticting a limit to the phonebook size, for me I could load 53 entries successfully and adding a 54th entry resulted in the gxp-2020 phone simply not really displaying the please wait up to a minute dialog for a significant amount of time. In fact, I couldn't even see it appear. At 53 enrties my xml file is 10524 bytes, and as I said, adding another entry the phone refuses to load it. Perhaps I will try some download method other than HTTP. Yes, TFTP works fine with 27k file and ~137 entries. Phone details: Software Version: Program-- 1.1.4.14 Bootloader-- 1.1.4.5

Phonebook useability

by Adrian Walmsley on Thursday 01 of February, 2007 [19:24:15 UTC]
Thanks to the people who contributed the MySQL definitions and php script, I downloaded a phonebook with about 120 entries.
Works really well (via TFTP 'cos I couldn't get HTTP download to work).

Is there a fast way to scroll through the phone book?
Getting to the bottom is tedious - verging on unusable - to have to hit the down arrow 120 times.


Out Of Memory Error

by Jack Thomas on Thursday 14 of December, 2006 [00:46:33 UTC]
Does anyone know if there is a memory limit on these things?

I have a phonebook with 220 entries and the XML is about 42k in size, in the syslog I get the following error:

Out of memory: 41508 net_provision.c:211, U=1302/41564

Prog = 1.1.1.14

Asterisk CallerID database

by Mike on Tuesday 31 of October, 2006 [23:50:52 UTC]
Kurgan, is your article valid for Trixbox setup as well? I don't see any reference to a "CallerID database" in Trixbox. Perhaps it has been replaced with SugarCRM?

Re: GXP 2000 XML SugarCRM

by Klemens Kasemaa on Saturday 28 of October, 2006 [14:51:15 UTC]
Instead of cronjob you can create xml on the fly. With apache for example put into .htaccess:
 RewriteEngine on
 RewriteRule ^gs_phonebook\.xml$ gs_phonebook.php

GXP 2000 XML SugarCRM

by christian Lange on Wednesday 18 of October, 2006 [16:20:28 UTC]
Here is my example of the gs_phonebook.php. It looks up the names from sugarCRM database and splits them to groupes (work: Cell: Other:)

WORKS WITH TRIXBOX and A@H

set your DB user name and password in the begining of the php file!!
Create gs-phonebook.xml and allow writing to it!!

Add a cron job to lounch the php file every hour!!

HAVE fun
                Christian


<?php

//##########################################
//# Config section

header("Content-type: text/xml");
       
$host = "localhost";
$user = "root";
$pass = "passw0rd";
$database = "sugarcrm";

$linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host.");
mysql_select_db($database, $linkID) or die("Could not find database.");

$query = "SELECT id, first_name, last_name, phone_home, phone_work, accountindex, phone_mobile, phone_other FROM contacts WHERE deleted = 0 ";
$resultID = mysql_query($query, $linkID) or die("Data not found.");


//$SelectPersonInfo = mysql_query($Query,$ConnectionSuccess);
$resultID = mysql_query($query, $linkID) or die("Data not found.");
      $SelectPersonInfo = mysql_query($query,$linkID);

$PersonDirectoryListing = "<?xml version=\"1.0\"?>\n";
$PersonDirectoryListing .= "<AddressBook>\n";
for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){



while ($row = mysql_fetch_array($SelectPersonInfo)) {
$CellPhoneT1 = ereg_replace(" ()", "", $rowphone_mobile>'phone_mobile');
$CellPhone = ereg_replace(" +", "00", $CellPhoneT1);

$HomePhoneT1 = ereg_replace(" ()", "", $rowphone_home>'phone_home');
$HomePhone = ereg_replace(" +", "00", $HomePhoneT1);

$WorkPhoneT1 = ereg_replace(" ()", "", $rowphone_work>'phone_work');
$WorkPhone = ereg_replace(" +", "00", $WorkPhoneT1);

$OtherPhoneT1 = ereg_replace(" ()", "", $rowphone_other>'phone_other');
$OtherPhone = ereg_replace(" +", "00", $OtherPhoneT1);

$FirstName = ereg_replace(" ()", "", $rowfirst_name>'first_name');
$LastName = ereg_replace(" ()", "", $rowlast_name>'last_name');


if ($row"phone_home") {
$PersonDirectoryListing .= "<Contact>\n";
$PersonDirectoryListing .= "<LastName>$LastName </LastName>\n";
$PersonDirectoryListing .= "<FirstName>$FirstName Home:</FirstName>\n";
$PersonDirectoryListing .= "<Phone>\n";
$PersonDirectoryListing .= "<phonenumber>$HomePhone</phonenumber>\n";
$PersonDirectoryListing .= "<accountindex>0</accountindex>\n";
$PersonDirectoryListing .= "</Phone>\n";
$PersonDirectoryListing .= "</Contact>\n";


}
if ($row"phone_mobile") {
$PersonDirectoryListing .= "<Contact>\n";
$PersonDirectoryListing .= "<LastName>$LastName</LastName>\n";
$PersonDirectoryListing .= "<FirstName>$FirstName Cell:</FirstName>\n";
$PersonDirectoryListing .= "<Phone>\n";
$PersonDirectoryListing .= "<phonenumber>$LongDistanceExtension$CellPhone</phonenumber>\n";
$PersonDirectoryListing .= "<accountindex>0</accountindex>\n";
$PersonDirectoryListing .= "</Phone>\n";
$PersonDirectoryListing .= "</Contact>\n";

}

if ($row"phone_work") {
$PersonDirectoryListing .= "<Contact>\n";
$PersonDirectoryListing .= "<LastName>$LastName</LastName>\n";
$PersonDirectoryListing .= "<FirstName>$FirstName Work:</FirstName>\n";
$PersonDirectoryListing .= "<Phone>\n";
$PersonDirectoryListing .= "<phonenumber>$LongDistanceExtension$WorkPhone</phonenumber>\n";
$PersonDirectoryListing .= "<accountindex>0</accountindex>\n";
$PersonDirectoryListing .= "</Phone>\n";
$PersonDirectoryListing .= "</Contact>\n";

}
if ($row"phone_other") {
$PersonDirectoryListing .= "<Contact>\n";
$PersonDirectoryListing .= "<LastName>$LastName</LastName>\n";
$PersonDirectoryListing .= "<FirstName>$FirstName Other:</FirstName>\n";
$PersonDirectoryListing .= "<Phone>\n";
$PersonDirectoryListing .= "<phonenumber>$OtherPhone</phonenumber>\n";
$PersonDirectoryListing .= "<accountindex>0</accountindex>\n";
$PersonDirectoryListing .= "</Phone>\n";
$PersonDirectoryListing .= "</Contact>\n";


}
}

}

$PersonDirectoryListing .= "</AddressBook>\n";
  1. If the variable ID is not passed in on the GET string, then do the
  2. entire company directory, unless last is passed in. If so then we
  3. will be using a LIKE filter in our SQL query

$fp = fopen('gs_phonebook.xml', 'wb');
fwrite($fp, $PersonDirectoryListing);
fclose($fp);

print($$PersonDirectoryListing);
echo $PersonDirectoryListing;

?>



Munlan

Re: Big address books problem.

by Andy on Wednesday 11 of October, 2006 [12:19:40 UTC]
Thanks Nick, that did the trick for me. If anyone is interested, the PHP you need:
<?php
ob_start();
— YOUR CODE INCLUDING ECHO/OUTPUT LINES
header('Content-Length: ' . ob_get_length());
ob_end_flush();
?>

Big address books problem.

by Nick Lopez on Tuesday 10 of October, 2006 [19:05:30 UTC]
I was having trouble getting past 7 or so entries as well, until I tweaked my LDAP to grandstream script to buffer all it's output and send a proper Content-Length header. With the header I can get an address book with 54 entries to load on the phone.
FW: 1.1.1.12

by Andy on Monday 21 of August, 2006 [15:44:54 UTC]
Unfortunately I was already on the 1.1.1.9 Beta :
Program-- 1.1.1.9 Bootloader-- 1.1.1.1
Still the same problem, 7 or more and it fails to add.

Any other suggestions fellas?

Upload Not Working

by Tom Beauchamp on Friday 18 of August, 2006 [15:46:50 UTC]
This is fixed in the 1.1.1.9 Beta firmware. Upgrade and see if you still have the problem.

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver