voip/php/mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys

after to receive a lot of help from this list, and specialy from
Freddy Parra , I decided to  share some code writen in PHP to extract
some info from mysql tables.

I'm sending a gatekeeper.ini config, mysql scripts to create tables,
and PHP code to extract and show the infos. It is very simple, but I
decided to do exactly like Eric Raymond says in  The Cathedral and the
Bazaar,  "release early, release offten".

well, If someone is interested we could create a software to do it and
share using some licence as GPL.

tanks a lot my friends !!!!

feel free to send me an email !!

-- 
===================================
Glaucius Djalma Pereira Junior
glaucius@xxxxxxxxx
http://glaucius.intnet.com.br
===================================
"If idiots could fly, IRC would be an airport"

Attachment: gatekeeper.conf
Description: Binary data

-- MySQL dump 8.21
--
-- Host: localhost    Database: voip
---------------------------------------------------------
-- Server version	3.23.49-log

--
-- Table structure for table 'CDRS'
--

CREATE TABLE CDRS (
  CDRId bigint(20) NOT NULL auto_increment,
  DateTimeInserted datetime default '0000-00-00 00:00:00',
  Gatekeeper_Name varchar(30) NOT NULL default '',
  Call_Number int(11) default '0',
  Call_Duration int(11) default '0',
  ReleasedBy int(4) default '3',
  Disconnect_Cause varchar(5) default '0',
  Acct_Session_ID varchar(100) NOT NULL default '',
  H323_ID varchar(100) default '',
  Call_ID varchar(100) default '',
  Conf_ID varchar(100) default '',
  Setup_Time datetime default '0000-00-00 00:00:00',
  Connect_Time datetime default '0000-00-00 00:00:00',
  Disconnect_Time datetime default '0000-00-00 00:00:00',
  Caller_IP varchar(15) default '',
  Callee_IP varchar(15) default '',
  Calling_Station_ID varchar(50) default '',
  Called_Station_ID varchar(50) default '',
  Updated tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (CDRId),
  KEY Index_1 (Disconnect_Time,Call_Duration,Disconnect_Cause,Gatekeeper_Name)
) TYPE=MyISAM;

--
-- Table structure for table 'CustomerPrefixes'
--

CREATE TABLE CustomerPrefixes (
  CustomerId int(11) NOT NULL default '0',
  Prefix varchar(100) NOT NULL default '',
  Description varchar(45) NOT NULL default '',
  Deleted tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (Prefix)
) TYPE=MyISAM;

--
-- Table structure for table 'CustomerRates'
--

CREATE TABLE CustomerRates (
  RateID int(10) unsigned NOT NULL auto_increment,
  CustomerID int(10) unsigned NOT NULL default '0',
  Rate float NOT NULL default '0',
  StartDate datetime NOT NULL default '0000-00-00 00:00:00',
  EndDate datetime default NULL,
  PRIMARY KEY  (RateID),
  KEY Index_2 (CustomerID,StartDate,EndDate)
) TYPE=MyISAM;

--
-- Table structure for table 'Customers'
--

CREATE TABLE Customers (
  CustomerId int(11) NOT NULL default '0',
  CustomerName varchar(100) NOT NULL default '',
  PRIMARY KEY  (CustomerId)
) TYPE=MyISAM;

--
-- Table structure for table 'DisconnectCategories'
--

CREATE TABLE DisconnectCategories (
  CategoryId int(10) unsigned NOT NULL default '0',
  Description varchar(45) NOT NULL default '',
  PRIMARY KEY  (CategoryId)
) TYPE=MyISAM;

--
-- Table structure for table 'DisconnectCodes'
--

CREATE TABLE DisconnectCodes (
  Cause_Code_Dec varchar(5) NOT NULL default '',
  Value_In_Trace_Dec varchar(5) NOT NULL default '',
  Cause_Code_Hex varchar(5) NOT NULL default '',
  Value_In_Trace_Hex varchar(5) NOT NULL default '',
  Category int(10) unsigned NOT NULL default '0',
  Short_Description varchar(45) NOT NULL default '',
  Long_Description text NOT NULL,
  PRIMARY KEY  (Cause_Code_Hex)
) TYPE=MyISAM;

--
-- Table structure for table 'Gatekeepers'
--

CREATE TABLE Gatekeepers (
  GatekeeperId int(11) NOT NULL default '0',
  GatekeeperName varchar(50) NOT NULL default '',
  GraphAliasName varchar(50) default '',
  Disable tinyint(4) NOT NULL default '0',
  IPAddress varchar(15) NOT NULL default '',
  PRIMARY KEY  (GatekeeperId)
) TYPE=MyISAM;

--
-- Table structure for table 'ProviderPrefixes'
--

CREATE TABLE ProviderPrefixes (
  ProviderId int(11) NOT NULL default '0',
  Prefix varchar(100) NOT NULL default '',
  Description varchar(45) NOT NULL default '',
  RateID int(10) unsigned default '0',
  Deleted tinyint(3) unsigned default NULL,
  PRIMARY KEY  (Prefix)
) TYPE=MyISAM;

--
-- Table structure for table 'ProviderRates'
--

CREATE TABLE ProviderRates (
  RateID int(10) unsigned NOT NULL auto_increment,
  ProviderID int(10) unsigned NOT NULL default '0',
  Rate float default NULL,
  StartDate datetime NOT NULL default '0000-00-00 00:00:00',
  EndDate datetime default NULL,
  PRIMARY KEY  (RateID),
  KEY Index_2 (ProviderID,StartDate,EndDate)
) TYPE=MyISAM;

--
-- Table structure for table 'Providers'
--

CREATE TABLE Providers (
  ProviderID bigint(20) NOT NULL auto_increment,
  ProviderName varchar(50) NOT NULL default '',
  PRIMARY KEY  (ProviderID)
) TYPE=MyISAM;

Attachment: php-voip.tar.gz
Description: GNU Zip compressed data


[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux