VOIP
VOIP
(VoIP)
Ethernet
Router
LAN 1 LAN 2
LAN = Local Area Network
TCP = Transmission Control Protocol
IP = Internet Protocol 4
Institute of Communication Technologies , Islamabad.
June 8, 2020
www.ictech.edu.pk
• Different addressing schemes
Application
FTP
Application
Presentation ASCII/Binary
Session
TCP
Transport
Transport
Network IP Network
Link
Ethernet Link
Physical
Protocol Stack
App
Link
http://www.iana.org/assignments/port-numbers
The Trojans also use port numbers may be within the network
(un-used ports) and outside the network (used ports).
The lower ports are often used by Trojans that steals password
and either mail the passwords to attackers or hide them in FTP-
directories.
The higher ports are often used by Remote Access Trojans that
can be reached over the network.
http://www.simovits.com/nyheter9902.htm
l
At operating system level we use TCP/IP filters to
overcome the attacks of Trojans.
IP doesn’t guarantee
• reliability.
• flow control.
• sequencing.
Fragmentation = Refers to the condition of, say, a disk in
which files are divided into pieces scattered around the disk.
– Offset
• Position of fragment of user data in original
datagram
• In multiples of 64 bits (8 octets)
– More flag
• Indicates that this is not the last fragment
208/8 = 26
IP ICMP ICMP
Header Header Data
1 Reserved. 20
- Reserved (for robustness experiment).
2 Reserved. 29
3 Destination unreachable.
30 Traceroute
4 Source quench.
31 Conversion error
5 Redirect.
32 Mobile Host Redirect.
6 Alternate Host Address.
33 IPv6 Where-Are-You.
7
34 IPv6 I-Am-Here.
8 Echo request.
35 Mobile Registration Request.
9 Router advertisement.
36 Mobile Registration Reply.
10 Router solicitation.
37 Domain Name request
11 Time exceeded.
38 Domain Name reply
12 Parameter problem.
39 SKIP Algorithm Discovery Protocol.
13 Timestamp request.
40 Photuris, Security failures
14 Timestamp reply.
41 Experimental mobility protocols.
15 Information request.
42
16 Information reply. - Reserved.
255
17 Address mask request.
Example:
The initiating host (client) sends a synchronization (SYN flag set) packet to initiate a connection. Any SYN packet
holds a Sequence Number. The Sequence Number is a 32-bit field in TCP segment header. For example let the
Sequence Number value for this session be x (Send SYN seq=x).
The other host receives the packet (Receive SYN segment), records the Sequence Number of x from the client, and
replies with an acknowledgment and synchronization (SYN-ACK)…. Receive SYN +ACK segment
The Acknowledgment Number is a 32-bit field in TCP segment header. It contains the next sequence number
that this host is expecting to receive (x + 1)…. ACK x+1
The host also initiates a return session. This includes a TCP segment with its own initial Sequence
Number value of y (Send SYN seq=y). The initiating host responds with a next Sequence Number (x+1) and a simple
Acknowledgment Number value of y + 1, which is the Sequence Number value of the other host + 1.
Client Host
Send Packet 1
Start Timer Packet Lost Packet should arrive
Timer ACK should be sent
ACK would normally
Arrive at this time
Time Expires
Retransmit Packet1
Timer Start Timer Receive Packet 1
Send AXK 1
Receive ACK 1
Cancel Timer
UDP Header
Every computer that communicates over the Internet is assigned an IP address that
uniquely identifies the device and distinguishes it from other computers on the
Internet. An IP address consists of 32 bits, often shown as 4 octets of numbers
from 0-255 represented in decimal form instead of binary form. For example, the
IP address 168.212.226.204
in binary form is
10101000.11010100.11100010.11001100.
there are more than 16 million host values for each class A network
binary address start with 0, therefore the decimal number can be anywhere from 1 to 126. The first 8 bits (the first octet) identify the network
and the remaining 24 bits indicate the host within the network. An example of a Class A IP address is 102.168.212.226, where "102" identifies
the network and "168.212.226" identifies the host on that network.
1byte 3 bytes
Network
0 Host Portion
Address
binary addresses start with 10, therefore the decimal number can be anywhere from 128 to 191.
(The number 127 is reserved for loopback and is used for internal testing on the local machine.)
The first 16 bits (the first two octets) identify the network and the remaining 16 bits indicate the
host within the network. An example of a Class B IP address is 168.212.226.204 where "168.212“
identifies the network and "226.204" identifies the host on that network.
2 bytes 2 bytes
Network
10 Address Host Portion
3 bytes 1 byte
Routing Tables: A routing table is a set of rules, often viewed in table format, that is used to determine where data packets traveling
over an Internet Protocol (IP) network will be directed. All IP-enabled devices, including routers and switches, use routing tables.
• For example , if you have the address of 130.5.0.0 and you want
to use the entire third octet to represent the subnet-number, you
need to specify a subnet mask of 255.255.255.0. The bits in the
subnet mask and the Internet address have a one-to-one
correspondence.
–Next Generation
Just as there are addresses for private, or internal networks in IPv4, there are blocks of addresses set aside in IPv6 for private addresses.
With IPV6, virtually every device in the world can have an IP address: cars, fridges, lawnmowers and so on. If one's fridge stopped working,
for example, a repair specialist could identify the problem without ever visiting in person. It might even be possible to make repairs from abroad,
depending on the severity of the problem.
PSTN
Initially, PC to PC
voice calls over the
Internet Gateway
Multimedia
PC
IP Network
Gateway
Multimedia
PC
Converged Networks
Voice, Video & Data over an IP network
Monetary Savings
H.323 = H.323 is a standard that specifies the components, protocols and procedures that provide multimedia communication services—real-time audio, video,
and data communications—over packet networks, including Internet protocol (IP)–based networks. H.323 is part of a family of ITU—T recommendations
called H.32x that provides multimedia communication services over a variety of networks
SIP = Short for Session Initiated Protocol, or Session Initiation Protocol, an application-layer control protocol; a signaling protocol for Internet Telephony.
MGCP = Media Gateway Control Protocol, developed by Telcordia and Level 3 Communications, a control and signal standards to compete with the older
Megaco = Megaco (a contraction of "Media Gateway Controller") is a signalling protocol, used between a Media Gateway and a Media Gateway Controller
(also known as a Call Agent or a Soft Switch) in a VoIP network. It defines the necessary signalling mechanism to allow a Media Gateway Controller
(Call agent) to control gateways in order to support voice/fax calls between PSTN-IP or IP-IP networks.
The protocol is defined by IETF RFC 3525 and was the result of joint work of IETF and ITU. It is also known as H.248. H.248 is the name given to it by the ITU,
Megaco is the IETF name.
SS7 SS7
SG SG
SS
IP
7
r
ov
ve
er
7o
IP
SS
PSTN PSTN
MGC
48
Node Node
M
.2
GC
/H
P
CP
/H
G
. 24
M
8
RTP / UDP / IP
PSTN
MG MG
PSTN
Trunks Trunks
IP Network
– Call Routing
– Resource Management
– Call Detail Record (CDR) Generation
– many more….
MGC
components, protocols and procedures that
provide multimedia communication services—
real-time audio, video, and data communications
—over packet networks, including Internet protocol
(IP)–based networks. H.323 is part of a family of
ITU—T recommendations called H.32x that provides
multimedia communication services over a variety
of networks
H.32
3 SIP = Short for Session Initiated Protocol,
or Session Initiation Protocol, an application-layer
control protocol; a signaling protocol for Internet
SIP
Telephony.
MGC
with interfaces to the existing network and e
nd-to-end services. Specified by the
International Telecommunications Union –
Telecommunications Standardization Sector
(ITU-T) in recommendation Q.1901, BICC
was designed to be fully compatible with
existing networks and any system capable
of carrying voice messages.
H.323, SIP
Gateway RTP Gateway
Controller
MGC
Signaling
Path
Media
Path MG
Media
Media
Media
Media Media over
Media Gateway Media Media Gateway over
over over
over (MG) overIP
IP (MG) IP
IP
IP
IP
"New World" - a relative of Internet protocols "Old World" - complex, deterministic and
- simple, open and horizontal vertical
IETF ITU
Carrier-class solution addressing the wide Borne of the LAN - focusing on enterprise
area conferencing priorities
CHARACTERISTICS
A simple toolkit upon which smart clients and H.323 specifies everything including the
applications can be built. It re-uses Net codec for the media and how you carry the
elements (URLs, MIME and DNS) packets in RTP
Leaves issues of reliability to underlying Assumes fallibility of network - an
network unnecessary overhead
SIP messages are formatted as text. (Text Binary format doesn't sit well with the
processing lies behind the web and email) internet - this adds complexity
SIP allows for standards-based extensions to Extensions are added by using vendor-
perform specific functions. specific non-standard elements
Hierarchical URL style addressing scheme
Addressing scheme doesn't scale well
that scales
Minimal delay - simplified signalling scheme
Possibilities of delay (up to 7 or 8 seconds!)
makes it faster
Slim and Pragmatic The suite is too cumbersome to deploy easily
.. . . … … PT Sequence Number
(SN)
Time Stamp
Data (Variable)
PT Encoding Name
0 G.711(Audio)
2 G.721(Audio)
4 G.723 (Audio)
26 H.261 (Video)
Many Many more
Voice Application
RTP, RTCP
UDP
IP
Layer 1-Physical
40 Bytes
2 to 5 bytes Payload
IP/UDP/RTP Header
A codec is a device or program capable of performing encoding and decoding on a digital data stream or signal.
The word codec may be a combination of any of the following: 'Compressor-Decompressor', 'Coder-Decoder',
or 'Compression/Decompression algorithm'.
H.323 Protocols
- H.323 Terminals
- Gateways
- Gatekeepers
H.323 Gatekeeper
PSTN
H.323
Terminals H.323
Gateway
H.323
Multipoint Control Unit
H.323 Zone
H.323
Multipoint Control Unit
H.323 network
&
Gateway
Multimedia
PSTN PC
H.323 Network
Call Authorization
Enables the gatekeeper to restrict admission to certain terminals
Call Management
services include maintaining an active call list to indicate
that an endpoint is busy
Audio / Video
Application Terminal / Application Control
PictureTel P ic tureTel
2
PictureTel P ic tureTel
1 &3
Judy
Bob
3) Judy knows that Bob’s Internet “name” is
Bob.nextdoorneighbour.com, so she puts that into the
“who to call” section in her I-phone application and
presses return
Institute of Communication Technologies , Islamabad. 109
June 8, 2020
www.ictech.edu.pk
Internet-Phone Call Using a PC Application
4) The I-phone
application gives Domain Name Server(DNS)
Bob.nextdoorneigh
bour.com to a DNS
machine to resolve
the DNS name and 5) The DNS
get an actual IP machine passes
address back Bob’s IP
address
P ic tureTel
2
P ic tureTel P ic tureTel
P ictureTel
1 &3
Judy 6) Judy’s I-phone application
Bob
takes Bob’s IP address and sends
an H.225 message to Bob
Institute of Communication Technologies , Islamabad. 110
June 8, 2020
www.ictech.edu.pk
Internet-Phone Call Using a PC Application
4
5 7 ) H.225 message signals
Bob ’PC to begin ringing
1 &3 2 ,7
PictureTel
Judy 6
Bob
P ic tureTel
1 &3 2 ,7 & 8
P ic tureTel
Judy 6
Bob
4
5
Pic ture Te l
1 &3 2 ,7 & 8
P ic ture Te l
Judy
9) Judy’s I-phone Bob
application then begins
H.245 negotiation with Bob’
PC
4
5
Pic ture Te l
1 &3 2 ,7 & 8
P ic ture Te l
9
Judy
Bob
10) H.245 negotiation finishes
and logical channels are opened.
Bob and Judy can now speak to
one another through a packet-
based network
Institute of Communication Technologies , Islamabad. 114
June 8, 2020
www.ictech.edu.pk
H.323 Protocol Stack
Registration Registration
Admissions Admission
Status Information
Status Information
Bandwidth Control
Bandwidth Control
Status Information
A name, usually short and easy to remember and type, that is translated
into another name or string, usually long and difficult to remember or type.
Status Information
Bandwidth Control
MCU = Multi Point Control Unit
Status Information
Bandwidth Control
Admission
Status Information
Bandwidth Control
Capability Exchange H.245 provides a capability exchange functionality to allow the negotiation
of capabilities and to identify a set of features common to both endpoints.
Master-Slave Determination
Round-Trip Delay
Pic tureTe l
Bob
Bill Institute of Communication Technologies , Islamabad. 125
June 8, 2020
www.ictech.edu.pk
H.323 Call Setup Example (with one Gatekeeper)
Call Connection
Gatekeeper
(6) ARQ (An attempt by an endpoint
to initiate a call)
May I answer?
(7) ACF (An
authorization by the gatekeeper to
PictureTel
P ic tureTel
PictureTel
P ic tureTel
PictureTel
PictureTel
to H.323
& Servers
2. SIP Registrar
behind it
The response to the request will travel through the same path
4 INVITE
[email protected]
180 RINGING 6
180 RINGING 7
200 OK 8
200 OK 9
10 ACK
11 ACK
Institute of Communication Technologies , Islamabad. 147
June 8, 2020
www.ictech.edu.pk
SIP Call Operation (with Redirect server)
[email protected] Redirect Server [email protected]
Location
Server
1 INVITE
[email protected] 2 [email protected]
[email protected] 3
MOVED 4
[email protected]
5 ACK
6 INVITE
[email protected]
180 RINGING 7
200 OK 8
9 ACK
Institute of Communication Technologies , Islamabad. 148
June 8, 2020
www.ictech.edu.pk
SIP Operation in Proxy Mode
Protocol Version v
Owner/Creator & Session Identifier o
Session Name s
Connection Information c
Time Description Information t
Media Announcements m
Few more …
Definition
Stream Control Transmission Protocol (SCTP)
[RFC2960] is an end-to-end transport protocol that
provides services heretofore unavailable from either of
the workhorse transport protocols that have supported
the Internet for more than twenty years:
reliable, connection-oriented TCP [RFC793], or
unreliable, connectionless UDP [RFC768].
- Head-of-line blocking
- Multi-homing
SGCP IPDC
MGCP
MGCP MGCP
• Access Gateway
Media Gateway
(MG)
Institute of Communication Technologies , Islamabad. 178
June 8, 2020
www.ictech.edu.pk
Trunking Gateway
VoIP
VoIP Telco
Telco
Backbone
Backbone
Residential Gateway
VoIP
VoIP Local
Local
Loop
Loop
VoIP
VoIP
Calls Connections
Endpoint
Gateway
Endpoint Calls Connections
Package 1 Trunk
Event a
Calls Connections
Endpoint
Event b
Package 2
Event a
Event b
endpoint)
Additional parameters.
There are nine MGCP commands.
Institute of Communication Technologies , Islamabad. 187
June 8, 2020
www.ictech.edu.pk
MGCP Commands
Verb Code Direction
Restart in-Progress
Gateways issue the restartin-Progress command
Media Gateway
to notify the MGCs that the endpoints are taken (MG)
Media Gateway
(MG)
Institute of Communication Technologies , Islamabad. 191
June 8, 2020
www.ictech.edu.pk
Over Simplified Call Flow
Call Agent
Media Gateway Controller
• When Phone A goes offhook Gateway
A sends a signal to the call agent.
• Gateway A generates dial tone and
collects the dialed digits.
• The digits are forwarded to the call
MGCP MGCP
agent.
• The call agent determines how to route
the call.
• The call agent sends commands to RTP/RTCP
Gateway B.
• Gateway B rings phone B. Gateway A Gateway B
• The call agent sends commands to both
gateways to establish RTP/RTCP
sessions. Phone A Phone B
3 2
Call Agent/
5.RTP/ Media
RTCP 4 Gateway
1
H.323 H.323 Controller
Gateway Gateway
1
RTP/
Gateway A RTCP Gateway B
Phone
Phone Phone
Phone
The amount of time it takes for speech to exit the speakers’ mouth
and reach the listener’s ear.
• Propagation Delay
• Handling/Processing Delay
• Serialization Delay
Queuing delay occurs when more packets are sent out than the
interface can handle at a given interval.
Voice and Video traffic is very intolerant of Delay and Packet drop.
Like ,
PSQM P.861
PESQ P.862
PAMS
Institute of Communication Technologies , Islamabad. 204
June 8, 2020
www.ictech.edu.pk
MOS is the best way to measure speech
quality ,as no alternative of human ear
to measure quality
Many more……
Institute of Communication Technologies , Islamabad. 209
June 8, 2020
www.ictech.edu.pk
PSQM monitors the impairments caused by
compression and decompression but
it can’t monitor the impairments caused by
packet loss and jitter.
16 to 20 ms during conversation
is called Echo.
Echo cancellation
These are;
WFQ-Weighted Fair Queuing.
CQ-Custom Queuing.
PQ-Priority Queuing.
CB_WFQ
Best Effort
• Parameters
– r – average rate, i.e., rate at which tokens fill the
bucket
– b – bucket depth
– R – maximum link capacity or peak rate (optional
parameter)
• A bit is transmitted only when there is an available token
r bps
b bits
<= R bps
regulator
Institute of Communication Technologies , Islamabad. 229
June 8, 2020
www.ictech.edu.pk
Committed Access Rate (CAR)
104.0
135%
72.4
107%
100%
93% 95%
81% 79%
70% 43.2 67%
29.7 46%
21.8 36% 44%
14.4
2.7 5.8
0.1 0.2 0.4 0.7 1.3
Jan- Jan- Jan- Jan- Jan- Jan- Jan- Jan- Jan- Jan- Jan- Jan- Jan-
89 90 91 92 93 94 95 96 97 98 99 00 01
Source: ITU, adapted from Internet Software Consortium <www.isc.org>.
357 Mbit/s
2’638
Asia-
Mbit/s 468 Europe
Pacific 171
Mbit/s
Mbit/s
Latin Arab
Source: TeleGeography Inc., America & States,
Global Backbone Database. Caribbean Africa
Sept. 2000.
127 Mbit/s
Institute of Communication Technologies , Islamabad. 238
June 8, 2020
www.ictech.edu.pk
IP Telephony: What is it?
7'000 5.5%
6'000
As percentage of int'l
5'000 outgoing traffic
3.2%
4'000
3'000
1.6%
2'000
1'000 0.2%
0.0%
0
1997 1998 1999 2000 2001
Source: ITU Internet Reports, adapted from TeleGeography Inc.
Institute of Communication Technologies , Islamabad. 241
June 8, 2020
www.ictech.edu.pk
Percentage of IP Telephony Revenues by Region
(1998-2003)
Note: “IDD” refers to published prices from the incumbent operator for international direct dialling. “IP out” refers
to using the Net2Phone IP Telephony service within the country. “IP in” refers to using Net2Phone in the US to
call to the country.
Institute of Communication Technologies , Islamabad. 245
June 8, 2020
www.ictech.edu.pk
Country case studies: The stakes in
international traffic flows
Note: “Outgoing”, “Incoming” and “Total” show international traffic in millions of minutes p.a. “Per inhabitant” and
“per main line” shows traffic in minutes p.a., “As % of revenue” shows revenue from international traffic as a % of
total telecom revenue for the country.
Institute of Communication Technologies , Islamabad. 246
June 8, 2020
www.ictech.edu.pk
World Telecommunication Policy Forum:
What is it?
• Technical:
– How to define IP Telephony?
– Is quality of service comparable? Will it improve?
– How to handle numbering issues?
• Economic:
– What price and cost savings can be expected?
– How quickly will carriers migrate their networks?
– Isn’t it just a form of bypass of telecom monopolies?
• Regulatory:
– Is it voice or is it data?
– License it? Prohibit it? Restrict it? Liberalise it?
– Should IP Telephony contribute to Universal Service?
• Recognising that:
– the transition to an IP environment places new demands on the
management and operation of ITU members;
– the speed with which countries can extend the benefits of
telecommunication technologies will depend on their ability to deploy
skilled personnel;
• Invites the ITU:
– to facilitate the sharing of knowledge and views, by Member States and
Sector Members, of global trends in all new technologies, in particular IP
applications;
– to encourage Member States and Sector Members to create integrated
human resources transition plans towards IP;
– to assist Member States and Sector Members in evaluating and identifying
new and changing human resources requirements
Vonage offer services of IP telephony all over the world from rates
(as low as 6 cents/min)
Subscriber Facility:
PAKISTAN
1/0/0 ENGLAND 1/0/0
ROUTER
ROUTER 3222
BLACK
2222
BLACK 1/0/1
1/0/1
1. Dial Tone GB (ENGLAND) 1. Dial Tone PAKISTAN
2. Signaling Loop Start 2. Signaling Loop Start
3. Note “YOUR NAME” 3. Note “YOUR NAME”
4. Duration before first digit 30 seconds 4. Duration before first digit 20 seconds
5. If caller does not attend phone for more 5. If caller does not attend phone for more
than 10 seconds then call must be than 10 seconds then call must be
disconnected. disconnected.
6. Timing gap betweeen subsequent digits 6. Timing gap betweeen subsequent digits
should be 5 seconds. should be 5 seconds.
7. Increase hookflash sensitivity. 7. Increase hookflash sensitivity.
8. Disable echo control mechanism. 8. Disable echo control mechanism.
9. Line Impedance 600 ohms. 9. Line Impedance 600 ohms.
10. Pots Dial peer. 10. Pots Dial peer.
FX0
ROUTER
FXS
FX0 3222
Outbound
1/1/1
Inbound
1/0/1
RJ-11
PSTN
PBX
RECEPTION
Institute of Communication Technologies , Islamabad. 261
June 8, 2020
www.ictech.edu.pk
Lab Practice No 3.
LAHORE ISLAMABAD
SIALKOT 42 51
52
` ` 000
000 000
3.1.1.3 3.1.1.2 4.1.1.3 4.1.1.2
1/0/0
1.1.1.1
1/0/1 LONDON
INTERNET 41
3.1.1.1 4.1.1.1
6.1.1.1 6.1.1.2
1.1.1.2
2.1.1.2 2.1.1.1
000
ROUTER ROUTER
7.1.1.1 8.1.1.2
001
7.1.1.2 8.1.1.1
172.16.100.100 ROUTER
PSTN
CALL MANAGER 11
SWITCH
172.16.100.1
PSTN