You are on page 1of 41

Legal Notice

THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT
TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS
MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY
PRODUCTS.

THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET
FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED
HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED
WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of
California, Berkeley (UCB) as part of UCB’s public domain version of the UNIX operating system. All rights reserved.
Copyright © 1981, Regents of the University of California.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF
THESE SUPPLIERS ARE PROVIDED “AS IS” WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED
SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION,
THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR
ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL,
CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR
LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF
CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Access Registrar, AccessPath, Any to Any, AtmDirector, Browse with Me, CCDA, CCDE, CCDP, CCIE, CCNA, CCNP,
CCSI, CD-PAC, the Cisco logo, Cisco Certified Internetwork Expert logo, CiscoLink, the Cisco Management Connection
logo, the Cisco NetWorks logo, the Cisco Powered Network logo, Cisco Systems Capital, the Cisco Systems Capital logo,
Cisco Systems Networking Academy, the Cisco Systems Networking Academy logo, the Cisco Technologies logo,
ConnectWay, Fast Step, FireRunner, Follow Me Browsing, FormShare, GigaStack, IGX, Intelligence in the Optical Core,
Internet Quotient, IP/VC, Kernel Proxy, MGX, MultiPath Data, MultiPath Voice, Natural Network Viewer, NetSonar,
Network Registrar, the Networkers logo, Packet, PIX, Point and Click Internetworking, Policy Builder, Precept,
ScriptShare, Secure Script, ServiceWay, Shop with Me, SlideCast, SMARTnet, SVX, The Cell, TrafficDirector,
TransPath, ViewRunner, Virtual Loop Carrier System, Virtual Service Node, Virtual Voice Line, VisionWay,
VlanDirector, Voice LAN, WaRP, Wavelength Router, Wavelength Router Protocol, WebViewer, Workgroup Director,
and Workgroup Stack are trademarks; Changing the Way We Work, Live, Play, and Learn, Empowering the Internet
Generation, The Internet Economy, and The New Internet Economy are service marks; and ASIST, BPX, Catalyst, Cisco,
Cisco IOS, the Cisco IOS logo, Cisco Systems, the Cisco Systems logo, the Cisco Systems Cisco Press logo,
Enterprise/Solver, EtherChannel, EtherSwitch, FastHub, FastLink, FastPAD, FastSwitch, GeoTel, IOS, IP/TV, IPX,
LightStream, LightSwitch, MICA, NetRanger, Post-Routing, Pre-Routing, Registrar, StrataView Plus, Stratm,
TeleRouter, and VCO are registered trademarks of Cisco Systems, Inc. or its affiliates in the U.S. and certain other
countries. All other trademarks mentioned in this document are the property of their respective owners. The use of the
word partner does not imply a partnership relationship between Cisco and any of its resellers.
Copyright © 2005 Cisco Systems, Inc.
All rights reserved.
SIP PROTOCOL

Cisco Advanced Service

Presentation_ID © 1999, Cisco Systems, Inc. 1


Agenda

• SIP Overview
• What is SIP? Why SIP? SIP vs. H.323
• SIP Basics. SIP Architecture. SIP Servers
• SIP Gateways

SIP_Protocol CISCO AS 2
What is SIP?
Session Initiation Protocol

• IETF standard (RFC-2543bis) for signaling multimedia communications


via IP.
• ratified as an IETF standard in March, 1999. Work was initiated in the
IETF’s MMUSIC working-group.
• text-based, peer-to-peer protocol that allows User Agents (UA) to speak
directly to other User Agents or via the routing service of SIP servers called
Proxy and Redirect servers.
• RFC2543 is often referred to as “vanilla SIP” and is currently the most
widely deployed variant. Cisco SIP Protocol support is based on RFC2543
(not RFC2543bis) and additional (feature) drafts where customer needs are
at stake.
• RFC2543bis (additions) created in April 2000.

SIP_Protocol CISCO AS 3
Why SIP?

• Structured and was built from the ground up to be the


protocol for a truly integrated IP network for voice,
video and data.
• SIP uses several existing IETF protocols that leverages
the power of the Internet and hence allows easy
integration with Internet applications like WWW, Email
and XML
message formatting (HTTP 1.1)
media negotiation (SDP)
media (RTP / RTCP)
name resolution & mobility (DNS & DHCP)
application encoding (MIME)

SIP_Protocol CISCO AS 4
Why SIP?

•SIP uses an Internet architecture, similar to the distributed


nature of World Wide Web, where the intelligence is put
throughout the network and with variable amount of
intelligence on end devices (like a PC) which utilize
applications either locally or through application servers.
•Distributed architecture allows new applications to be
deployed at either a network level, a group level, a user level,
or a per user-usage level. That allows customization of
applications that exactly fits the business needs. In short, no
need to give all users the same access to features and
applications.
•Possibilities of SIP usage are somewhat boundless just like
www and could accelerate at a pace similar to the deployment
of web-based applications.

SIP_Protocol CISCO AS 5
Comparing SIP & H.323
SIP H.323

•SIP clients (UA) are intelligent


•H.323 clients are intelligent
•SIP Servers (Proxy, Redirect, Registrar)
provide network intelligence & services •H.323 Gatekeepers provide network intelligence
& services
•SIP follows the Internet/WWW model
•H.323 follows the Telephony/ISDN model
•SIP uses UDP or TCP for signaling
•H.323 uses TCP for signaling (UDP optional in
•SIP uses RTP for media v3)
•SIP is a full-featured multimedia protocol •H.323 uses RTP for media
•SIP is text-based (ASCII) •H.323 is a full-featured multimedia protocol
•SIP utilizes IETF/IP protocols - SDP, HTTP/1.1, •H.323 is binary-based (ASN.1 encoding)
IPmc, MIME, etc..
•H.323 utilizes ITU / ISDN protocols - H.225, H.245,
•SIP only defines signaling, not all elements H.450. All portions fall under H.323
•SIP interoperability is done via SIP Bakeoffs •H.323 interoperability is done with iNOW or IMTC

SIP_Protocol CISCO AS 6
SIP Messages (RFC2543)

• Consists of Requests and Responses


• Requests Methods (unless mentioned, each has a response)
REGISTER (UA registers with Registration Server)
INVITE (request from a UA to initiate a call)
ACK (confirms receipt of a final response to INVITE)
BYE (sent by either side to end a call)
CANCEL (sent to end a call not yet connected
OPTIONS (sent to query capabilities)
• Gateways support INVITE, ACK, BYE & CANCEL. GWs and
Phones will respond to OPTIONS but will not send them.
Gateways do not support REGISTER. Phones do support
REGISTER.
• Messages contain SIP Headers and Body. Body might be SDP
or an attachment or some other application
SIP_Protocol CISCO AS 7
SIP Messages (contd…)
•1xx Responses [Informational Responses]
- 100 Trying (incoming request received)
- 180 Ringing (calling party has been located & is being
altered - ISDN Alerting)
- 181 Call is being forwarded (not generated by GW)
- 182 Queued (not generated by GW)
- 183 Session Progress (calling party has been located & is being
altered - ISDN Progress)
• 2xx Responses [Successful Responses]
- 200 OK
•3xx Responses [Redirection Responses]
- 300 Multiple Choices (2nd option only tried if 1st does not return
180, 200 OK, 486 or 600 busy response)
- 301 Moved Permanently (2nd option only tried if 1st does not return
180, 200 OK, 486 or 600 busy response)
- 302 Temporarily Moved (2nd option only tried if 1st does not return
180, 200 OK, 486 or 600 busy response)
- 305 Use Proxy (GW contacts new address in the Contact header)
- 380 Alternative Service (GW contacts new address in the Contact
header)

SIP_Protocol CISCO AS 8
SIP Messages (contd…)
•4xx Responses [Client Failure Responses]
-400 Bad Request (GW generates this for a badly formed request)
-- 401 Unauthorized (not generated by GW; GW would disconnect w/ tone)
-- 402 Payment Required (not generated by GW; GW would disconnect w/ tone)
-- 403 Forbidden (not generated by GW; GW would disconnect w/ tone)
-- 404 Not Found (usually generated by incorrect dial-peers or missing IP routes)
-- 405 Method Not Allowed (generated for an invalid method)
-- 406 Not Acceptable (not generated by GW)
-- 407 Proxy Authentication Required (generated by Proxy, usually for invalid REGISTER)
-- 408 Request Timeout (not generated by GW)
-- 409 Conflict (not generated by GW)
-- 410 Gone (dial-peer missing)
-- 411 Length Required (not generated by GW)
-- 413 Request Entity Too Large (not generated by GW)
- 414 Request URI Too Large (not generated by GW)
-- 415 Unsupported Media (a codec is not supported or SDP is malformed)
-- 420 Bad Extension (not generated by GW)
-- 480 Temporarily Unavailable (not generated by GW)
-- 481 Call-Leg / Transaction Doesn’t Exist (not generated by GW)
-- 482 Loop Detected (not generated by GW; would come from Proxy)
-- 483 Too Many Hops (not generated by GW)
-- 484 Address Incomplete (when number_type is incorrect to/from ISDN switch)
-- 485 Ambiguous (not generated by GW)
-- 486 Busy (when connected voice-port or device is busy)
CISCO AS 9
SIP_Protocol
SIP Messages (contd…)

•5xx Responses [Server Failure]


- 500 Internal Server Error
- 501 Not Implemented
-502 Bad Gateway
-503 Service Unavailable
-504 Gateway Timeout
-505 Version Not Supported
•6xx Responses [Global Failure Responses]
- 600 Busy Everywhere
- 603 Decline
- 604 Does Not Exist Anywhere
- 606 Not Acceptable

SIP_Protocol CISCO AS 10
SIP Addressing

•Modeled after mailto URLs. May be a combination of FQDNs or


E.164 numbers or both.
•Support for Fully-Qualified Domain Names (FQDNs) using sip:
URLs - sip: “John Doe” <jdoe@cisco.com>
•Support for E.164 addresses -
sip:14085551234@gateway.com; user=phone
•Support for mixed addresses -
sip:14085551234@10.1.1.1; user=phone
sip:jdoe@10.1.1.1

•Support for E.164 addresses using tel: URLs - tel:14085551234

SIP_Protocol CISCO AS 11
SDP (RFC 2327 )
•Describes the attributes of SIP sessions
•SDP headers encapsulated as the message body of a SIP request
•Similar role as H.245 of H.323 world
•Just like SIP, SDP headers encoded in ASCII
•SDP headers specify: session name and purpose, time(s) the session is active, the
media comprising the session, transport address and media format of the session,
bandwidth to be used by the session, contact info for the person responsible for the
session
•Example:
•v=0
•o=CiscoSystemsSIP-IPPhone-UserAgent 17045 11864 IN IP4 10.80.17.134
•s=SIP Call
•c=IN IP4 10.80.17.134
•t=0 0
•m=audio 29118 RTP/AVP 0 101
•a=rtpmap:0 pcmu/8000
•a=rtpmap:101 telephone-event/8000

SIP_Protocol CISCO AS 12
A Simple Call Flow
SIP UA / GW SIP UA / GW

INVITE (w/ SDP)

100 Trying

180 Ringing or 183 Session Progress

2way RTP between GWs, 1 way between phone/PBX & GW

200 OK
ACK

Full Audio Cut-Through

BYE

200 OK

SIP_Protocol CISCO AS 13
Applications
VoIP is just one application usage of SIP

• Most frequently being built are PC-clients for things like 3pcc(3rd party call
control), Follow-Me-Find-Me services, Instant Messaging and Presence, IP
Phones with PDA and scheduling integration, PC to Phone applications, and
Voice services added to Gaming clients
• These services are added into the network via basic SIP functionality or
Application servers which may use LDAP, XML, IMAP, TAPI/JTAPI, CGI, CPL,
etc.. to provide the back-end services
• SIP could be used and built similar to HTTP:
– Just like HTTP, SIP does not define the API or the mechanism to provide
application via a server. It rather provides a common format of message
and programmer-interface for accessing applications.
– Just like HTTP applications can be easily customized and integrated with
well-known APIs and languages like CGI or Java or XML, so too can SIP
applications take advantage of these tools. .
• In the near future this will also include Call-Center and ACD applications, IVRs,
Streaming Audio and Music-On-Hold applications, Hoot-n-Holler applications,
as well as Video-Conferencing and MCU functionality.

SIP_Protocol CISCO AS 14
EX:3rd-Party Call
EX:3rd-Party -Control(3pcc)
Call-Control(3pcc)
““Click
Click to dial”
dial”
Potential
PotentialApplication:
Application:AAWeb
Webuser
usercancango
goto
toaaWeb
WebPage
Pagethat
thatisisassociated
associatedwith
withthe
theSIP
SIPcontroller.
controller.
That
That webpage allows the user to request a callback from a Customer Service Rep. The3pcc
webpage allows the user to request a callback from a Customer Service Rep. The 3pcc
controller
controller would initiate a call to the SIP Phone, and when the Service Rep answered the call,aa
would initiate a call to the SIP Phone, and when the Service Rep answered the call,
second
secondcall
callwould
wouldbe
beplaced
placedto tothe
theWeb
Webuser.
user. Neither
Neitherthe
theWeb
WebUserUseror
orSIP
SIPPhone
Phonewould
wouldhave
havetotodial
dial
the phone
the phone
e
hon SIP Controller - 3pcc Application
P
P
SI INV
of ITE
P sip
D :12
/S P
34
w D w /o
1
1 11 /S AC
SD
P
2 w 20
47 K K 0O
9 O w/
1 0 SD Kw
:9 20 Po /S
s ip fS DP
IP
TE Ga
VI Since tew
IN ay
12.1(5)XM 2.1
• allows SIP Sessions to be initiated by a
3rd-party.
•Referred to as delayed or late media x1234
• Initiated by an INVITE w/ no SDP, or no
LOCAL PSTN m= line in the SDP
• Allows mid-call codec, IP Address or
port changes in SDP.

SIP_Protocol CISCO AS 15
3pcc - Basic Call Flow
User A Third User B
Party

INVITE (no SDP)

200 OK
INVITE (with SDP of A)

200 OK (with SDP of B)

ACK (with SDP of A)


ACK (with SDP of B)

MEDIA MEDIA

BYE
BYE

200 OK
200 OK

SIP_Protocol CISCO AS 16
EX:Back -to-Back UserAgent
EX:Back-to-Back
(B2BUA)
PotentialApplication:
Potential Application: SIP
SIPClients
Clientscould
couldmake
makePrePaid
PrePaidcalling-card
calling-cardcalls
callsto
tothe
thePSTN.
PSTN. After
Afterbeing
being
authenticatedinto
authenticated intothe
thesystem,
system,the
theSIP
SIPClient
Clientmakes
makesaaSIPSIPcall.
call. Once
Oncethe
theusers
userstime
timehas
haselapsed,
elapsed,the
the
BillingEngine
Billing Enginesends
sendsaamessage
messageto tocancel
cancelthe
thecall,
call,and
andthe
theB2BUA
B2BUAterminates
terminatesthethecall.
call. ItItcould
couldalso
also
re-routethe
re-route thesignaling
signaling&&media
mediatotoananannoucement
annoucementserver
servertotoallow
allowthe
theuser
usertotoadd
addmore
moreminutes
minutestoto
his/hercalling-card.
his/her calling-card.

Start Billing
End Call
n e SIP Controller - B2BUA Application
P ho
RADIUS / IP INV
S ITE
Billing Server of sip
P W 20 :91
SD G 0O
/ I P- K 93
92
w S w/ 10
0 0 P SD 00
0 SD Po w/
1 / f SD
4 72 w AC SIP P
9 K K -G
:91 0
O W
i p 20
s
TE
VI
IN • allows SIP sessions to be established by SIP
end-points w/ a “centralized control” of the
session
PrePaid Client
• draft-rosenberg-sip-3pcc-01.txt. (NO TYPO)
LOCAL PSTN
SIP_Protocol CISCO AS 17
B2BUA - Call Flow
SIP- UA1 (x1000) SIP-UA2 (x1001)
B2BUA

INVITE 1001@B2BUA (Call-ID:1) INVITE 1000@SIP-UA2 (Call-ID 2)


From: 1000@SIP-UA1 From: 1000@B2BUA
To:1001@ B2BUA To:1001@SIP-UA2
100 Trying
100 Trying

180/183 Ringing 180/183 Ringing

200 OK MEDIA 200 OK

ACK MEDIA ACK

BYE BYE

200 OK 200 OK

The
TheB2BUAB2BUAcreates
createsseparate
separateCall-ID
Call-ID(sessions)
(sessions)for
foreach
eachside
sideof ofthe
theconnection.
connection.
This
This allows it to maintain control over the signaling, and potentially modifythe
allows it to maintain control over the signaling, and potentially modify themedia
media(SDP)
(SDP)
SIP_Protocol
of each call-leg
CISCO if
AS required.
of each call-leg if required. 18
SIP Architecture

•Clients: SIP Phones, Softphones, Gateways, Media Gateway


Controllers, PDAs, Robots
User Agent Client (UAC) / User Agent Server (UAS)
Originate & Terminate SIP requests
•Typically an endpoint will have both UAC & UAS, UAC for
originating requests, and UAS for terminating requests
•Servers:
Proxy Server
Redirect Server
Registrar Server


SIP_Protocol CISCO AS 19
SIP Architecture

Registrar Redirect Database SIP Services


Standalone or within SIP Server
“Where is this
name/phone#?”

REGISTER 3xx Redirection


“Here I am” “They moved,
SIP Proxy/Redirect Server
try this address”

REGISTER Proxied INVITE


“Here I am” “I’ll handle it for you”

INVITE
“I want to talk
to another UA

SIP User SIP User


Agents Agents
SIP-GW

SIP_Protocol CISCO AS 20
Registrar Server

•An optional SIP component


•Can be a separate box, or a process that resides on a Proxy or Redirect
server.
•Registrar Server is the device that handles SIP REGISTER messages
from non-Gateway SIP User Agents.
•Registrar Server will store the Contact: values from a REGISTER. Where
it stores these values is implementation specific and is not defined in
RFC2543.
•Details from REGISTER messages are used by the Translation & Routing
functionality of Proxy & Redirect servers.

SIP_Protocol CISCO AS 21
Proxy Server

•An optional SIP component but will most likely be present for networks of any size
as it handles call routing.
•Does not initiate any new SIP messages, rather proxies the SIP message “on
behalf” of the originator in a similar manner to H.323 Gatekeeper Routed Signaling
(GKRCS), where all signaling flows through the Proxy.
•SIP Proxies can insert a Record-Route: header into an INVITE message. This will
ensure that the signaling for a CANCEL or BYE will flow through the Proxy. This
might be required for security, billing or some features to be activated.
•SIP Proxies determine if a message should be handled or routed based on the
domain in the Request URI.
•SIP Proxy can use any database, Registrar Server or DNS SRV query to determine
the location of the next-hop of the message
•SIP Proxies may change the Request URI to address the next-hop device

SIP_Protocol CISCO AS 22
Proxy Server Call Flow
SIP Phone
Stateful SIP UA / GW
Proxy
Server
INVITE
INVITE
100 Trying
100 Trying

180 Ringing 180 Ringing

200 OK 200 OK

ACK ACK

BYE BYE

200 OK 200 OK

SIP_Protocol CISCO AS 23
Proxy Server -Stateless vs.
Server-Stateless
Transaction Stateful
Proxy can be either Stateless or Transaction Stateful

• Stateless means that once a message is routed, the Proxy does


not "remember" anything else about it.
• Transaction-Stateful means that even after the message is routed,
the Proxy Server will still maintain state about that transaction for
some period of time.
• The reasons it might need to maintain state is because
it needs to be ready to handle retransmissions of lost messages or
handle re-routing to an end-point (ie. SIP-GW)
it needs to keep timers for Proxy-initiated features like Call-
Forwarding or Forking
it needs to execute some sort of service-logic like a CPL (Call
Processing Language) script

SIP_Protocol CISCO AS 24
Proxy Application
Application--
Call Forking
“Contact 1234@10.1.1.1,
IN 1234@10.1.1.2 and 1234@10.1.1.3”
VI
TE
sip
:1
23
Location Database
4@
10
.1.
1.3
INV
ITE “Where is sip:1-800-GO-CISCO@cisco.com?”
sip:
123
4@
10.1
.1.2
Proxy
INVITE sip:1234@10.1.1.1
Server

INVITE sip:1-800-GO-CISCO@cisco.com

Forked
ForkedCalls
Callscan
canbe
beininparallel
parallelor
orsequential.
sequential. The
Thefirst
firstphone
phoneto
to
answer will get the call, the others will get a CANCEL from
answer will get the call, the others will get a CANCEL from thethe
LOCAL PSTN Proxy
ProxyServer.
Server.

SIP_Protocol CISCO AS 25
Redirect Server

•An optional SIP component


•A Redirect Server is a modified Proxy server, and both functionality can reside on
the same physical box.
•But unlike Proxy-Server "mode", Redirect-Server mode uses call-flows that look
similar to Gatekeeper-Direct-Mode signaling (ie. ask the GK for an address (RAS),
and then signaling the remote end-point directly).
•A Redirect Server does not route messages, but rather determines the final
destination and returns a 3xx Redirect message with the translated addresses in
the Contact: header. How it determines the final destination is implementation
specific and is not defined by RFC2543.
•A Redirect Server expects the UAC that receives the 3xx Redirect to handle the
routing of the call on it’s own.
•A UAC can then route the subsequent request directly to an end-point or through
a Proxy Server.
•In most cases, a Redirect-Server will be a Stateless function.

SIP_Protocol CISCO AS 26
Call Flows-SIP Phones to GW
via Redirect Serverone
SIP Phone
Redirect SIP UA / GW
Server

INVITE

3xx Redirect

INVITE to Address Returned in 3XX response Contact: Header

100 Trying

180 Ringing or 183 Session Progress

200 OK
ACK

BYE

200 OK

SIP_Protocol CISCO AS 27
Redirect Application -
Call Redirection

Location Database
“Where is sip:1234@cisco.com?”

x1234
“You need to contact 9194721234”

Proxy / Redirect
Server

INVITE sip:1234@cisco.com
3xx Moved
Contact: sip:9194721234

INVITE sip:9194721234@10.1.1.3

LOCAL PSTN The


The user
user at
at x1234
x1234 informed
informed the
the network
network National PSTN
that
that he
he could
could be
be reached
reached on
on his
his cell-phone
cell-phone at
at 919-472-1234
919-472-1234

SIP_Protocol CISCO AS 28
Agenda

• SIP Overview
• SIP Gateways
• Architecture and Features.
• Configuration. Caveats and Troubleshooting.

SIP_Protocol CISCO AS 29
SIP-SYMPHONY
ARCHITECTURE
Session
Session Application
Application
Dial-Plan
Dial-Plan Mapper
Mapper

Call
Call Control
Control API
API
(CCAPI)
(CCAPI)

Telephony
Telephony Service
Service
SIP
SIP -- SPI
SPI H.323
H.323 -- SPI
SPI Provider
Provider

Telephony
Telephony Device
Device
RTP
RTP // RTCP
RTCP Library
Library Drivers
Drivers

TCP/IP
TCP/IP Stack
Stack Telephony
Telephony Hardware
Hardware

SIP_Protocol CISCO AS 30
Cisco IOS SIP -GW platforms
SIP-GW
PLATFORM - Original IOS Support - Port Density
•1750
• 12.2(3)T • up to 6 analog ports
•2600
• 12.1(1)T • up to 4 analog ports, 1-2 T1/E1 ports
•3620
• 12.1(1)T • up to 4 analog ports, 1-2 digital T1/E1 ports
•3640 • 12.1(1)T • up to 12 analog ports, 5T1/4E1 ports (120 DS0s)
•3660 • 12.1(1)T • up to 24 analog ports, 12T1/E1 ports
•5300 • 12.1(1)T • up to 4 T1/E1 ports
• 12.2(2)XA • up to 8 T1/E1 ports
•5350
• 12.2(2)XA • up to 16 T1 or 12 E1 ports (384 DS0s)
•5400
• 12.2(2)XB • up to 2 CT3s (1344 DS0s)
•5850

SIP_Protocol CISCO AS 31
Agenda

• SIP Overview
• SIP Gateways
• Architecture and Features.
• Configuration. Caveats and Troubleshooting.

SIP_Protocol CISCO AS 32
Configuring SIP User Agent
(UAC/UAS)
Mandatory Commands Optional Commands

•Enable SIP UAC/UAS (Global) •Configure SIP listening mode (TCP


| UDP)
sip-ua
• transport udp | tcp
•Enable proper TCP MTU (TCP
Calls Only) ip •Configure SIP-Server location sip-
server ipv4: | dns:
tcp path-mtu-discovery
•Configure INVITE wait timers
timers <invite-wait-100> <ms>
•Configure Retry timers
retry invite <#>
•Configure Inband-Alerting
inband-alerting <string>
•Configure Max-Forwards max-
forwards <#>

SIP_Protocol CISCO AS 33
Configuring SIP Dial-Peers

Mandatory Commands Optional Commands


•Create VoIP dial-peer
•Define signaling transport session
• dial-peer voice <#> voip transport udp | tcp
•Define destination-pattern •Permit Transfer on originated calls
destination-pattern <string>
•Use SIP for this dial-peer application session
*** this might go on POTS
session protocol sipv2 or VoIP dial-peer, and usually both
•Define the session target ***

session target <sip-server | ipv4: •Configure DTMF-Relay dtmf-


| dns:> relay cisco-rtp
•Define Max-redirects max-
redirects <#>

SIP_Protocol CISCO AS 34
SIP- Configuration Commands

sip-ua(config)#sip-ua
sip-ua(config-sip-ua)#?
SIP UA configuration commands:
default Set a command to its defaults
exit Exit from sip-ua configuration mode
max-forwards Change the number of max-forwards for SIP methods
inband-alerting Specify an Inband-alerting SIP header
no Negate a command or set its defaults
retry Change default retries for each SIP Method
sip-server Configure a SIP Server Interface
timers SIP Signaling Timers Configuration
transport Enable SIP UA transport for TCP/UDP

SIP_Protocol CISCO AS 35
SIP Sample Config
controller T1 0
framing esf
linecoding b8zs
clock source line primary
pri-group timeslots 1-24
!
voice-port 0:D
!
dial-peer voice 1 voip
destination-pattern 1919392….
dtmf-relay cisco-rtp
application session <- needed to enable Transfer if original call initiated from VOIP side
session protocol sipv2
codec g711ulaw
session target sip-server
!
dial-peer voice 2 pots
application session <-- needed to enable Transfer if original call initiated from POTS side
destination-pattern 1408527….
port 0:D
!
sip-ua
sip-server ipv4:10.1.1.1

SIP_Protocol CISCO AS 36
Troubleshooting

•Evaluate Telephony & VoIP call-legs


•Troubleshoot Telephony issues with existing VTSP, VPM, ISDN, CAS
debugs
•Troubleshoot SIP-VoIP issues with “debug ccsip” commands

sip-gw#debug ccsip ?
all Enable all SIP debugging traces
calls Enable CCSIP SPI calls debugging trace
error Enable SIP error debugging trace
events Enable SIP events debugging trace
messages Enable CCSIP SPI messages debugging trace
states Enable CCSIP SPI states debugging trace
•Debugging is all text-based, much easier to read than H.323 debugs
•“csim” commands are not officially supported for SIP calls

SIP_Protocol CISCO AS 37
SIP- Show Commands
sip-gw#show sip ?
retry Display SIP Protocol Retry Counts
statistics Display SIP UA Statistics
status Display SIP UA Listener Status
timers Display SIP Protocol Timers

sip-gw#show sip retry


SIP UA Retry Values
invite retry count = 6 response retry count = 6
bye retry count = 10 cancel retry count = 10

sip-gw#show sip status


SIP User Agent Status
SIP User Agent for UDP :ENABLED
SIP User Agent for TCP : ENABLED
SIP max-forwards: 6

sip-gw#show sip timers


SIP UA Timer Values (millisecs)
trying 500, expires 180000, connect 500, disconnect 500
SIP_Protocol CISCO AS 38
SIP - Show Commands
sip-gw#show sip statistics
SIP Response Statistics (Inbound/Outbound)
Informational:
Trying 36/639, Ringing 14/212,
Forwarded 0/0, Queued 0/0,
SessionProgress 0/116
Success:
OkInvite 14/240, OkBye 13/197,
OkCancel 3/88, OkOptions 0/0
Redirection (Inbound only):
MultipleChoice 0, MovedPermanently 0,
MovedTemporarily 0, SeeOther 0,
UseProxy 0, AlternateService 0
Client Error:
BadRequest 0/0, Unauthorized 0/0,
PaymentRequired 0/0, Forbidden 0/0,
NotFound 4/13, MethodNotAllowed 0/24,
NotAcceptable 0/0, ProxyAuthReqd 0/0,
ReqTimeout 0/0, Conflict 0/0, Gone 0/60,
LengthRequired 0/0, ReqEntityTooLarge 0/0,
ReqURITooLarge 0/0, UnsupportedMediaType 0/0,
BadExtension 0/0, TempNotAvailable 0/0,
CallLegNonExistent 0/24, LoopDetected 0/0,
TooManyHops 0/0, AddrIncomplete 0/0,
SIP_Protocol Ambiguous 0/0, BusyHere
CISCO1/1AS 39
Questions??

Presentation_ID ©©2000,
1999,Cisco
Cisco Systems, Inc.
Systems, Inc. 40