Where is the database for ELX internal directory ?

cupid1305

Joined
Feb 16, 2011
Messages
41
Likes
0
Points
0
#1
Hi there ,

I'm looking for the database which has all the extension and name of my phone create on Elastix , how do i can get them ?

I'm really blocked and i spent a lot of time to look for this and it's why i request help.

I know that there are a db in /var/www/db/address_book.db but it containt the external directory and i want internal directory , all the entries (extension and name) that i have created .

I want to create xml directory files for my different brand phone (cisco , yealink,aastra)
and i will share with you my script after this B)

thank you so much :lol: , hope you can help me
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#2
Extensions are stored into the asterisk mysql database. You can use console, phpmyadmin, or webmin to see and edit its contents.
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#3
You can also use PBX - Batch of extensions into Elastix's main menu..
 

cupid1305

Joined
Feb 16, 2011
Messages
41
Likes
0
Points
0
#4
Thx i have make my script for cisco/linksys 504G phones , my script is good , and make a xml directory with the internal directory(endpoint.db) and external directory (address_book.db) .

I put my script , directory.php , in /var/www/html/xmlservices
when i put :
Code:
http://xx.xx.xx.xx/xmlservices/directory.php
in my browser , i have my xml directory but i can't get it with my phone :unsure:

I have configured it via the interface like this :

XML Directory Service URL:
Code:
http://xx.xx.xx.xx/xmlservices/directory.php
we can see on the phone's screen " Request failed "

My script is like this :

Code:
<?

header("Content-type: text/xml");
header("Connection: close");
header("Expires: -1");


$Server = $_SERVER["SERVER_ADDR"];
$url="http://".$Server."/xmlservices";


//$Page = $_GET['Page'];  // Page index
 
 /** déclaration variable ***/
$dirname = "Repertoire Interne";
$Menu = "";
$k=0;
$p=0;

// parse sip.conf
//$sip_array = parse_ini_file($location."sip_additional.conf", true);

$Menu .="<CiscoIPPhoneDirectory>\n";
$Menu .="<Title>".$dirname."</Title>\n";
$Menu .="<Prompt> Selectionnez un numero</Prompt>\n";

exec("sqlite3 -separator '-'  /var/www/db/endpoint.db \"select * from endpoint;\"",$Externe);
list($id,$tel,$nom,$account,$secret,$id_model,$mac,$id_vendor,$date,$comment)=explode("-",$Externe[$k]);

//

while ($k <= count($Externe)-1)
{ 
	list($id,$tel,$nom,$account,$secret,$id_model,$mac,$id_vendor,$date,$comment)=explode("-",$Externe[$k]);
	$Menu .= "<DirectoryEntry>\n";
	$Menu .= "<Name>$nom </Name>\n";
	$Menu .= "<Telephone>$account</Telephone>\n";
	$Menu .= "</DirectoryEntry>\n";
	$k++;
	
}


exec("sqlite3 -separator '*' -nullvalue 'no-mail' /var/www/db/address_book.db \"select * from contact;\"",$E_address_bookInterne);
list($idx,$nom,$prenom,$tel,$extension,$mail)=explode("*",$E_address_bookInterne[$p]);

sort($E_address_bookInterne);

while ($p <= count($E_address_bookInterne)-1)
{ 
	list($idx,$nom,$prenom,$tel,$extension,$mail)=explode("*",$E_address_bookInterne[$p]);
	$Menu .= "<DirectoryEntry>\n";
	$Menu .= "<Name>$nom $prenom </Name>\n";
	$Menu .= "<Telephone>$tel</Telephone>\n";
	$Menu .= "</DirectoryEntry>\n";
	$p++;
}

$Menu .= "</CiscoIPPhoneDirectory>\n";

$fp=fopen('cisco.xml',wb);
fwrite($fp,$Menu);
fclose($fp);

echo $Menu;

?>
Anybody has any idea :blush: , i have spent 5 hours to try solving this problem :(
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,565
Latest member
omarmenichetti
Top