Iptelephony Protocols PDF
Iptelephony Protocols PDF
and applications
• IP Telephony and VoIP (Voice over IP) are not the same!
• Although similar issues are faced by these technologies, they
have some fundamental differences
• Definitions:
Standardized Proprietary
(Skinny)
• Proprietary protocols
– have restricted innovation (smaller users/developers
community, narrowed vision, solving smaller issues)
– restrict the set of available functionalities because of
interoperability (developing gateways to every protocol take
too long)
• Today’s Internet
– offers diverse functionalities because of standardized
communication protocols
Audio/Video
Signaling
transport
H.323
ITU-T RTP/RTCP
H.248
SIP
IETF RTP/RTCP MGCP
MEGACO
Codec
(G.7xx, GSM, iLBC, Speex, H.26x) RTCP
RTP
UDP
Network Protocol and Network Interface
Data
Audio and video applications System control
applications
Video
Audio codec
codec H.225 Call
(G.711, G.723.1,
(H.261, signaling H.245
G729, G.726) H.225 RAS
H.263) RTCP Control T.120 Data
channel
channel
RTP Q.931
UDP TCP
• Terminals (end-points)
– hardware clients
– software clients
– they need to have
• audio codec (at least G.711)
• H.323 call signaling protocol suite
– optional
• video codec
• data transmission
• Gateway
– generic: an interface between two worlds
– specific: interface between packet-based networks and circuit
switched networks
PSTN-IP
Gateway
IP Network
PSTN Network
• Gatekeeper
– Optional entity (in the Recommendation, but it is worth using it)
– Functionalities
• Managing a zone (managing the H.323 entities in its domain)
– Endpoint registration
• Address translation (H323ID and E164ID to IP address and port)
– Endpoint location
• Call routing H.323 Gatekeeper
– Next hop location
• Admission control H.323 Clients
• Bandwidth management
• Authorization control
• etc. etc. etc.
H.323 Zone
PSTN-IP
Gateway H.323 MCU
H.323 MCU
De-centralized Centralized
• Alias Address
– Alias are easier to remember with respect to Network address
and/or Transport Address in order to identify a terminal
– Each alias has an unique Transport Address (IP address + Port)
– One Transport address may correspond to multiple aliases
– Aliases must be unique inside a zone
• Example
– saverio.niccolini
– myh323alias
– whateveryoucanimagine
H.323 Gatekeeper
4
1
5
2
3
H.323 Client-A H.323 Client-B
6
7
4. Client-A sends ARQ (Admission ReQuest) to Gatekeeper: it asks to be connected to Client-A (he knows already Alias and call signaling address)
5. Gatekeeper confirms or rejects the call (ACF, Admission ConFirm / ARJ, Admission ReJect): it returns the Client-A call signaling address (IP
address and port) if it was asked
6. Client-B sends a CONNECT to Client-A call signaling address
7. Capabilities about the call are exchanged among the terminals (on H.245 channel address different from call signaling channel address)
8. The media is sent end-to-end; i.e. to the IP addresses and ports negotiated during the signaling
Messages 3, 6, 7 may be exchanged with the H.323 Gatekeeper depending on the call model adopted
(Direct signaling, Gatekeeper-routed call signaling, Gatekeeper-routed H.245 control)
• SIP is NOT:
2
2. The SIP Registrar save the user’s current
location in its database
SIP Proxy
SIP Client-A SIP Client-B
1 3
6. The media is sent end-to-end; i.e. to
the IP addresses and ports
4 4 negotiated during the signaling
(SDP in INVITE/200 OK or in
5 5 any other message)
131.114.9.12 151.83.1.2
2 RTP
This message exchange was
simplified, other messages may be 5. Client-A acknowledges the 200 OK by
exchanged (authorization messages, sending an ACK to client-B
additional proxies, etc.)
ACK sip:[email protected]:5060 SIP/2.0
Database [… ]
3. SIP Proxy forwards the INVITE to user-B’s 4. After user-B answers his phone. it sends 200
current location(s) OK message to client-A
• Service location is achieved using SRV records (RFC 2782, February 2000)
– one domain name is mapped to more services and to more machine
• SRV records are useful for
– service differentiation
– redundancy (multiple SIP proxies)
– backup (failover SIP proxies)
– transport protocol differentiation (UDP, TCP, TLS over TCP)
• For example:
_sip._udp.bigu.edu 43200 IN SRV 10 10 5060 sipserver.bigu.edu.
• An example DNS implementation with redundant proxy servers might look like this:
_sip._udp.bigu.edu. 43200 IN SRV 0 0 5060 sipserver1.bigu.edu.
_sip._udp.bigu.edu. 43200 IN SRV 1 0 5060 sipserver2.bigu.edu.
_sip._tcp.bigu.edu. 43200 IN SRV 0 4 5060 sipserver1.bigu.edu.
_sip._tcp.bigu.edu. 43200 IN SRV 0 2 5060 sipserver2.bigu.edu.
_sips._tcp.bigu.edu. 43200 IN SRV 0 0 5060 sipserver1.bigu.edu.
_sips._tcp.bigu.edu. 43200 IN SRV 0 0 5060 sipserver2.bigu.edu.
• The DNS zone is used to request NAPTR records which may contain the
end result (or produce new keys in the form of domain-names from the
DNS using SRV records)
Telephone:
tel: +49-6221-946033
Fax:
fax: +49-6221-946055
E-mail:
mailto:[email protected]
+49-6221-946048 WWW:
www.whatanicetutorial.org
SIP
sip:[email protected]
2 4
Database
ENUM (DNS)
• Applications
– The vision of a SIP mobile application
• World-wide deployments
– SIP.edu
– SIP.eu
– Possible add-ons
– NEC deployment
Barbara: Hi Alice, how are you? Barbara: Hi Alice, how are you?
Barbara: Cool! I have called you Barbara: Cool! I have called you
because I need help in some because I need help in some
technical matter. Do you know … ? technical matter. Do you know … ?
Alice: I have to think about. I’ll call Alice: I have to think about. I’ll call
you later. you later.
• Alice thinks about the question and has an idea and decides to call
Barbara
• Scene 1
– Mobility
• Easy reachable when being abroad
– Integration
• Different Services (Presence, IM, Audio, Video)
• Scene 2
– Mobility
• Being reachable at multiple points at the same time
– Integration
• Open, non proprietary standards
• Protocols: SIP
• Services: ENUM
• Architectures: Gateway, Proxy, User Administration
• Security: NAT, FW
• Legal: TCL (Telecommunication Law)
• SIP.edu
– Project of the Internet2 VoIP working group
(http://voip.internet2.edu/)
• Aim:
– Increase the number of SIP-reachable users (mainly in
Internet2 but open to other academic institutions)
– Extend email identities to voice services (promote
convergence)
– Build an academic community developing and deploying SIP
services
• with low cost entries
• providing an useful service
6 RTP
4 bob = 661
Database
DNS
• Benefits:
– Employees of an organization can be reached worldwide by a SIP client via
their email-address
– After the realization of SIP.edu, the organization is ready to build an
organization-wide IP Telephony infrastructure (IM, Presence, Video)
because the basic components are already available
– ENUM can be easily integrated
– SIP to SIP calls are open and always possible
• Open issues so far:
– Call forking to multiple location should be implemented (office phone and
registered SIP clients)
– The claim that email addresses should converge to voice identities is not
completely right
• what about inbound integration with PSTN?
– ENUM is there and I still have to remember an E.164 number as long as PSTN exists
(for a long time) if I am calling from a PSTN phone (let’s use ENUM for this)
– It is a closed environment
• what about people not employed in the organization that do not have a number
(students for example)?
• what about outbound calls to PSTN?
• SIP.eu
– SWITCH is “The Swiss Education and Research Network”
(http://www.switch.ch)
– They organized in January a SIP Infoday where they have
promoted the adoption of an advanced vision of SIP.edu
6 RTP
1 3
Database
DNS
6 RTP
1 3
4
PSTN-IP
Gateway
Database
DNS
1
3
2
Pool
WIFi SIP Client-B
Inbound call
0. Someone decides to call me at my office number (0049-6221-9051118)
1. The call arrives at NEC PBX in Heidelberg and forwarded to my phone
2. I am away, I have configured an entry to forward the call to my SIP client (my phone does not ring)
3. The call is redirected to the SIP gateway (to the number associated to my SIP client (be it my software client or the WiFi pool
phone)
We have not yet configured ENUM, thus no ENUM entry for such a number
(gateway just configured statically to handle such redirected calls)
1
2c
0
2a
2c 2b
Bob’s Colleague' s
Pool SIP Client office phone
WIFi SIP Client-B
PSTN number
Outbound calls
0. No matter where I am I register to my SIP proxy and I dial the numbers on my SIP clients as I was in the office (0 to exit, etc.)
1. I can call both SIP address, internal numbers and PSTN numbers (configuration of SIP proxy takes care of this)
2. The SIP proxy authorize me and routes my call
2a. SIP-to-SIP: I am only using Internet connection
2b. SIP-to-internal: I am calling my colleagues using internal numbers (65, 39, 32, etc.)
2c. SIP-to-PSTN: I can call all the world as I was in my office (I make a local call in Germany thus my company is happy)
• Employees of NEC can be reached worldwide by a SIP client via their SIP
address (convergence of SIP address and mail address requires
configuration of SRV records, TBD by Network Administrators)
• The organization is ready to build an organization-wide IP Telephony
infrastructure (IM, Presence, Video) because the basic components are
already available
• ENUM can be easily integrated (TBD by Network Administrators)
• SIP to SIP calls are open and always possible
• Call forking to multiple location (TBD by Network Administrators)
• You can reach NEC employees using my office number or my SIP identity
(which will be my email address as soon as Network Administrators
configure it)
• I can make call from worldwide as I was in my office
– Company savings in calls (roaming is 99% more expensive than office calls)
• FWs (Firewalls)
– security device
– numbers of FWs is growing (including personal FWs)
– FWs rules get more restrictive
© NEC Corporation 2005 69
NATs: Basic Operation
PC NAT Server
1 2
Port mapping:
3ULYDWH 3X E O LF
0
$ E 3
; \
6
)XOO&RQH
1 $ 7
3ULYDWH 3X E O LF
0
;
3 T
$ E 3 U
; \ ;
6
5 HV W U L F W HG
&RQH
1 $ 7
3ULYDWH 3X E O LF
0 Q
3 T
$ E ;
; \ ; 3 U
6
5 HV W U L F W HG
&RQH
1 $ 7
3ULYDWH 3X E O LF
0 Q
& G
3 T
$ E ;
; \ ; 3 U
6
6 \ P P HW U L F
1 $ 7
NAT/FW
SIP Proxy
NAT/FW
SIP Signaling
3X E O LF 3ULYDWH
3ULYDWH
© NEC Corporation 2005 76
Media Traversal Issues
RTP/RTCP
Media
3X E O LF 3ULYDWH
3ULYDWH
© NEC Corporation 2005 77
Media Traversal Issues
SIP SIP
Signaling Signaling
Application Application
• STUN
• TURN
• ICE
• B2BUA
>$ E @ STUN
; \ $ E
Server
STUN
6 W
Client 1 $ 7
RTP 4 4 RTP
SIP UA-1
(with TURN Client) 1 $ 7 1 $ 7
SIP UA-2
SIP 2 3 SIP
SIP UA-1
1 $ 7 1 $ 7
SIP SIP UA-2
(with ICE Client)
STUN
STUN 1
Server
1. UA-1 discovers by STUN what kind of firewall or NAT it is behind and what public IP address (and port
mapping rules) its NAT uses
2. As a backup plan it requests a public IP/Port pair from the TURN server
3. UA-1 send an INVITE containing any gained information on how it could be contacted as ordered alternatives
4. UA-2 uses these alternatives for “trial and error” until it has a successful connection (not shown here)
SIP Proxy
SIP Client-A SIP Client-B
SIP
SIP
RTP RTP
B2BUA
© NEC Corporation 2005 85
Solutions to NAT Traversal: B2BUA
2
SIP 1 SIP 3
RTP 4 RTP 4
3ULYDWH 3X E O LF 3ULYDWH
RTP 4 4 RTP
SIP UA-1 SIP UA-2
(with TURN Client)
SIP 2 3 SIP
SIP 1 SIP 3
RTP 4 RTP 4
3ULYDWH ' 0= 3X E O LF
SIP Proxy
(Default Outbound
WIFi SIP
Proxy and B2BUA)
Client-B
3ULYDWH ' 0=
PSTN-IP 3X E O LF
Gateway
Identifies the
packet sequence).
source of an RTP
can be used to restore
detect packet loss (also
2
%
< ,
,- *
&
"
7
7
8 5 '
32
/
-
;
2 !
#
$
93
2
(0
,
(0
"
+ '
,
7 5 * ! /
65 65 %
!
12
7 7 !
* 12 ! ! )" (
!
' #
& '
'
'
5
9
!
/ $ ( "
8 3 !
Media Transport: RTP
32 "
'
7 ! ) #
: ! $%
/
$
$ #
*
. 2 *
.
/
/
*
* +
&
(
0
4
Media Transport: RTP Security Issues
• RTP play-out
• Call Eavesdropping
– Capturing RTP flows
• Since RTP identifies the codec being used (statically) or either using a
“dynamic” identified codec it is easy to reconstruct the voice sampling
(even in real time)
• Result: listen/record conversations
• Result: listen DTMF tones to steal passwords and PINs
• Signaling
– End-to-end
• S/MIME (Secure/Multipurpose Internet Mail Extensions), IETF RFC 2633
– provides a way to send and receive secure MIME data. Based on the MIME standard,
S/MIME provides the following cryptographic security services for electronic messaging
applications: authentication, message integrity and non-repudiation of origin (using digital
signatures) and privacy and data security (using encryption)
– Hop-by-hop
• Lower-Layer solutions (e.g. IPsec)
– IPSec is actually a suite of protocols being developed by the IETF in the IPsec charter
for authentication and encryption
• SIPS (requires Transport Layer Security, TLS, on whole signaling path)
– TLS version 1.0, detailed in IETF RFC 2246 but going to be updated to version 1.1, is a
client/server protocol that allows peers to communicate in a way that is designed to
prevent eavesdropping, tampering, or message forgery
• Media
– Lower-Layer security (e.g. IPsec)
– SRTP (Secure Real Time Protocol), IETF RFC 3711
• provides confidentiality, message authentication, and replay protection to the RTP
traffic and to the control traffic for RTP
• key exchange done using MIKEY (Multimedia Internet KEYing), IETF RFC 3830
– a key management scheme that can be used for real-time applications (both for peer-to-
peer communication and group communication) supporting SRTP
SIP Client-B
I TE
INV
YE
/B
EL
NC
CA
SIP Client-A
Attacker
• The attacker messages cancel a pending request with the same Call-ID,
TO, From, and Cseq fields
SIP Client-B
I TE
INV
CANCEL / BYE
SIP Client-A
Attacker
• The attacker messages cancel a pending request with the same Call-ID,
TO, From, and Cseq fields
• Call Hijacking
– After INVITE message, a 301 “Moved Permanently” message
would hijack the call towards whoever the attacker decides (himself
of another client)
SIP Client-B
E
IN VIT
301 Mo
ved Pe
rmanen
tly
INVIT
E
SIP Client-A
Attacker
• Identity Theft
– Registering address instead of other (if requires authentication
might use another type of attack)
SIP Registrar
SIP Client-A
Attacker
=
>
• Signaling (SIP)
– End-to-end &KD O O H Q
• Basic Authentication (deprecated)
JH QRQ
?
@
A@
A
F H U H D O
B
C
A
P
D
A
?
@
• Digest authentication (challenge - response)
• S/MIME $&.
– Hop-by-hop 5H TXH V
W Z L WK &
=
U H GH QWL D
=
• TLS, IPsec
>
EF
OV
G
=
=
F
I
H
>
• SIPS
• Streams
– SRTP
• Same thread as with email (hundreds of calls just with publicity messages,
the phone is ringing all day, etc.)
• Most E-mail filters rely on content analysis. But in voice calls, it is too late to analyze
media for spamming
– Voice Spam Detection – difficult
– Headers for voice spam detection : “from” , “contact”. Are these enough ?
– Detection in real time before the media arrives
6 , 3 3 U R[ \
6, 3
): 6LJ Q DO LQ J ):
5 7 3 5 7 & 3 0HG LD
6% &
SIP Client-A
SIP Client-B