pots - pbx
Post on 10-Apr-2018
237 Views
Preview:
TRANSCRIPT
-
8/8/2019 POTS - pbx
1/48
Design and ImplementingDesign and Implementinga 1-to-4 PBX Systema 1-to-4 PBX System
Using a MicrocontrollerUsing a Microcontroller
Behdad Hosseini
University of Isfahan, Iran
May 2003
-
8/8/2019 POTS - pbx
2/48
May 20031-to-4 PBX Project2
PrefacePreface
This is the presentation of a project in partial fulfillment of the
requirement for the degree of Bachelor of Engineering in hardware
engineering presented to Department of Computer Engineering,Engineering Faculty, University of Isfahan. The title of project is Design
and Implementing a 1-to-4 PBX System Using a Microcontroller.
The project started since September 2002 and lasted until May 2003.
Ive done lots of its work in my home without any laboratory facility. So I
hope Ive done something acceptable.
There are some useful technical documents about my project likehardware schematics, a project report (but in Farsi) and its software in
assembly language. All of them can be found in the projects web site.
I like to acknowledge everybody (especially my family) that helped my
in my project.
-
8/8/2019 POTS - pbx
3/48
May 20031-to-4 PBX Project3
AbstractAbstract
Telephone centers or more precisely, branch exchange systems, are
electrical and electronical systems that are responsible for establishing
telephony communications. Their behavior can be explained bymaking conversations between connected phones. Private Branch
eXchanges (PBXs) are some kind of such systems that are mainly
used in companies, organizations and other private complexes.
In this project, Ive designed and implemented a PBX system that is
capable of switching 4 phones (lines) and an external connection
(trunk). A microcontroller from MCS-51TM family is used for handlingand controlling the whole system. The switching unit is realized via 3
analog conversation circuits (one for each conversation connection).
The hardware is implemented on 8 breadboards and the software is in
the MCS-51TM assembly language.
-
8/8/2019 POTS - pbx
4/48
IntroductionIntroduction
-
8/8/2019 POTS - pbx
5/48
May 20031-to-4 PBX Project5
ContentsContents
Switching TheorySwitching Theory
Telephone Switching SystemTelephone Switching System
About The PhonesetsAbout The Phonesets
-
8/8/2019 POTS - pbx
6/48
May 20031-to-4 PBX Project6
Switching Theory (1)Switching Theory (1)
Switched NetworkSwitched Network A network consists of some entities (stations)that can communicate with each other and some controlling systems. If
we use some switching nodes instead of connecting every pair ofstations, weve made a switched network.
SwitchingSwitching means controlling some connections to making favoritepaths. These selections (and its actuators) are under our control. A
path can carry any signal from power to speech signals. About our
task, assume we have some phones or equally some speech signals.
We want to connect these phones to each other so we are concernedabout switchingthese signals.
-
8/8/2019 POTS - pbx
7/48May 20031-to-4 PBX Project7
Switching Theory (2)Switching Theory (2)
Types of switching:Types of switching:
CircuitCircuit the traditional form of the switching which makes the paths
physically by switches like relays and codecs. It is like an electrically closecircuit that connects our two desired points. So we can have any kind of
signaling if the frequency response of the path allows us and the current
value is supported by the elements. It means we can have analog or digital
data.
PacketPacket this kind of switching makes a virtual path not a physically one.The data must be digital and encapsulated in packets. A packets is a
collection of data bits plus control bits that constructs its frames. The
switching can be performed by a simple PC or some specially designed
digital processing systems. So we can only transmit digital data or digitized
analog data.
-
8/8/2019 POTS - pbx
8/48May 20031-to-4 PBX Project8
Telephone Switching System:Telephone Switching System:
Definition (1)Definition (1)
DefinitionDefinition An electrical and electronical circuit switching system iscalled Telephone Switching System if the switched data is in the form
of analog speech signals (i.e signals with frequency between 0 and4kHz) and can understand the request signals like dialing and can also
send meaningful informative signals like ringing. The electronic
technology of the system doesnt matter. The important aspect is the
system behavior not the system structure. The switching section
usually is implemented in circuit switching model and can be analog or
can be digital as is done in new high performance systems.BehaviorBehaviorFrom more practical point of view, Telephone SwitchingSystems are capable of establishing conversation connections
between some connected phones or some external links (e.g from
another system).
-
8/8/2019 POTS - pbx
9/48May 20031-to-4 PBX Project9
Telephone Switching System:Telephone Switching System:
Definition (2)Definition (2)
Types (Electronics)Types (Electronics) The Telephone Switching Systems can becategorized by the electronic technology to:
analog digital
Types (Domain)Types (Domain) Theres also another kind of categorization that isrelated to the domain of use (will be discussed in the next slides):
Global eXchange (GX)
Private Branch eXchange (PBX)
-
8/8/2019 POTS - pbx
10/48May 20031-to-4 PBX Project10
Telephone Switching System:Telephone Switching System:
HistoryHistory
Point-to-point phones in 1876 (Bell)Point-to-point phones in 1876 (Bell)
Manual Telephone Switching CenterManual Telephone Switching Center
Crossbar (Matrix) Telephone Switching CenterCrossbar (Matrix) Telephone Switching Center
Automated Central Telephone SwitchingAutomated Central Telephone Switching
Analog Telephone Switching SystemAnalog Telephone Switching System
Digital Telephone Switching SystemDigital Telephone Switching System
Exchange SystemExchange System
-
8/8/2019 POTS - pbx
11/48May 20031-to-4 PBX Project11
Telephone Switching System:Telephone Switching System:
Some Technical Words (1)Some Technical Words (1)
LineLine A voice link is called a line if it is supposed to connect a phone(or some systems alternatively) to the telephone network. Each lines
contains just one conversation link.TrunkTrunk A voice link is called a trunk if it connects two switchingsystems. So a trunk may contain more than one conversation links
(multiplexing).
Tip & RingTip & Ring These are two wires that carries electrical voice signals(in analog form). The positive one is called Ring and the negative is
Tip.
Inbound SignalingInbound Signaling If the request and respond signals (like dialingand ringing) is carried over tip and ring, it is inbound signaling. It is
more used in lines where one side is a phoneset.
-
8/8/2019 POTS - pbx
12/48May 20031-to-4 PBX Project12
Telephone Switching System:Telephone Switching System:
Some Technical Words (2)Some Technical Words (2)
Outbound SignalingOutbound Signaling If we add some wires to the tip and ring justfor transmitting the control signals, it is called outbound signaling. In
this form, conversation is isolated from other signals. The trunksusually uses outbound signaling because of its higher quality and ease
of use.
Conversation CircuitConversation Circuit In analog telephone switching system thereare some buses (separated from each other) that may hold
conversations and is called conversation circuits (one conversation in
one circuit). It means each line / trunk can be connected /disconnected from each bus (like a matrix).
-
8/8/2019 POTS - pbx
13/48May 20031-to-4 PBX Project13
Telephone Switching System:Telephone Switching System:
GXGX
Global eXchange (GX)Global eXchange (GX) is a switching system that is implemented inhigh scales to support a lot of lines and trunks. The formal telephone
network is implemented by GXs. The local telephone wires that iscame to our house is from a GX. These systems are connected
hierarchically to build the whole telephone network in a country or in
the world. The systems in leaf of that tree is connected to phonesets or
alternatively to a PBX.
ConnectionsConnections As is obvious from next slide, a GX is connected to
phonesets (or PBXs) through lines and another GXs through trunks. Adigital processing system can observe and control the policies of the
system but can be removed later. Monitor panel is a panel to show
some signals like current connections.
-
8/8/2019 POTS - pbx
14/48May 20031-to-4 PBX Project14
Telephone Switching System:Telephone Switching System:
GX ConnectionsGX Connections
GX Switching System
Data Processing
System
Monitor Panel
Power
Trunks&
Another GX
Phone 1Line 1
Phone 2Line 2
Phone ILine I
Signals
-
8/8/2019 POTS - pbx
15/48May 20031-to-4 PBX Project15
Telephone Switching System:Telephone Switching System:
PBXPBX
Private Branch eXchange (PBX)Private Branch eXchange (PBX) is a switching system butusually in much lower scales to support the lines and trunks just for an
organization, company or another private complex. It designed forprivate use i.e to switch some phonesets internally and also for
external connections through a few incoming lines (from the local GX).
So a hospital, hotel and can connect all of its phones to the public
telephone network just through some few links.
ConnectionsConnections As is obvious from next slide, a PBX is connected to
phonesets (or PBXs) through lines and GXs through trunks. A digitalprocessing system can observe and control the policies of the system
but can be removed later. Monitor panel is a panel to show some
signals like current connections. Operator is a phoneset-like system
that has the ability to control connections specially from trunks to lines
and some other permissions.
-
8/8/2019 POTS - pbx
16/48May 20031-to-4 PBX Project16
Telephone Switching System:Telephone Switching System:
PBX ConnectionsPBX Connections
PBX Switching System
Trunk 1GX 1
Data Processing
System
Operator Monitor
Panel
Power
Trunk 2GX 2
Trunk JGX J
Phone 1Line 1
Phone 2Line 2
Phone ILine I
-
8/8/2019 POTS - pbx
17/48May 20031-to-4 PBX Project17
About The Phonesets (1)About The Phonesets (1)
On-hook / Off-hookOn-hook / Off-hook These are two traditional words to express thephysical mode of the phone. When the handset of a phoneset is in its
place and can be ringed, it is in on-hook mode. When the handset is inhand (a conversation or dialing is in progress) the mode is off-hook.
VoiceVoice The most important aspect of a phoneset is its ability to sendand receive speech signals through two wires: tip and ring. In a
handset there is a speaker and a microphone and the tip and ring pass
through these components (serially). The switching system is
responsible to put a dc power on these wires so the voice signals canbe carried over this voltage. It is obvious that in the conversation mode
the phoneset shows a dc resistance and lets dc current pass (a dc-
loop).
-
8/8/2019 POTS - pbx
18/48May 20031-to-4 PBX Project18
About The Phonesets (2)About The Phonesets (2)
DialingDialing When a phone wishes to connect to another, there must be away of addressing the destination. In nowadays telephone networks,
each phone (line) has a unique decimal number (with respect to itslocal). The process of repeatedly sending the digits of destination no is
called dialing. There are two dialing modes:
PulsePulse the phoneset opens and closes the dc-loop in a predefined timing tosend the the dialed digit to switching system.
ToneTone the phoneset sends some special wave with predefined timings and
frequencies to show the dialed no. It this mode the dc-loop always exists.
RingingRinging When a phone wishes to connect to another one, theswitching system sends an ac power to the destination. If the
destination phone is in on-hook mode, it rings. In the on-hook mode
there isnt a dc-loop but an ac-loop establishes.
-
8/8/2019 POTS - pbx
19/48May 20031-to-4 PBX Project19
About The Phonesets (3)About The Phonesets (3)
Notifying TonesNotifying Tones There are some tones that switching systems sendto phones to inform the user of the result of its request.
Dial toneDial tone a continuous wave after the handset pickup. It means it is readyto accept the dialing.
Ring back toneRing back tone a discrete wave synchronous with ring wave to informthe requester that the requested phone is ringing.
Busy toneBusy tone a discrete wave which means the requested phone is busy.
Invalid toneInvalid tone a discrete one which means the dialed number is invalid.
Usually, its frequency is higher than the other tones.
-
8/8/2019 POTS - pbx
20/48
The ProjectThe Project
-
8/8/2019 POTS - pbx
21/48May 20031-to-4 PBX Project21
ContentsContents
TitleTitle
BehaviorBehavior
Design ConsiderationsDesign Considerations
HardwareHardware
SoftwareSoftware
Sample ProcessesSample Processes
-
8/8/2019 POTS - pbx
22/48
May 20031-to-4 PBX Project22
TitleTitle
Design and Implementing a 1-to-4 PBX System Using a
Microcontroller.
PBXPBX The project is a telephone switching system and is a PrivateBranch eXchange.
1-to-41-to-4 It supports 4 lines (connection to phones) and 1 trunk(connection to local GX).
MicrocontrollerMicrocontrollerThe controller section is a microcontroller (a digital
processor + internal RAM + internal ROM + internal timers ).
-
8/8/2019 POTS - pbx
23/48
May 20031-to-4 PBX Project23
Behavior (1)Behavior (1)
ConnectionsConnections The system is connected to 4 normal phones and 1external line (from local GX). The monitor panel is the monitoring leds
on the projects boards. The input power is 220V, 50Hz ac voltage.The optional data processing system is not implemented in this version
of project (see next slide for details).
Dialing modeDialing mode The system supports only pulse dialing. It has noreaction when encountering tone dialing.
Number assignmentsNumber assignments The system has 5 valid numbers: 0 for thetrunk, 1 for the 1st line, 2 for 2nd, 3 for 3rd and 4 for 4th line. Other
numbers are invalid.
-
8/8/2019 POTS - pbx
24/48
May 20031-to-4 PBX Project24
Behavior (2)Behavior (2)
TonesTones The system has 4 tones:
Dial toneDial tone system is ready for dialing.
Ring back toneRing back tone requested phone is ringing. Busy toneBusy tone requested phone is busy.
Invalid toneInvalid tone dialed no is invalid.
ServicesServices No special services (like diverting, auto answering, ) existin this version of implementation. Note that the design method
guaranties adding new services and capabilities.
-
8/8/2019 POTS - pbx
25/48
May 20031-to-4 PBX Project25
Behavior:Behavior:
ConnectionsConnections
Projects PBX Switching
System
Trunk 1GX 1
Data Processing
System
Monitor Panel
Power
Phone 1Line 1
Phone 2Line 2
Phone 4
Line 4
Phone 3Line 3
-
8/8/2019 POTS - pbx
26/48
May 20031-to-4 PBX Project26
Design Considerations (1)Design Considerations (1)
Modular designModular design Everything in this project is designed with modularmethod. In this method special & predefined tasks are assigned to
each subsystem. These subsystems communicate with sendingrequests and getting answers to each other in order to perform a
complex task. This method guaranties the following characteristics:
Readability, writablity, debuggingReadability, writablity, debugging A reader can understand themechanisms better. The modifications are easy and the bugs can be
discovered quickly.
Upgrade & developmentUpgrade & development Hardware and software additions (like addinglines or trunks, adding special services, ) are easy tasks. The project
development is bright and straight.
Analog switchingAnalog switching The system utilizes the circuit switching withanalog technology. So there are some conversation circuits (i.e 3) to
switch connections.
-
8/8/2019 POTS - pbx
27/48
May 20031-to-4 PBX Project27
Design Considerations (2)Design Considerations (2)
Nonblocking systemNonblocking system Every phone can be connected to anotherone at any desired time. It means a connection wont be blocked
because of lack of resources. There are 2 conversation circuits forinternal switching (i.e 4 phones) and 1 for connecting the phones to
trunk.
Digital controllerDigital controllerA microcontroller from MCS-51TM family is selectedfor controlling the whole system. It is observed that even though the
switching is analog, the controller is digital making all internal signals
(except voice signals) digital.
Trunk ring policyTrunk ring policy If a ring is sent to the trunk (by the local GX) thesystem checks line 1 then 2 to find first free phone and sends the
ring to the found phone in order to connect it to the trunk. Therefore in
this project, operator can be neglected.
-
8/8/2019 POTS - pbx
28/48
May 20031-to-4 PBX Project28
Hardware:Hardware:
StructureStructure
Control Unit
Line Unit
Trunk Unit
Power
Supply
Unit
Switch Unit
ProjectsPBX
System
Monitoring
Signals
Data
Signals
Line1
Line2
Line4
Line3
Trunk
1
-
8/8/2019 POTS - pbx
29/48
May 20031-to-4 PBX Project29
Hardware:Hardware:
UnitsUnits
Power Supply UnitPower Supply Unit This unit is responsible for supplying the necessaryvoltages that other units need. This unit must supply the voice carrier
voltage applied to the phoneset, so must be designed with care.
Line UnitLine Unit This unit interfaces the system with phonesets. It detects thedialing & phone mode and also send ring signal. In this unit, tip and ring of
each phone (for use in switch unit) is constructed.
Trunk UnitTrunk Unit It interfaces with trunk and has responsibilities similar to lineunit. The tip and ring of trunk (for use in switch unit) is constructed.
Switch UnitSwitch Unit It has some conversation circuits and switches the phonesand trunk (under control of control unit) i.e their tip and ring wires.
Control UnitControl Unit This unit controls the whole system. It gets detect signalsfrom line and trunk units and sends control signals to switch unit and (if
necessary) to line and trunk units.
-
8/8/2019 POTS - pbx
30/48
May 20031-to-4 PBX Project30
Hardware:Hardware:
Some ComponentsSome Components
RelaysRelays The main switch components that is used in this project arerelays. A relay is an electrical-mechanical component capable ofattract a contact with an electrical command in order to connect /
disconnect some connections. It is like a key with electrical control.Despite of its mechanical problems, its an idle component for passinga wide range of signals with different powers.
Open collector not gatesOpen collector not gates Just like normal logical not gates, opencollector not gates, negates the input signals but with one majordifference. The output layer transistors are open collectors, which
means are not connected to power voltage.Opto-couplersOpto-couplers A semiconductor device which consists of a normalled and a BJT transistor with optically sensitive base. If a current ispasses through the led, it stimulated base just like a normal current.Its main usage in this project, is detecting dc-loop in order to findphoneset mode.
-
8/8/2019 POTS - pbx
31/48
May 20031-to-4 PBX Project31
Hardware:Hardware:
Boards (1)Boards (1)
Power Supply boardPower Supply board It produces the following voltages: +5Vdc: for the digital (gates and microcontroller) components.
+18Vdc: for carrying the voice signal and also for driving the relays. 110Vac: This board also generates an ac voltage (around 50Hz) as the
ring voltage for applying to phonesets.
Line boardsLine boards Each line board contains 2 line interface circuits thatinterfaces a phoneset to the system and do the following tasks:
Detecting the phone mode (Off-hook or On-hook), also useful for detecting
pulse dialing signals. Applying the ring to phone, if necessary.
Carry tip and ring wires to switch unit for switching.
Showing the phone mode and phone ring signal by two leds.
-
8/8/2019 POTS - pbx
32/48
May 20031-to-4 PBX Project32
Hardware:Hardware:
Boards (2)Boards (2)
Trunk boardTrunk board The trunk board contains 1 trunk interface circuits thatinterfaces a trunk to the system and do the following tasks:
Detecting the trunk ring signal. Carry tip and ring wires to switch unit for switching.
Showing the ring signal and connect mode by two leds.
Conversation Circuit boardsConversation Circuit boards Each conversation circuit boardcontains 1 conversation circuit that is able to create one conversation
between some lines or trunk. Control unit controls which relays are active
and therefore switching of each circuit.
Control boardControl board This board has one microcontroller from MCS-51TM(AT89C52) that controls the system by scanning the detect signals and
retrieving the request information then sending controlling or monitoring
signals and if necessary, switching the lines / trunk (via switch unit).
-
8/8/2019 POTS - pbx
33/48
Sw
itchUnit
ConversationCirc
uit0board
pbx.dsn
)
ConversationCkt0she
et
(ConversationCirc
uit1board
pbx.dsn
)
ConversationCkt1she
et
(ConversationCircuit2board
pbx.dsn
)
Conversatio
nCkt2she
et
(
TrunkUnit
Trunk0board
pbx.dsn
)
Trunk0she
et
(
ControlUnit
Controlboard
pbx.dsn
)Control sheet(
C 0
_ S
0
C 0
_ S
1
C 0
_ S
2
C 0
_ S
3
C 0
_ T O N E
C 1
_ S
0
C 1
_ S
1
C 1
_ S
2
C 1
_ S
3
C 1
_ T O N E
C 2
_ S
0
C 2
_ S
1
C 2
_ S
2
C 2
_ S
3
C 2
_ T O N E
L 3
_ R N G
L 3
_ I N T R
L 3
_ D T C T
L 2
_ R N G
L 2
_ I N T R
L 2
_ D T C T
LineUnit
Line2&3board
pbx.dsn
)
Line2shee
t
(
pbx.dsn
)
Line3shee
t
(Line0&1board
pbx.dsn
)
Line0shee
t
(
pbx.dsn
)
Line1shee
t
(
L 1
_ R N G
L 1
_ I N T R
L 1
_ D T C T
L 0
_ R N G
L 0
_ I N T R
L 0
_ D T C T
L
0_
T I P
L
0_
R I N G
L
1_
T I P
L
1_
R I N G
L
2_
T I P
L
2_
R I N G
L
3_
T I P
L
3_
R I N G
T 0
_ T I P
T 0
_ R I N G
V C C
+ 1 8
V
R i
n g
1
R i
n g
2
Power
Supply
Unit
Power
Supply
board pbx.dsn )Power Supply sheet(
T 0
_ C N C T
T 0
_ R D T C T
Hardware: Boards DiagramHardware: Boards Diagram
-
8/8/2019 POTS - pbx
34/48
-
8/8/2019 POTS - pbx
35/48
May 20031-to-4 PBX Project35
Software:Software:
StructureStructure
Trunk Hardware Interface Unit
Trunk Control Unit
Trunk Ports
Ring & Tone Generator
Unit
Central Control Unit
Projects
Software
Architecture
Switch Hardware Interface Unit
Switch Control Unit
Switch Ports
Line Hardware Interface Unit
Line Control Unit
Line Ports
-
8/8/2019 POTS - pbx
36/48
May 20031-to-4 PBX Project36
Software:Software:
Units (1)Units (1)
Line Hardware Interface UnitLine Hardware Interface Unit This unit is responsible forinterfacing the line ports (hardware signals) to the software. Every
access to line ports are through this unit. This unit also translate detect
signals to some meaningful messages.
Trunk Hardware Interface UnitTrunk Hardware Interface Unit This unit is similar to Line one butinterfaces the trunk ports.
Switch Hardware Interface UnitSwitch Hardware Interface Unit This unit interfaces the switchports to software or in the other words, any access to switch ports
must be through this unit.
Line Control UnitLine Control Unit This unit controls each line by getting messagesfrom line interfaces and central control. In this unit the applied signals
to the phone is constructed and it watches over any change
concerning with the line (phone).
-
8/8/2019 POTS - pbx
37/48
May 20031-to-4 PBX Project37
Software:Software:
Units (2)Units (2)
Trunk Control UnitTrunk Control Unit Like the line one, this unit controls the trunk. Itreceives messages from trunk interface and central control in order to
build trunk control signals.
Switch Control UnitSwitch Control Unit This unit has a collection of useful routines forhandling and monitoring the switching.
Central Control UnitCentral Control Unit This unit is responsible for making inter-routine communication and higher policies are held in this unit. This
unit applies number assignments and connects the three above control
units to each other.
Ring & Tone Generator UnitRing & Tone Generator Unit This unit generates all of the tonesand waves that is needed in the software including: ring wave, dial
tone, busy tone, ring back tone and invalid tone.
-
8/8/2019 POTS - pbx
38/48
May 20031-to-4 PBX Project38
Software:Software:
Considerations (1)Considerations (1)
ConcurrencyConcurrency Because of executing some routines (like control units)in real time mode, we are encountering with a concurrency problem.
This can be solved by use of hardware interrupts but this solution is
not applicable in all situations where we have some software routines.
The used method is time sharing and use of timer interrupt. For
simplifying the context switching, all of the concurrent routines are
state-based. Whenever a change has been detected in the system, an
event is created and will be propagated in the related control units. So
the switching between concurrent routines is done by themselves notby forcing and cutting their execution.
-
8/8/2019 POTS - pbx
39/48
May 20031-to-4 PBX Project39
Software:Software:
Considerations (2)Considerations (2)
State-based routinesState-based routines State-based routines are routines that havesome finite states and are in one of those states in every specific
time.When a messages or events is received by these routines, the
state will be updated and if necessary some action will be done.
Event-driven routinesEvent-driven routines Whenever a change has been occurred inthe system, an event is created usually by interface routines and will
be reported to the other parts of the software. This mechanism
guaranties that if and only if something is changed, processor will
process it not always. Therefore the processor will have enough timeto complete concurrent tasks.
-
8/8/2019 POTS - pbx
40/48
May 20031-to-4 PBX Project40
Software:Software:
Phone StatesPhone States
StIdleStIdle Normal state of the phone i.e on-hook.
StDialToneStDialTone The handset is picked up and the dial tone must beapplied (ready to dial).
StDialingStDialing The user is dialing. No tone must be applied.
StInvalidToneStInvalidTone The requested no is invalid. Invalid tone must beapplied.
StBusyToneStBusyTone The requested no is busy. Busy tone must be applied.
StTrunkStTrunk The requested no is the trunk and the connection isestablished.
StRingbackToneStRingbackTone The requested phone is ringing. Ring back tonemust be applied.
StTalkStTalk A talk (conversation) is established and is in progress.
StRingStRing The phone is ringing (requested by another phone).
-
8/8/2019 POTS - pbx
41/48
StRingback
Tone
E v
C o n v
R e q
E v
T o n e
R e q
( T
n D
i a
l
(
StTalk
StRing
StDialTone
StIdle
StDialing
StInvalid
Tone
StBusy
Tone
StTrunk
E v
P
i c
k u p
E v
P
u t
d o w n
E v
S O D
E v
P u
t d o
w n
E v
P u
t d o
w n
E v
P u
t d o
w n
E v
E O D + E
v N
o I
n v a
l i d
E v
E O D + E
v N
o L
i n e
B u s y
E v
E O D + E
v N
o T
r u n
k B
u s y
E v
E O D + E
v N
o T
r u n
k O K
E v
E O D + E
v N
o L
i n e
R B
E v
P u
t d o
w n
E v
P u
t d o
w n
E v
E O R
E v
S O R
EvPickupEvTalk
Accept
E v
T a
l k
A c c e p
t
E v
A
l l
R e
l
E v
T
a l k
C a n c e
l
E v
A
l l
R e
l
E v
A
l l
R e
l
E
v T
r u n
k R
e l
E v
A l l
R e
l
E v
T o n e
R e q
( T
n N
o
(
E v
P u
t d
o w n
EvDigitDialed
E v
T o n e
R e q
( T
n I
n v a
l i d
(
E v
T o n e
R e q
( T
n B
u s y
( E v
T o n e
R e q
( T
n R
i n g
b a c
k
(
E v
A
l l
R e
l
E v
T o n e
R e q
( T
n N
o
(
Software: Phone State DiagramSoftware: Phone State Diagram
-
8/8/2019 POTS - pbx
42/48
May 20031-to-4 PBX Project42
Software:Software:
Routines (1)Routines (1)
Initialize routinesInitialize routines These routines are executed once (usually after areset) and will initialize variables and set up the timer settings.
Timer ISR routineTimer ISR routine When an interrupt is received by the processor, itwill execute this routine that is responsible for invoking the timingroutines repeatedly.
Timing routinesTiming routines These routines make the necessary timings like1ms, 20ms, 1s and will call the time sensitive routines (like interface
routines) with special periods.
Memory Access routinesMemory Access routines Access to memory is through theseroutines. Each routine that needs to restore / retrieve some value (like
its state) will call the related memory access routine.
-
8/8/2019 POTS - pbx
43/48
May 20031-to-4 PBX Project43
Software:Software:
Routines (2)Routines (2)
Hardware Access routinesHardware Access routines These routines interface the softwareand ports. Any routine that needs to change or read a port will do that
via these routines.
Interface routinesInterface routines These routines translate the hardware signals toevents (if required) and will propagate it through the software.
Control routinesControl routines These routines control the parts of the hardware(lines, trunk and switches) by attending to events and messages from
interface and other control routines.
Debugging routinesDebugging routines There are some routines just for debuggingand development of the software. These routines can be removed in
the final implementation of the software.
-
8/8/2019 POTS - pbx
44/48
May 20031-to-4 PBX Project44
Sample Processes (1)Sample Processes (1)
Internal connectionInternal connection In this process a line connects to another line.First, a user pickups the handset (off-hook). The hardware signal is
detected by the interface routines and the appropriate event is
generated. The state of its line control will be updated and the dial tone
will be applied. Now, requester starts to dial, the software finds out the
dialed no by watching over the hardware, then sends the no to central
control and gets the meaning of the dialed no. Assume it is no of a free
line. The destination starts to ring. When the handset is picked up, the
connection is established (switched) and voice signals can betransmitted. When two sides put down the handsets (on-hook) the
connection is ended and the resources are returned to the system.
-
8/8/2019 POTS - pbx
45/48
May 20031-to-4 PBX Project45
Sample Processes (2)Sample Processes (2)
External connectionExternal connection In this process the trunk is ringed by the localGX. First the ring is detected by hardware and the interface software
makes an event to inform the central control of what has been
happened. In this case, according to the trunk ring policy of the
system, the first free phone with higher priority will be ringed. When the
handset is picked up the connection starts and a dedicated
conversation circuit will hold the conversation. When the destination
put downs the handset (off-hook), the resources return to the system
and the communication ends.
-
8/8/2019 POTS - pbx
46/48
SummarySummary
-
8/8/2019 POTS - pbx
47/48
May 20031-to-4 PBX Project47
Summary (1)Summary (1)
Development Suggestions:Development Suggestions: The switch unit can be implemented using digital technology. It needs
major changes in hardware and software.
Tone dialing can be supported by adding some hardware component to
line boards. Of course some software modification is needed.
Operator is another possible addition that can be implemented using a new
hardware unit and its software drivers.
Lots of services like diverting, auto answering, conferencing and
monitoring and also logging can be supported by system just by adding
required software routines.
-
8/8/2019 POTS - pbx
48/48
Summary (2)Summary (2)
Conclusion:Conclusion: This project is an electrical and electronical circuit switching system, a PBX
i.e a Private Branch eXchange that is implemented in analog technology.
Mixture of electronics, communication, software and hardware theories and
technologies are used to construct the project.
More Information:More Information: All of project documents are in electronic form and are stored as PC files,
please refer to them for more technical information.
For information of the used microcontroller, please refer to the Intelofficial site: www.intel.com.
http://www.intel.com/http://www.intel.com/
top related