Implementation of a Management System for a Web-Based PBX Server Student: Phuong-Nhung Bui

advertisement
Implementation of a
Management System for a
Web-Based PBX Server
Student: Phuong-Nhung Bui
Advisor: Dr.-Ing. Chao-Huang Wei
EE Department
Southern Taiwan University
Contents
12
1
2
3
4
5
6/29/2009
Motivation
Introduction
System Configuration
Communication Protocol
Applications
Conclusion and Further Works
Automation 2009
2
Motivation
Due to:
 Rapid growth of global internet connections.
 Trend of the client/server applications.
Classical PBX need be enhanced to cope
with this trend.
This paper proposes a PBX server for
remote online management.
6/29/2009
Automation 2009
3
Introduction
PBX (Private Branch Exchange) is a
telephone exchange device that serves a
particular business or office, PBXs make
connections
among
the
internal
telephones of a private organization —
usually a business office — and also
connect them to the PSTN (Public
Switched Telephone Network) via trunk
lines.
6/29/2009
Automation 2009
4
Targets of the Server

Application:
 Billing system .
 Caller’s personal data .
Will be used in hotels, office or
dormitories .
6/29/2009
Automation 2009
5
PBX Server Functions
PBX server
 Collects some information from the
incoming and outgoing telephone calls.
 Records data to a MySQL database.
 Provides web pages written in PHP and
HTML.
 Allows authorized user to access these
data through internet using simple web
browser .
6/29/2009
Automation 2009
6
System Configuration
PBX Server
6/29/2009
Automation 2009
7
System Configuration
The PBX server requires a
web server installed together
with a server-side, and a
database.
 Using open source software
for application development
makes it cost effective and
flexible.
Web Browser
Internet
Web Server
PHP Scrips
Server-side
MySQL Database
RS232
PBX
PSTN
6/29/2009
Automation 2009
8
Database
MySQL
 Program providing multi-user, multi-threaded
and robust SQL (Structured Query Language)
database server .
 Main features: speed, robustness,
flexibility to store large data .
and
 Freeware
The database server of choice .
6/29/2009
Automation 2009
9
Web Server
Apache web server
 Responsible for accepting HTTP requests
from the users’ browser .
 Fast, stable and feature-full open source web
server..
 Runs under multitasking operating systems .
 Capable of handling simultaneous requests .
6/29/2009
Automation 2009
10
PHP scripting language
PHP: scripting language
 Usually used for web development and can be
embedded into HTML.
 Generally runs on a web server, taking PHP
code as its input and creating web pages as
output.
 Suited for web database applications :
• Supports wide range of databases .
• Tools that integrate the web and
environments .
6/29/2009
Automation 2009
database
11
Server Actions
Request from user
Web server executes PHP code that link to MySQL
to get information and generates webpage
Resolves the user’s control
messages to the server-side
Send command to PBX
6/29/2009
Automation 2009
12
Data Recording
Server-side receives information about
incoming and outgoing calls
Records them to MySQL
6/29/2009
Automation 2009
13
Server Program
Listening socket
Opened RS232 port
Create a listening
socket on a
specific port
Waiting for
package
Listen connection
Package go in?
N
Y
Client request ?
N
Record to MySQL
Y
Create connection
Receive control
message
Send control
message to PBX
Close conection
6/29/2009
Automation 2009
14
Message Format
0
1
2
3
4
5
6
7
0123456789012345678901234567890123456789012345678901234567890123456789012345678901
$T I:94/03/22 200 201
01 88677253576
$TO:94/03/22 200 201
01 88677253576
Max.
26 digits
telephone
Tranfer
Source
Date
Month
Year
0000 12: 33: 44 00343 00000
0000 12: 33: 44 00343 00000
Call
duration
Second time
Minute
Hour
Account
Format of incoming and outgoing message
6/29/2009
Automation 2009
15
Control commands
Two important control command to the
PBX:
 "check in" function:
• From server-side to PBX: "CI 20", 0Dh, 0Ah
• From PBX to server-side: "OK CI 20", 0Dh, 0Ah or
“Can’t find out physical number! " 07h, 07h, 0Dh,
0Ah
 “check out” function:
• From server-side to PBX: "CO 20" 0Dh, 0Dh
• From PBX to server-side: "OK CI 20", 0Dh, 0Ah or
“Can’t find out physical number! " 07h, 07h, 0Dh,
0Ah
6/29/2009
Automation 2009
16
Applications
Based on the proposed server, a billing
system and a personal information
management are developed for the PBX.
Application is implemented on a PC with
Fedora Core installed .
This application is constructed with the
information pre-recorded in a database
which is obtained by the server-side .
6/29/2009
Automation 2009
17
MySQL database
MySQL
database
includes
telephone charge tables:




many
Local telephone calls .
Long distance calls .
Cell-phone calls .
International calls and its international dial
code .
PBX server calculates the charge of outgoing
calls.
6/29/2009
Automation 2009
18
System Login
6/29/2009
Automation 2009
19
Telephone Management
6/29/2009
Automation 2009
20
Telephone Billing
6/29/2009
Automation 2009
21
Personal information
6/29/2009
Automation 2009
22
Conclusion & Further
Works
The proposed PBX server has been
successfully deployed .
Authorized manager can access the
server to check all outgoing telephone
calls and the charge of each call or total
expense of one telephone set.
Telephone owner can check his (her)
spend and view historical record of
telephone calls, and the caller’s personal
data .
6/29/2009
Automation 2009
23
Conclusion & Further
Works
Convenient user’s interface via internet
web browser to access the PBX server.
Data security also provided to protect the
system from unauthorized access .
Further extension for some additional
functions, such as phone line wired home
security and remote control.
6/29/2009
Automation 2009
24
Download