Upload
peteyf
View
851
Download
4
Tags:
Embed Size (px)
DESCRIPTION
The missing piece: CVOICE 6.0 S03 L03Thank you, Zoheb!
Citation preview
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-1
Implementing VoIP Gateways
Implementing SIP Gateways
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-2
SIP Fundamentals
SIP is a simple extensible protocol.
SIP is defined in IETF RFC 2543 and RFC 3261.
SIP creates, modifies, and terminates multimedia sessions with one or more participants.
SIP leverages various standards: RTP, RTCP, HTTP, SDP, DNS, SAP, MGCP, and RTSP.
SIP performs addressing by E.164, e-mail, or DNS service record.
SIP is ASCII text-based for easy implementation and debugging.
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-3
SIP Fundamentals (Cont.)
SIP provides these capabilities: Determines the location of the target endpoint
Determines the media capabilities of the target endpoint
Determines the availability of the target endpoint
Establishes a session between the originating and target endpoints
Handles the transfer and termination of calls
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-4
How SIP Works
ASCI-based protocol
User identified by a unique SIP address
– sip:[email protected]
Users register with registrar server using their assigned SIP addresses
When user initiates a call, a SIP request is sent to a SIP server
Location of end user can be dynamically registered with the SIP server
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-5
Why SIP
Advantages of SIP gateways: Dial-plan configuration directly on the gateway
Translations defined per gateway
Advanced support for third-party telephony system integration
Interoperability with third-party voice gateways
Support of third-party end devices (SIP phones)
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-6
SIP Architecture
SIP Gateway
Legacy PBX
PSTN
SIP
RTP
SIPSIP
SIP Proxy, Registrar,
Location, and Redirect Servers
SIP User Agents (UAs)
T1 or PRI
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-7
SIP Call FlowSIP Gateway
PSTN
Signaling
Bearer or MediaRTP Stream
Signaling
Invite (SDP)
100 Trying
180 Ringing
200 OK
Invite (SDP)
100 Trying
180 Ringing
200 OK
ACK
BYE
200 OK
SIP Proxy Server
ACK
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-8
Direct Call SetupSIP Gateway
IP
SIP Signaling and SDP(UDP or TCP)
Bearer or Media (UDP)
RTP Stream
Signaling
180 Ringing
200 OK
Invite (SDP)
100 Trying
ACK
BYE
200 OK
SIP Gateway
Calling Party Called Party
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-9
Call Setup Using a Proxy ServerProxy Server
SIP Gateway
IP
SIP Signaling and SDP(UDP or TCP)
Bearer or Media (UDP)
RTP Stream
180 Ringing
200 OK
Invite (SDP)
100 Trying
ACK
BYE
200 OK
SIP Gateway
Calling Party Called PartyInvite (SDP)
100 Trying
180 Ringing
200 OK
ACK
BYE
200 OK
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-10
Call Setup Using a Redirect ServerRedirect Server
SIP Gateway
IP
SIP Signaling and SDP(UDP or TCP)
Bearer or Media (UDP)
RTP Stream
Ringing
OK
Invite
Trying
ACK
BYE
200 OK
SIP Gateway
Calling Party Called PartyInvite
Moved
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-11
SIP Addresses
Fully qualified domain names
– sip:[email protected]
E.164 addresses
– sip:[email protected]; user=phone
Mixed addresses
– sip:14085551234; [email protected] sip:[email protected]
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-12
Address Registration
SIP Gateway
Location Database
Registrar Server
Redirect Server
SIP UACs
SIP Proxy (UAS)
SIP UACs
RegisterHere I am!
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-13
Address Resolution
Location Database
Registrar Server
Redirect Server
SIP Proxy
Where is the name or phone number?
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-14
SIP DTMF Configuration Considerations
SCCP Phone
SIP Gateway
MTP
Out-of-Band SCCP
Out-of-Band Information
In-Band SIP
RTP RTP
SIP DTMF on Cisco Unified Communications Manager SIP DTMF requires MTP on Cisco Unified Communications
Manager.
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-15
SIP DTMF Considerations (Cont.)
SIP DTMF on Cisco IOS gateways: SIP DTMF relay is configured on gateways in dial-peer
configuration mode. There are two methods:
– RTP Named Telephony Event: Forwards DTMF tones by using RTP with the NTE payload type
– SIP NOTIFY: Forwards DTMF tones using SIP NOTIFY messages
SCCP IP phones only support out-of band. Therefore SIP NOTIFY must be used.
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-16
Configuring a SIP Gateway
Enable SIP voice services
Configure SIP service
– Transport
– Bind interface
Configure SIP User Agent (UA)
– Timers
– Authentication
– SIP servers
Configure dial-peer SIP parameters
– Session protocol
– Session target
– DTMF relay
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-17
SIP ITSP
Configure Cisco Unified Communications Manager Express to connect to a SIP service provider
network and route external calls via that connection.
router(config)# voice service voiprouter(conf-voi-serv)# siprouter(conf-serv-sip)# session transport udprouter(conf-serv-sip)# bind control source-interface Loopback 0router(conf-serv-sip)# bind media source-interface Loopback 0
SIP Gateway
Sip2.cisco.com
Integrating Cisco IOS Gateways with a SIP ITSP
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-18
router(config)# sip-uarouter(config-sip-ua)# authentication username JDoe password secretrouter(config-sip-ua)# registrar dns:sip2.cisco.com expires 3600router(config-sip-ua)# sip-server dns:sip2.cisco.comrouter(config-sip-ua)# retry invite 2router(config-sip-ua)# retry response 2router(config-sip-ua)# retry bye 2router(config-sip-ua)# retry cancel 2
SIP ITSP
SIP Gateway
Sip2.cisco.com
Integrating Cisco IOS Gateways with a SIP ITSP (Cont.)
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-19
SIP ITSP
Sip2.cisco.com
Ext.: 2…
router(config)# dial-peer voice 2000 voiprouter(config-dial-peer)# destination-pattern 2...router(config-dial-peer)# session protocol sipv2router(config-dial-peer)# session target sip-serverrouter(config-dial-peer)# dtmf-relay rtp-nte router(config)# dial-peer voice 2001 voiprouter(config-dial-peer)# destination-pattern 2...router(config-dial-peer)# session protocol sipv2router(config-dial-peer)# session target ipv4:10.1.1.15router(config-dial-peer)# dtmf-relay sip-notifyrouter(config-dial-peer)# preference 1router(config)# dial-peer voice 90 voiprouter(config-dial-peer)# destination-pattern 9Trouter(config-dial-peer)# session target ipv4:192.168.1.100router(config-dial-peer)# session protocol sipv2 router(config-dial-peer)# dtmf-relay rtp-nte
Cisco Unified Communications
Manager: 10.1.1.15
SIP Gateway
192.168.1.100
Integrating Cisco IOS Gateways with a SIP ITSP (Cont.)
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-20
Command Description
show sip-ua service Displays the status of the SIP VoIP service.
show sip-ua status Displays the status of the SIP UA.
show sip-ua register statusDisplays the status of E.164 numbers that a SIP gateway has registered with an external primary SIP registrar.
show sip-ua timers Displays SIP UA timers.
show sip-ua connections Displays active SIP UA connections.
show sip-ua calls Displays active SIP UA calls.
show sip-ua statistics Displays SIP traffic statistics.
Verifying SIP Gateways
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-21
Router# show sip serviceSIP Service is up
Router# show sip-ua statusSIP User Agent StatusSIP User Agent for UDP : ENABLEDSIP User Agent for TCP : ENABLEDSIP User Agent bind status(signaling): DISABLEDSIP User Agent bind status(media): DISABLEDSIP max-forwards : 6SIP DNS SRV version: 1 (rfc 2052)Redirection (3xx) message handling: ENABLED
Router# show sip-ua timersSIP UA Timer Values (millisecs)trying 500, expires 180000, connect 500, disconnect 500comet 500, prack 500, rel1xx 500, notify 500refer 500, register 500
Verifying SIP Gateways (Cont.)
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-22
Verifying SIP Gateways (Cont.)
Router# show sip-ua register status
Line peer expires(sec) registered
4001 20001 596 no
4002 20002 596 no
5100 1 596 no
9998 2 596 no
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-23
Verifying SIP Gateways (Cont.)router# show sip-ua callsSIP UAC CALL INFO Number of SIP User Agent Client(UAC) calls: 0
SIP UAS CALL INFOCall 1SIP Call ID : [email protected] State of the call : STATE_ACTIVE (7) Substate of the call : SUBSTATE_NONE (0) Calling Number : 2818902001 Called Number : 1003 Bit Flags : 0x1212003A 0x100000 0x488 CC Call ID : 1 Source IP Address (Sig ): 10.10.10.1 Destn SIP Req Addr:Port : 10.10.10.2:5060 Destn SIP Resp Addr:Port: 10.10.10.2:56884 Destination Name : 10.10.10.2..
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-24
Verifying SIP Gateways (Cont.).. Number of Media Streams : 1 Number of Active Streams: 1 RTP Fork Object : 0x0 Media Stream 1 State of the stream : STREAM_ACTIVE Stream Call ID : 1 Stream Type : voice-only (0) Negotiated Codec : g729r8 (20 bytes) Codec Payload Type : 18 Negotiated Dtmf-relay : inband-voice Dtmf-relay Payload Type : 0 Media Source IP Addr:Port: 10.10.10.1:18050 Media Dest IP Addr:Port : 10.10.10.2:16522 Orig Media Dest IP Addr:Port : 0.0.0.0:0
Number of SIP User Agent Server(UAS) calls: 1
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-25
Debug Commands
Command Description
debug asnl eventsVerifies that the SIP subscription server is up.
debug voip ccapi inoutShows every interaction with the call control API.
debug voip ccapi protoheadersDisplays messages sent between the originating and terminating gateways.
debug ccsip
For general SIP debugging; for example views direction-attribute settings and port and network address-translation traces.
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-26
HQ-1# debug ccsip messages
SIP Call messages tracing is enabled HQ-1# *Mar 6 14:19:14: Sent: INVITE sip:[email protected];user=phone;phone-context=unknownSIP/2.0 Via: SIP/2.0/UDP 166.34.245.230:55820 From: "3660110" <sip:[email protected]> To: <sip:[email protected];user=phone;phone-context=unknown> Date: Sat, 06 Mar 1993 19:19:14 GMT Call-ID: [email protected] Cisco-Guid: 2881152943-2184249568-0-483551624 User-Agent: Cisco VoIP Gateway/ IOS 12.x/ SIP enabled CSeq: 101 INVITE Max-Forwards: 6 Timestamp: 731427554Contact: <sip:[email protected]:5060;user=phone> Expires: 180 Content-Type: application/sdp Content-Length: 138
Debug Commands (Cont.)
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-27
*Mar 6 14:19:16: Received: SIP/2.0 200 OK Via: SIP/2.0/UDP 166.34.245.230:55820 From: "3660110" <sip:[email protected]> To: <sip:[email protected];user=phone;phone-context=unknown>;tag=27DBC6D8-1357 Date: Mon, 08 Mar 1993 22:45:12 GMT Call-ID: [email protected] Timestamp: 731427554 Server: Cisco VoIP Gateway/ IOS 12.x/ SIP enabled Contact: <sip:[email protected]:5060;user=phone> CSeq: 101 INVITE Content-Type: application/sdp Content-Length: 138
v=0 o=CiscoSystemsSIP-GW-UserAgent 1193 7927 IN IP4 166.34.245.231s=SIP Call t=0 0 c=IN IP4 166.34.245.231 m=audio 20224 RTP/AVP 0
Debug Commands (Cont.)
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-28
Debug Commands (Cont.)
*Mar 6 14:19:19: Received: BYE sip:[email protected]:5060;user=phone SIP/2.0 Via: SIP/2.0/UDP 166.34.245.231:53600 From: <sip:[email protected];user=phone;phone-context=unknown>;tag=27DBC6D8-1357 To: "3660110" <sip:[email protected]> Date: Mon, 08 Mar 1993 22:45:14 GMT Call-ID: [email protected] User-Agent: Cisco VoIP Gateway/ IOS 12.x/ SIP enabledMax-Forwards: 6 Timestamp: 731612717 CSeq: 101 BYE Content-Length: 0
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-29
Summary
SIP is defined by IETF RFC 2543 and RFC 3261 and allows easy integration with third-party VoIP networks.
There are five advantages to using SIP gateways as voice gateways.
SIP is modeled on the interworking of UAs and network servers.
A SIP call flow consists of signaling and transmitting bearer and media packets.
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-30
Summary (Cont.)
A SIP address consists of an optional user ID, a host description, and optional parameters to qualify the address more precisely.
SIP call-setup models include direct, proxy server, and redirection.
There are seven commands available on Cisco IOS to configure SIP on Cisco IOS routers.
There are at least thirteen commands available on Cisco IOS to verify and troubleshoot a SIP integration.
© 2008 Cisco Systems, Inc. All rights reserved. CVOICE v6.0—3-31
VoiceGateway
Voice-Enabled Router
IP Telephony Router with Cisco Unified Communications Manager Express
Cisco Unified Communications Manager
Switch
Router
POTS Phone
IP Phone
Network Cloud
Line: Serial Line: Ethernet
PC
PBX
Cisco Unified Border Element
IP
Icons