x+yx的y次方等于y的x次方3200.8x+0.6y=500×0.7422

SIP Configuration Guide, Cisco IOS Release 15M&T - Achieving SIP RFC Compliance [Support] - Cisco
SIP Configuration Guide, Cisco IOS Release 15M&T
Book Contents
Book Contents
Available Languages
Download Options
Book Title
SIP Configuration Guide, Cisco IOS Release 15M&T
Chapter Title
Achieving SIP RFC Compliance
View with Adobe Reader on a variety of devices
View in various apps on iPhone, iPad, Android, Sony Reader, or Windows Phone
View on Kindle device or Kindle app on multiple devices
Chapter: Achieving SIP RFC Compliance
Chapter Contents
Achieving SIP RFC Compliance This chapter describes how to use or configure Cisco IOS Session Initiation Protocol (SIP) gateways to comply with published SIP standards. It discusses the following features:
RFC 4040-Based Clear Channel Codec Negotiation for SIP Calls
SIP: Core SIP Technology Enhancements (RFC 2543 and RFC 2543-bis-04)
SIP: DNS SRV RFC 2782 Compliance (RFC 2782)
SIP: RFC 3261 Enhancements (RFC 3261)
SIP Gateway Compliance to RFC 3261, RFC 3262, and RFC 3264
SIP Stack Portability
Note This feature is described in the “Configuring SIP Message, Timer, and Response Features” feature module.
Feature History for RFC4040-Based Clear Channel Codec Negotiation for SIP Calls
Modification
Feature History for SIP: Core SIP Technology Enhancements
Modification
Feature History for SIP - DNS SRV RFC 2782 Compliance
Modification
Feature History for SIP: RFC 3261 Enhancements
Modification
Feature History for SIP Gateway Compliance to RFC 3261, RFC 3262, and RFC 3264
Modification
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see
and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to
. An account on Cisco.com is not required.
Prerequisites for SIP RFC Compliance
Configure a basic VoIP network.
Enable the Reliable Provisional Response feature.
Note For information on reliable provisional responses, see the "SIP Gateway Support of RSVP and TEL URL" feature module.
Restrictions for SIP RFC Compliance
As found in RFC 3261, the following are not supported:
Sending SIP UPDATE the gateway is able to receive and process only UPDATE requests.
SIP with IPv6 host addresses.
Secure SIPs. Secure SIPs are secure Uniform Resource Identifiers (URIs). When a caller makes a call using SIPs, the message transport is secure to the called party.
Field characters 0x0 to 0x7E in quoted strings within SIP headers encoded in Unicode Transformation Format Version 8 (UTF-8).
As found in RFC 3264, the following are not supported:
Support for bandwidth (b=) SDP attribute equal to 0 is not supported.
Initial INVITE with 0.0.0.0 is not supported unless ACK contains a valid IP address.
NoteWith CSCub35268, the initial INVITE with 0.0.0.0 is supported. When Cisco UBE receives an initial INVITE with 0.0.0.0 IP address, streams are created and Cisco UBE sends out the response for the mid-call DO re-INVITE.
Information About SIP RFC Compliance
SIP RFC 2543 Compliance
The Cisco SIP gateway complies with RFC 2543. However, RFC 3261 has now replaced (obsoleted) RFC 2543. See "Restrictions for SIP RFC Compliance" and "SIP RFC 3261 Compliance" for more information about what is and is not supported in the new RFCs.
SIP RFC 2782 Compliance
SIP on Cisco VoIP gateways uses Domain Name System Server (DNS SRV) query to determine the IP address of the user endpoint. The query string has a prefix in the form of “protocol.transport.”as defined by RFC 2052. This prefix is attached to the fully qualified domain name (FQDN) of the next-hop SIP server.
A second prefix style has been added to Cisco VoIP gateways and is now the default. This second style is defined by RFC 2782, which obsoleted RFC 2052 in February 2000. This new style is in compliance with RFC 2782 and appends the protocol label with an underscore “_” as in “_protocol._transport.” The addition of the underscore reduces the risk of the same name being used for unrelated purposes.
SIP RFC 3261 Compliance
RFC 3261, which obsoletes RFC 2543, defines the SIP signaling protocol for creating, modifying, and terminating sessions. Cisco’s implementation of RFC 3261 supports the following:
Ability to receive and process SIP UPDATE requests
Initial Offer and Answer exchanges
Branch and Sent-by parameters in the Via header
Merged request detection
Loose-routing
Benefits of RFC 3261 include the following:
Continued interoperability of Cisco IOS gateways in current SIP deployments
Expanded interoperability of Cisco IOS gateways with new SIP products and applications
SIP Header Fields
Network Components
and Methods
The tables below show RFC 3261 SIP functions--including headers,
components, and methods. They also show if the specific functionality is
supported by Cisco SIP gateways.
Table 1 SIP Header Fields
Header Field
Supported by Cisco Gateways?
Table 2 SIP Network Components
SIP Network Components
Supported by Cisco Gateways?
Table 3 SIP Methods
Supported by Cisco Gateways?
SIP Responses
The tables below show SIP responses that are supported by Cisco SIP
gateways in compliance with RFC 3261.
Cisco SIP gateways do not initiate the use of keepalive messages for
calls that they originate or terminate. If the remote gateway uses a keepalive
message, the SIP gateway complies.
Table 4 1xx Responses
1xx Responses
Table 5 2xx Responses
2xx Responses
Table 6 3xx Responses
3xx Responses
Table 7 4xx Responses
4xx Responses
Table 8 5xx Responses
5xx Responses
Table 9 6xx Responses
6xx Responses
SIP SDP Usage
Transport Layer Protocols
and DNS Records
The tables below show SIP SDP usage, transport protocols, and DNS
records that are supported in RFC 3261. They also show if the specific
functionality is supported by Cisco SIP gateways.
Table 10 SIP Session Description Protocol (SDP) Usage Supported in RFC 3261
SIP Network Components
Supported by Cisco Gateways?
Table 11 SIP Transport Layer Protocols
Supported by Cisco Gateways?
Table 12 SIP Domain Name System (DNS) Records
Authentication Encryption Mode
Supported by Cisco Gateways?
SIP Extensions
The table below shows supported SIP extensions.
Table 13 SIP Extensions
SIP Extension
SIP Security
The tables below show SIP security encryption and responses supported
in RFC 3261. They also show if the specific functionality is supported by Cisco
SIP gateways.
Table 14 SIP Encryption Modes
Encryption Mode
Supported by Cisco Gateways?
Table 15 SIP Authentication Encryption Modes
Authentication Encryption Mode
Supported by Cisco Gateways?
SIP DTMF Relay
Cisco SIP gateways support DTMF relay in accordance with RFC 2833. The
DTMF relay method is based on the transmission of Named Telephony Events (NTE)
and DTMF digits over a Real-Time Transport Protocol (RTP) stream.
Cisco SIP gateways also support forwarding DTMF tones by means of
cisco-rtp, which is a Cisco proprietary payload type.
The table below shows SIP DTMF relay methods. It also shows if the
specific method is supported by Cisco SIP gateways.
Table 16 SIP DTMF Relay Supported in RFC 3261
Supported by Cisco Gateways?
SIP Fax Relay and T.38
The table below shows fax relay modes that are supported by Cisco SIP
gateways in compliance with RFC 3261. It also shows if the specific method is
supported by Cisco SIP gateways.
Table 17 Fax Relay Modes Supported in RFC 3261
Supported by Cisco Gateways?
Cisco SIP gateways support T.38 and T.37 fax relay, store, and forward
mechanisms. The table below is based on Annex-D of the T.38 ITU recommendation,
Procedures for Real-Time Group 3 Facsimile Communication over IP
Networks , June 1998. The table indicates recommendations from the standard
and if Cisco SIP gateways support the requirements.
Table 18 T.38 Fax Requirements
Requirement
Description
Mandatory or Optional
Supported?
SIP URL Comparison
When Uniform Resource Locators (URLs) are received, they are compared
for equality. URL comparison can be done between two From SIP URLs or between
two To SIP URLs. The order of the parameters does not need to match precisely.
However, for two URLs to be equal, the user, password, host, and port
parameters must match.
In Cisco IOS Release 12.3 and later releases, the maddr and transport
parameters were removed and no longer used in Cisco SIP gateway
implementations. However, in Cisco IOS Release 15.1(1)T and later releases, the
maddr parameter is reintroduced so that the sender of a SIP request can specify
a different destination for responses to those requests by specifying the maddr
value for the URL in the Via header.
If a compared parameter is omitted or not present, it is matched on the
basis of its default value. The table below shows a list of SIP URL compared
parameters and their default values.
Table 19 SIP URL Compared Parameters and Default Values
SIP URL Compared Parameter
Assuming that a comparison is taking place, the following is an example
of equivalent URLs:
sip:.193.120
Equivalent
sip:.193.120:
sip:.193.120;tag=;pname=pvalue
sip:.193.120;user=ip
sip:.193.120:5060
487 Sent for BYE Requests
RFC 3261 requires that a UAS that receives a BYE request first send a response to any pending requests for that call before disconnecting. After receiving a BYE request, the UAS should respond with a 487 (Request Cancelled) status message.
3xx Redirection Responses
See the “Configuring SIP Redirect Processing Enhancement” section in the “Basic SIP Configuration” module in this guide.
DNS SRV Query Procedure
In accordance with RFC 3261, when a Request URI or the session target in the dial peer contains a fully qualified domain name (FQDN), the UAC needs to determine the protocol, port, and IP address of the endpoint before it forwards the request. SIP on Cisco gateways uses Domain Name System Server (DNS SRV) query to determine the protocol, port, and IP address of the user endpoint.
Before Cisco IOS Release 12.2(13)T, the DNS query procedure did not take into account the destination port.
A Time to Live (TTL) value of 3600 seconds is recommended for DNS SRV records. If you have to change the TTL value, the following equation must be true:
A = Number of entries in the DNS SRV record
B = Number of INVITE request retries configured using the retry invite command
C = Waiting time for the SIP user agent configured using the timers trying command
CANCEL Request Route Header
A CANCEL message sent by a UAC on an initial INVITE request cannot have a Route header. Route headers cannot appear in a CANCEL message because they take the same path as INVITE requests, and INVITE requests cannot contain Route headers.
Interpret User Parameters
There are instances when the telephone-subscriber or user parameters can contain escaped characters to incorporate space, control characters, quotation marks, hash marks, and other characters. After the receipt of an INVITE message, the telephone-subscriber or user parameter is interpreted before dial-peer matching is done. For example, the escaped telephone number in an incoming INVITE message may appear as:
-%32%32%32
Although 222 is a valid telephone number, it requires interpretation. If the interpretation is not done, the call attempt fails when the user parameter is matched with the dial-peer destination pattern.
user=phone Parameter
A SIP URL identifies a user’s address, which appears similar to an e-mail address. The form of the user’s address is user@host where “user” is the user identification and “
host” is either a domain name or a numeric network address. For example, the request line of an outgoing INVITE request might appear as:
INVITE sip:
The user=phone parameter formerly required in a SIP URL is no longer necessary. However, if an incoming SIP message has a SIP URL with user=phone, user=phone is parsed and used in the subsequent messages of the transaction.
303 and 411 SIP Cause Codes
RFC 3261 obsoletes the SIP cause codes 303 Redirection: See Other
and 411 Client Error: Length required
Flexibility of Content-Type Header
The Content-Type header, which specifies the media type of the message body, is permitted to have an empty Session Description Protocol (SDP) body.
Optional SDP s= Line
The s= line in SDP is accepted as optional. The s= line describes the reason or subject for SDP information. Cisco SIP gateways can create messages with an s= line in SDP bodies and can accept messages that have no s= line.
Allow Header Addition to INVITEs and 2xx Responses
The use of the Allow header in an initial or re-INVITE request or in any 2xx
class response to an INVITE is permitted. The Allow header lists the set of methods supported by the user agent that is generating the message. Because it advertises what methods should be invoked on the user agent sending the message, it avoids congesting the message traffic unnecessarily. The Allow header can contain any or all of the following: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, NOTIFY, INFO, SUBSCRIBE.
Simultaneous Cancel and 2xx Class Response
According to RFC 3261, if the UAC desires to end the call before a response is received to an INVITE, the UAC sends a CANCEL. However, if the CANCEL and a 2xx class response to the INVITE “pass on the wire,” the UAC also receives a 2xx to the INVITE. When the two messages pass, the UAC terminates the call by sending a BYE request.
UPDATE-Request Processing
RFC 3261, which obsoletes RFC 2543, defines the SIP signaling protocol for creating, modifying and terminating sessions. The SIP Extensions for Caller Identity and Privacy feature provides support for the following SIP gateway implementations that are compliant with the RFC 3261specification:
SIP UPDATE Requests
SIP accomplishes session management through a series of messages that are either requests from a server or client, or responses to a request. SIP uses an INVITE request to initiate and modify sessions between user agents (UAs), and uses the ACK method to acknowledge a final response to an INVITE request. In some cases a session needs to be modified before the INVITE request is answered. This scenario occurs, for example, in a call that sends early media, the information sent to convey call progress during an established session, and for which the INVITE request has not been accepted. In this scenario either the caller or callee should be able to modify the characteristics of a session, for instance, by putting the early media on hold before the call is answered. Prior to the SIP UPDATE method, which allows a client to update session parameters, there was no mechanism to allow a caller or callee to provide updated session information before a final response to the initial INVITE request was generated. The SIP Extensions for Caller Identity and Privacy feature provides support for the UPDATE method and enables the gateway capability to receive and process, but not send, UPDATE requests. The gateway also updates the session timer value after the call is active.
A user agent client (UAC) initiates a session by sending an INVITE request to a user agent server (UAS). The UAS responds to the invitation by sending the following response codes:
A 1xx provisional response indicating call progress. All 1xx responses are information all non-1xx responses are final.
A 2xx response indicating successful completion or receipt of a request
A 3xx, 4xx, 5xx, or 6xx response indicating rejection or failure.
A PRACK response is used to acknowledge receipt of a reliably transported provisional response, including a response with early media indication, while the ACK is used to acknowledge a final response to an INVITE request. A PRACK establishes an early dialog between UAC and UAS, a requirement to receive UPDATE requests with a new offer.
When a 2xx response is sent it establishes a session and also creates a dialog, or call leg. A dialog established by a 1xx response is considered an early dialog, whereas a final response establishes a confirmed dialog. The SIP UPDATE method allows a UAC to update session parameters, such as the set of media streams and their codecs, without affecting the dialog state. Unlike a re-INVITE request, a SIP UPDATE request may be sent to modify a session before the initial INVITE request is answered without impacting the dialog state itself. The UPDATE method is useful for updating session parameters within early dialogs before the initial INVITE request has been answered, for example, when early media is sent.
The SIP UPDATE method makes use of the offer and answer exchange using Session Description Protocol (SDP), as defined in the IETF specification, RFC 3264, An Offer/Answer Model with the Session Description Protocol (SDP)
. One UA in the session generates an SDP message that constitutes the offer, that is, the set of media streams and codecs the UA wants to use, along with IP addresses and ports where the UA wants to receive the media. The other UA generates an answer, an SDP message responding to the offer.
In the Cisco SIP implementation, a UAS can receive an UPDATE request in both early and confirmed dialogs. The point at which the offer is generated, the UPDATE is received, the presence or absence of reliable provisional response and SDP, are all factors that determine how the gateway handles the UPDATE request. An UPDATE request generates a response indicating one of several possible outcomes:
Pending response to outstanding offers
The following sections discuss how UPDATE requests are received and processed in various scenarios and call flows.
UPDATE Request Processing Before the Call Is Active
When the gateway sends a reliable provisional response with SDP, the
response includes an Allow header that lists the UPDATE method and informs the
caller of the gateway capability to support UPDATE processing.
The figure below shows a call where the UAS sent a reliable provisional
response (ANSWER 1) to an INVITE request (Offer 1). The18x early media response
indicated the gateway capability to support UPDATEs. The UAC sent a provisional
acknowledgement (PRACK) and received a 200 OK response to the PRACK request.
The UAC requested the UAS modify the existing session media parameters of the
early dialog by sending an UPDATE request (Offer 2). The UAS accepted Offer 2
by sending a 200 OK response. If media negotiation had failed, the UAS would
have sent a 488 Unacceptable Media response instead. Later the UAS sent a 200
OK final response to the initial INVITE request. The UAS sent an ACK request
acknowledging the final response to the INVITE request.
Figure 1. UPDATE for Early Media
In the figure below, the gateway received an UPDATE (Offer 2) before
responding to the INVITE request (Offer 1), causing the gateway to reject the
request by sending a 500 Internal Server Error with a Retry-After header field
set to a randomly chosen value between zero and ten seconds.
Figure 2. Initial UPDATE Rejected
In the figure below, the initial INVITE request did not contain an
offer, and the UAS gateway sent SDP with reliable provisional response (Offer
1) which was treated by the UAC as an offer.
Figure 3. UPDATE Request for Delayed Media
In the figure below, the UAS received an UPDATE request with an offer
(Offer 2) before receiving a PRACK, that is, before the early dialog is
established, causing the UAS (gateway) to generate a 491 Request Pending
Figure 4. UPDATE Request Failure for Delayed Media
Error Responses to UPDATE Request Processing Before the Call Is
In other scenarios, additional rules apply to processing an UPDATE
request with an offer when the gateway has sent a 200 OK response to an INVITE
request but has not yet received an ACK. The following scenarios generate an
error response and are shown in the figure below:
If the initial INVITE
request contains an offer but does not require provisional responses be sent
reliably, then the SDP in the 200 OK is treated like an answer. If the UAS then
receives an UPDATE request before an ACK response to the 200 OK, the UAS sends
a 500 Server Internal error response with a Retry-After header.
If the initial INVITE does
not contain an offer and does not require provisional responses be sent
reliably, then the SDP in the 200 OK is treated like an offer. If the UAS then
receives an UPDATE request before receiving an ACK to the 200 OK, the UAS sends
a 491 Request Pending response.
Figure 5. Error Cases for UPDATE Requests
UPDATE Request Processing in the Active State
RFC 3261 recommends using a re-INVITE request, the SIP message that
changes session parameters of an existing or pending call, to update session
parameters after a call is active. UPDATEs received after a call is active are
processed like a re-INVITE except that the 200 OK to update is not resent (see
the figure below).
Figure 6. UPDATE Request in the Active State
The figure below shows a UAC that sent a mid-call INVITE request which
has not yet been answered. In this state, when the gateway receives an UPDATE
request with a new offer, it sends a 491 Request Pending error.
Figure 7. Error Response to an UPDATE Request in the Active State
Via Header Parameters and Merged Request Detection
To meet specifications of RFC 3261, the SIP Extensions for Caller Identity and Privacy feature provides support for the branch parameter in the Via header of a request, the information used to identify the transaction created by that request. The branch parameter value begins with the value “z9hG4bK” indicating that the request was generated by a UAC that is RFC 3261 compliant. The SIP Extensions for Caller Identity and Privacy feature also adds support for generating the received parameter with the received address.
The SIP Extensions for Caller Identity and Privacy feature uses the branch and sent-by parameters to detect a merged request, that is, a request that has arrived at the UAS more than once by following different paths. If the request has no tag in the To header field, the UAS checks the request against ongoing transactions. If the From tag, Call-ID, and CSeq headers exactly match those headers associated with an ongoing transaction, but the topmost Via header, including the branch parameter, does not match, the UAS treats the request as merged. The UAS responds to a merged request with a 482 Loop Detected error.
Loose-Routing and the Record-Route Header
The SIP Extensions for Caller Identity and Privacy feature supports loose-routing, a mechanism that helps keep the request target and next route destination separate. The lr parameter, used in the uniform resource indicator (URI) that a proxy places in the Record-Route header, indicates proxy compatibility with RFC 3261. If the lr parameter is missing from a request, the UA assumes the next-hop proxy implements strict-routing in compliance with RFC 2543, and reformats the message to preserve information in the Request-URI.
Multiple INVITE Requests Before a Final Response
This feature implements support for processing multiple INVITE requests
received by the UAS before it sends a final response to the initial INVITE
request (see the figure below). If the UAS gateway receives a second INVITE
request before it sends the final response to the first INVITE request with a
lower CSeq sequence number on the same dialog, the UAS returns a 500 Server
Internal Error response to the second INVITE request. The error response also
includes a Retry-After header field with a random value between 0 and 10
Figure 8. Re-INVITE Request Rejected With a 5xx Response
Mid-call Re-INVITE Request Failure
The SIP Extensions for Caller Identity and Privacy feature implements
the mid-call re-INVITE request failure treatment shown in the figure below. The
UAC terminates a dialog when a non-2xx final response to a mid-call INVITE
request is one of the following:
A 481 Call/Transaction Does
Not Exist failure response
A 408 Request Timeout
failure response
Figure 9. Dialog Termination After a 481 or 408 Response to Re-INVITE
PRACK Request with a New Offer
The SIP Extensions for Caller Identity and Privacy feature supports a
PRACK request with a new offer (see the figure below). If the UAC receives a
reliable provisional response with an answer (Answer 1), it may generate an
additional offer in the PRACK (Offer 2). If the UAS receives a PRACK with an
updated offer, it generates a 200 OK with an answer (Answer 2) if negotiation
is successful. Otherwise the UAS generates a 488 Unacceptable Media response.
Figure 10. Offer in PRACK Accepted
Reliable Provisional Response Failure
The SIP Extensions for Caller Identity and Privacy feature provides the
treatment shown in the figure below when the UAS does not receive a
corresponding PRACK after resending a 18x reliable provisional response for the
maximum number of retries allowed or for 32 seconds. The UAS generates a 5xx
response to clear the call.
Figure 11. Reliable Provisional Response Failure
Sample Messages
This section contains sample SIP messages collected at the terminating SIP gateway.
SIP UPDATE Request Call Flow Example
The following example shows an exchange of SIP requests and responses, including an UPDATE request before the call is active:
1w0d:SIP Msg:ccsipDisplayMsg:Received:
INVITE sip:222@192.0.2.12:5060 SIP/2.0
Record-Route:&sip:222@192.0.2.4:5060;maddr=192.0.2.4&
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=5,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK1D38
From:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
To:&sip:222@192.0.2.4&
Date:Mon, 08 Apr :08 GMT
Call-ID:A2B205CC-4A0A410-F2.0.2.14
Supported:timer
The next line shows the UAC requires the provisional response be reliably transported.
Require:100rel
Min-SE: 1800
Cisco-Guid:---
User-Agent:Cisco-SIPGateway/IOS-12.x
The Allow header shows that the UPDATE method is supported.
Allow:INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
CSeq:101 INVITE
Max-Forwards:70
Remote-Party-ID:&sip:111@192.0.2.14&;party=screen=privacy=off
Timestamp:
Contact:&sip:111@192.0.2.14:5060&
Expires:180
Allow-Events:telephone-event
Content-Type:application/sdp
Content-Length:262
The following SDP constitutes the initial offer, including media streams and codecs, along with IP addresses and ports to receive media.
o=CiscoSystemsSIP-GW-UserAgent
IN IP4 192.0.2.14
s=SIP Call
c=IN IP4 192.0.2.14
m=audio 17782 RTP/AVP 8 0 18 19
c=IN IP4 192.0.2.14
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:19 CN/8000
1w0d:SIP Msg:ccsipDisplayMsg:Sent:
SIP/2.0 100 Trying
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=5,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK1D38
From:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
To:&sip:222@192.0.2.4&;tag=24D435A8-C29
Date:Sat, 07 Oct :34 GMT
Call-ID:A2B205CC-4A0A410-F2.0.2.14
Timestamp:
Server:Cisco-SIPGateway/IOS-12.x
CSeq:101 INVITE
Allow-Events:telephone-event
Content-Length:0
In the following lines, the gateway responds by sending early media in answer to the initial offer.
1w0d:SIP Msg:ccsipDisplayMsg:Sent:
SIP/2.0 183 Session Progress
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=5,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK1D38
From:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
To:&sip:222@192.0.2.4&;tag=24D435A8-C29
Date:Sat, 07 Oct :34 GMT
Call-ID:A2B205CC-4A0A410-F2.0.2.14
Timestamp:
Server:Cisco-SIPGateway/IOS-12.x
CSeq:101 INVITE
Require:100rel
Allow:UPDATE
Allow-Events:telephone-event
Contact:&sip:222@192.0.2.12:5060&
Record-Route:&sip:222@192.0.2.4:5060;maddr=192.0.2.4&
Content-Disposition:handling=required
Content-Type:application/sdp
Content-Length:191
o=CiscoSystemsSIP-GW-UserAgent
IN IP4 192.0.2.12
s=SIP Call
c=IN IP4 192.0.2.12
m=audio 18020 RTP/AVP 8 19
c=IN IP4 192.0.2.12
a=rtpmap:8 PCMA/8000
a=rtpmap:19 CN/8000
The following lines show the UAS receiving a PRACK for the 183 response.
1w0d:SIP Msg:ccsipDisplayMsg:Received:
PRACK sip:222@192.0.2.12:5060 SIP/2.0
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=6,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK40A
From:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
To:&sip:222@192.0.2.4&;tag=24D435A8-C29
Date:Mon, 08 Apr :08 GMT
Call-ID:A2B205CC-4A0A410-F2.0.2.14
CSeq:102 PRACK
RAck: INVITE
Content-Length:0
1w0d:SIP Msg:ccsipDisplayMsg:Sent:
SIP/2.0 200 OK
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=6,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK40A
From:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
To:&sip:222@192.0.2.4&;tag=24D435A8-C29
Date:Sat, 07 Oct :34 GMT
Call-ID:A2B205CC-4A0A410-F2.0.2.14
Server:Cisco-SIPGateway/IOS-12.x
CSeq:102 PRACK
Content-Length:0
The next lines show the UAS receiving an updated offer with different media streams and codecs.
1w0d:SIP Msg:ccsipDisplayMsg:Received:
UPDATE sip:222@192.0.2.12:5060 SIP/2.0
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=z9hG4bK10
Via:SIP/2.0/UDP 192.0.2.14:5060
To:&sip:222@192.0.2.4&;tag=24D435A8-C29
From:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
Call-ID:A2B205CC-4A0A410-F2.0.2.14
CSeq:103 UPDATE
Contact:sip:111@192.0.2.14:5060
Content-Length:262
o=CiscoSystemsSIP-GW-UserAgent
IN IP4 192.0.2.14
s=SIP Call
c=IN IP4 192.0.2.14
m=audio 17782 RTP/AVP 8 0 18 19
c=IN IP4 192.0.2.14
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:19 CN/8000
The new offer in the UPDATE request is acceptable to the server, so it responds with the corresponding answer in the 200 OK message.
1w0d:SIP Msg:ccsipDisplayMsg:Sent:
SIP/2.0 200 OK
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=z9hG4bK10,SIP/2.0/UDP 192.0.2.14:5060
From:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
To:&sip:222@192.0.2.4&;tag=24D435A8-C29
Date:Sat, 07 Oct :34 GMT
Call-ID:A2B205CC-4A0A410-F2.0.2.14
Server:Cisco-SIPGateway/IOS-12.x
CSeq:103 UPDATE
Content-Type:application/sdp
Content-Length:191
o=CiscoSystemsSIP-GW-UserAgent
IN IP4 192.0.2.12
s=SIP Call
c=IN IP4 192.0.2.12
m=audio 18020 RTP/AVP 8 19
c=IN IP4 192.0.2.12
a=rtpmap:8 PCMA/8000
a=rtpmap:19 CN/8000
1w0d:SIP Msg:ccsipDisplayMsg:Sent:
SIP/2.0 200 OK
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=5,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK1D38
From:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
To:&sip:222@192.0.2.4&;tag=24D435A8-C29
Date:Sat, 07 Oct :34 GMT
Call-ID:A2B205CC-4A0A410-F2.0.2.14
Timestamp:
Server:Cisco-SIPGateway/IOS-12.x
CSeq:101 INVITE
Allow:INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
Allow-Events:telephone-event
Contact:&sip:222@192.0.2.12:5060&
Record-Route:&sip:222@192.0.2.4:5060;maddr=192.0.2.4&
Content-Type:application/sdp
Content-Length:191
o=CiscoSystemsSIP-GW-UserAgent
IN IP4 192.0.2.12
s=SIP Call
c=IN IP4 192.0.2.12
m=audio 18020 RTP/AVP 8 19
c=IN IP4 192.0.2.12
a=rtpmap:8 PCMA/8000
a=rtpmap:19 CN/8000
1w0d:SIP Msg:ccsipDisplayMsg:Received:
ACK sip:222@192.0.2.12:5060 SIP/2.0
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=7,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK230
From:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
To:&sip:222@192.0.2.4&;tag=24D435A8-C29
Date:Mon, 08 Apr :08 GMT
Call-ID:A2B205CC-4A0A410-F2.0.2.14
Max-Forwards:70
CSeq:101 ACK
Content-Length:0
1w0d:SIP Msg:ccsipDisplayMsg:Sent:
BYE sip:222@192.0.2.4:;maddr=192.0.2.4 SIP/2.0
Via:SIP/2.0/UDP
192.0.2.12:5060;branch=z9hG4bKCA
From:&sip:222@192.0.2.4&;tag=24D435A8-C29
To:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
Date:Sat, 07 Oct :35 GMT
Call-ID:A2B205CC-4A0A410-F2.0.2.14
User-Agent:Cisco-SIPGateway/IOS-12.x
Max-Forwards:70
Route:&sip:111@192.0.2.14:5060&
Timestamp:
CSeq:101 BYE
Content-Length:0
1w0d:SIP Msg:ccsipDisplayMsg:Received:
SIP/2.0 200 OK
Via:SIP/2.0/UDP
192.0.2.12:5060;branch=z9hG4bKCA
From:&sip:222@192.0.2.4&;tag=24D435A8-C29
To:&sip:111@192.0.2.14&;tag=3DD33DE4-10DF
Date:Mon, 08 Apr :29 GMT
Call-ID:A2B205CC-4A0A410-F2.0.2.14
Server:Cisco-SIPGateway/IOS-12.x
Timestamp:
Content-Length:0
CSeq:101 BYE
Loose-Routing Call Flow Example
The following sample message shows a loose-routing request:
1w0d:SIP Msg:ccsipDisplayMsg:Received:
INVITE sip:222@192.0.2.12:5060 SIP/2.0
The SIP messages in the following call flow have the Request-URI set to the SIP URI of the destination UA instead of the SIP URI of the next-hop destination, that is, the SIP proxy server.
Record-Route:&sip:222@192.0.2.4:5060;maddr=192.0.2.4&
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=9,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK2394
From:&sip:111@192.0.2.14&;tag=3DD3A404-12A3
To:&sip:222@192.0.2.4&
Date:Mon, 08 Apr :34 GMT
Call-ID:BA5A410-F2.0.2.14
Supported:timer
Min-SE: 1800
Cisco-Guid:---
User-Agent:Cisco-SIPGateway/IOS-12.x
Allow:INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
CSeq:101 INVITE
Max-Forwards:70
Remote-Party-ID:&sip:111@192.0.2.14&;party=screen=privacy=off
Timestamp:
Contact:&sip:111@192.0.2.14:5060&
Expires:180
Allow-Events:telephone-event
Content-Type:application/sdp
Content-Length:262
o=CiscoSystemsSIP-GW-UserAgent
IN IP4 192.0.2.14
s=SIP Call
c=IN IP4 192.0.2.14
m=audio 18354 RTP/AVP 8 0 18 19
c=IN IP4 192.0.2.14
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:19 CN/8000
1w0d:SIP Msg:ccsipDisplayMsg:Sent:
SIP/2.0 100 Trying
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=9,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK2394
From:&sip:111@192.0.2.14&;tag=3DD3A404-12A3
To:&sip:222@192.0.2.4&;tag=24D49BE8-2346
Date:Sat, 07 Oct :00 GMT
Call-ID:BA5A410-F2.0.2.14
Timestamp:
Server:Cisco-SIPGateway/IOS-12.x
CSeq:101 INVITE
Allow-Events:telephone-event
Content-Length:0
1w0d:SIP Msg:ccsipDisplayMsg:Sent:
SIP/2.0 180 Ringing
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=9,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK2394
From:&sip:111@192.0.2.14&;tag=3DD3A404-12A3
To:&sip:222@192.0.2.4&;tag=24D49BE8-2346
Date:Sat, 07 Oct :00 GMT
Call-ID:BA5A410-F2.0.2.14
Timestamp:
Server:Cisco-SIPGateway/IOS-12.x
CSeq:101 INVITE
Allow:UPDATE
Allow-Events:telephone-event
Contact:&sip:222@192.0.2.12:5060&
Record-Route:&sip:222@192.0.2.4:5060;maddr=192.0.2.4&
Content-Length:0
1w0d:SIP Msg:ccsipDisplayMsg:Sent:
SIP/2.0 200 OK
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=9,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK2394
From:&sip:111@192.0.2.14&;tag=3DD3A404-12A3
To:&sip:222@192.0.2.4&;tag=24D49BE8-2346
Date:Sat, 07 Oct :00 GMT
Call-ID:BA5A410-F2.0.2.14
Timestamp:
Server:Cisco-SIPGateway/IOS-12.x
CSeq:101 INVITE
Allow:INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
Allow-Events:telephone-event
Contact:&sip:222@192.0.2.12:5060&
Record-Route:&sip:222@192.0.2.4:5060;maddr=192.0.2.4&
Content-Type:application/sdp
Content-Length:191
o=CiscoSystemsSIP-GW-UserAgent
IN IP4 192.0.2.12
s=SIP Call
c=IN IP4 192.0.2.12
m=audio 16720 RTP/AVP 8 19
c=IN IP4 192.0.2.12
a=rtpmap:8 PCMA/8000
a=rtpmap:19 CN/8000
1w0d:SIP Msg:ccsipDisplayMsg:Received:
ACK sip:222@192.0.2.12:5060 SIP/2.0
Via:SIP/2.0/UDP 192.0.2.4:5060;branch=10,SIP/2.0/UDP
192.0.2.14:5060;branch=z9hG4bK103D
From:&sip:111@192.0.2.14&;tag=3DD3A404-12A3
To:&sip:222@192.0.2.4&;tag=24D49BE8-2346
Date:Mon, 08 Apr :34 GMT
Call-ID:BA5A410-F2.0.2.14
Max-Forwards:70
CSeq:101 ACK
Content-Length:0
1w0d:SIP Msg:ccsipDisplayMsg:Sent:
BYE sip:111@192.0.2.14:5060 SIP/2.0
Via:SIP/2.0/UDP
192.0.2.12:5060;branch=z9hG4bK18B6
From:&sip:222@192.0.2.4&;tag=24D49BE8-2346
To:&sip:111@192.0.2.14&;tag=3DD3A404-12A3
Date:Sat, 07 Oct :01 GMT
Call-ID:BA5A410-F2.0.2.14
User-Agent:Cisco-SIPGateway/IOS-12.x
Max-Forwards:70
Route:&sip:222@192.0.2.4:5060;maddr=192.0.2.4&
Timestamp:
CSeq:101 BYE
Content-Length:0
1w0d:SIP Msg:ccsipDisplayMsg:Received:
SIP/2.0 200 OK
Via:SIP/2.0/UDP
192.0.2.12:5060;branch=z9hG4bK18B6
From:&sip:222@192.0.2.4&;tag=24D49BE8-2346
To:&sip:111@192.0.2.14&;tag=3DD3A404-12A3
Date:Mon, 08 Apr :54 GMT
Call-ID:BA5A410-F2.0.2.14
Server:Cisco-SIPGateway/IOS-12.x
Timestamp:
Content-Length:0
CSeq:101 BYE
SIP RFC 3261 RFC 3262 and RFC 3264 Compliance
The Internet Engineering Task Force (IETF) continually updates SIP standards. This feature describes the specific updates or optimizations that were made on Cisco SIP gateways to remain in compliance with the IETF. The following standards have been updated:
RFC 3261: Core Standard for SIP (obsoleting RFC 2543)
RFC 3262: Standard for Reliability of Provisional Responses in SIP
RFC 3264: Standard for Offer/Answer Model with Session Description Protocol (SDP)
To provide quality service to our SIP customers, Cisco optimizes its SIP gateways to comply with the latest SIP-related RFCs. In addition, backward compatibility is maintained, providing customers interoperability with gateways that do not yet support the current RFCs.
NoteIn compliance with RFC 4612, the inclusion of T38 parameters in SDP indicates that the parameters are supported and exclusion of these parameters indicate that the parameters are excluded. The SDP parameters are:
a=T38FaxTranscodingMMR
a=T38FaxFillBitRemoval
a=T38FixTranscodingJBIG
SIP Messaging Enhancements
The following changes or additions were made to SIP messaging:
This feature is in compliance with RFC 3261. If a user agent server (UAS) generates a 2xx request and is waiting for an acknowledgement (ACK), and the call disconnects at the server side, the UAS does not send a BYE message immediately. The UAS sends a BYE message when the retry timer times out or when the ACK response is received. The BYE message terminates the call to prevent hung networks.
In compliance with RFC 3261, the user agent (UA) cannot send a BYE message until it receives an ACK response from the originating gateway. This enhancement prevents a race condition, which is when a BYE response arrives at the terminating gateway before the 200 OK response. This enhancement applies to normal disconnects and not to disconnects due to timeouts or errors.
In compliance with RFC 3262, the user agent client (UAC) now waits for a 1xx provisional response (PRACK) from the terminating gateway before sending a Cancel request to an Invite request. Waiting for a 1xx response prevents resources from being held up, which can happen if the Cancel request arrives at the terminating gateway before the Invite message.
In compliance with RFC 3261, a Cisco SIP gateway returns a 491 Request Pending response when it receives an Invite requesting session modification on a dialog while an Invite request is still in progress. The gateway that sent the re-Invite and that receives the 491 response starts a timer with a randomly chosen value. When the timer expires, the gateway attempts the Invite request again if it still desires the session modification to take place.
If the UAC generated the request, the timer has a randomly chosen value between 2.1 and 4 seconds, in units of 10 ms. If the UAC did not generate the request, the timer has a randomly chosen value between 0 and 2 seconds, in units of 10 ms.
SIP TCP and UDP Connection Enhancements
Prior to RFC 3261, TCP support was optional for SIP user agents. RFC 3261 now requires support for both UDP and TCP. While Cisco SIP gateways already supported TCP, there have been several optimizations that are described below:
Failed Transmissions of 2xx Responses
The transmission of 2xx responses is in compliance with RFC 3261. If the transport is TCP and a gateway does not receive an acknowledgement to a 2xx response it sent to an INVITE message, the gateway retries the 2xx response over TCP. The retry ensures that a gateway receives a 200 OK message, eliminating the possibility that the 2xx response is lost when hops over the network use an unreliable transport such as UDP.
Reuse of TCP and UDP Connections
Prior to RFC 3261, a remote gateway could not initiate two requests over the same TCP connection. In addition, the gateway created a new connection for each new transaction, and after the completion of a transaction, the gateway closed the connection. Closing the connection, even if a subsequent request was destined for the same location as the previous transaction, resulted in potentially lower performance due to the large number of unnecessary open/close connections. With Cisco IOS Release 12.3(8)T, the gateway opens one TCP connection per remote IP address and port. The gateway opens a new connection only if a connection to the particular destination IP address and port is not already present. The gateway closes the connection when all requests that use that connection have terminated and no activity is detected for a given time period.
The timers connection command allows you to time out a TCP or UDP connection because of inactivity.
Transaction-Based Transport Switching and Usage
With Cisco IOS Release 12.3(8)T, if a new transaction request is larger than the threshold switchable value, it is sent over TCP. The threshold switchable value is a value that is 200 bytes or more than the interface or path’s MTU. If the message size is smaller than the threshold switchable value, the original configured transport is used. The original transport means the transport configured under the dial peer for the initial Invite request or the transport specified in the incoming response’s Contact or Record-Route headers in subsequent requests. In other words, the transport usage is now transaction-based instead of call-based.
Detection of Remote End Connection Closures
Remote gateway closures that go undetected can result in hung TCP connections. If a closed connection remains undetected, the corresponding connection entry is never removed from the connection table. Continuous occurrences of undetected closures can lead to the connection table being filled with invalid entries and valid SIP requests being rejected, requiring a router reboot. With Cisco IOS Release 12.3(8)T, the SIP gateway uses internal mechanisms to detect remote closures and to clean up the connection table. No user input is required to initiate the cleanup.
Creation of New Connections for Sending Responses in Case the Original Connection Dropped
With Cisco IOS Release 12.3(8)T, if a gateway tears down the connection of an incoming request before a response is sent, the receiving gateway creates a new connection to send out a response. The new connection is based on the port specified in the sent-by parameter of the Via header. Prior to Cisco IOS Release 12.3(8)T, a dropped connection resulted in failure of the call.
Dynamic Transport Switching (UDP to TCP) for Large SIP Requests
RFC 3261 states that large SIP requests, requests within 200 bytes of the maximum transmission unit (MTU), should be transmitted over TCP. Transport over TCP avoids UDP fragmentation, and the switch to TCP can occur even if the gateway is configured to use UDP. If the TCP transmission fails (for example if the terminating gateway does not support TCP), the message is then retried over UDP.
The capability to configure the MTU size on an Ethernet or Fast Ethernet interface already exists on the Cisco SIP gateways. If the MTU is not configured, the default MTU value is 1500 bytes. Assuming an MTU of 1500 bytes, requests larger than 1300 bytes are considered the threshold value for dynamic transport switching.
Two commands allow the user to enable or disable support for dynamic switching. Use the commands to avoid interoperability issues with gateways that do not support TCP and to maintain backward compatibility. The transport switch command can be configured at the global level, and the voice-class sip transport switch command can be configured at the dial peer level. The global configuration is considered only when there is no matching VoIP dial peer.
This feature is disabled by default.
Call-Hold Enhancement
RFC 3264 recommends
that call-hold be initiated using the direction attribute (a=sendonly) in SDP.
Cisco POT-SIP gateways follow the new guideline, and these gateways can now
initiate call-hold using either one of the two ways. The
command allows the user to globally
specify the format to initiate call-hold. That is, the gateway should use
a=sendonly or conn addr=0.0.0.0; it cannot set usage to both. The default
configuration is a=sendonly, because this is the RFC recommended method.
Specifying a call-hold format is not available at the dial peer level.
Cisco POTS-SIP
gateways support receiving call-hold requests in either of the two formats, but
use of the direction attribute is recommended.
Expanded Range of the max-forwards Command
In compliance with RFC 3261, the max-forwards command was enhanced with a greater configurable range (1 to 70) and a higher default value (70).
How to Configure SIP RFC Compliance
Note For help with a procedure, see the verification and troubleshooting sections listed above. Before you perform a procedure, familiarize yourself with the following information:
Configuring Compliance to RFC 2543
No configuration tasks are required to enable RFC 2543. It is enabled by default.
Configuring Compliance to RFC 2782
SUMMARY STEPS1.
DETAILED STEPS Command or ActionPurposeStep 1
Router& enable
Enables privileged EXEC mode.
Enter your password if prompted.
Router# configure terminal
Enters global configuration mode.
Router(config)# sip-ua
Enters SIP user-agent configuration mode.
Router(config-sip-ua)# srv version 2
Generates DNS SRV queries with either RFC 2052 or RFC 2782 format. Keywords are as follows:
1--Domain-name prefix of format protocol.transport. (RFC 2052 style)
2--Domain-name prefix of format _protocol._transport. (RFC 2782 style)
Default: 2.
Router(config-sip-ua)# exit
Exits the current mode.
Configuring Compliance to RFC 3261
No configuration tasks are required to enable RFC 3261. It is enabled by default.
Configuring Compliance to RFC 3261 RFC 3262 and RFC 3264
Configure SIP Messaging
No configuration is necessary.
Configure TCP and UDP Connection Enhancements
To set the time before the SIP UA ages out a TCP or UDP connection because of inactivity, perform the following steps.
SUMMARY STEPS1.
connection
timer-value
DETAILED STEPS Command or ActionPurposeStep 1
Router& enable
Enables privileged EXEC mode.
Enter your password if prompted.
Router# configure terminal
Enters global configuration mode.
Router(config)# sip-ua
Enters SIP user-agent configuration mode.
connection
timer-value
Router(config-sip-ua)# timers connection aging 5
Sets the time before the SIP UA ages out a TCP or UDP connection because of inactivity. The argument is as follows:
timer-value
Time, in minutes, to wait. Range: 5 to 30. Default: 5.
Router(config-sip-ua)# exit
Exits the current mode.
Configure Dynamic Transport Switching (UDP to TCP) for Large SIP Requests
RFC 3261 states that large SIP requests, within 200 bytes of the maximum transmission unit (MTU), should be transmitted over TCP. Transport over TCP avoids UDP fragmentation, and the switch to TCP can occur even if the gateway is configured to use UDP.
The configurations below describe setting the gateway to switch from UDP to TCP. The default MTU configuration of 1500 bytes on the interface is assumed. After configuration, the threshold value is 1300 bytes--that is, for all SIP requests over 1300 bytes, TCP is the transport mechanism.
You can configure dynamic transport switching on a dial-peer or global basis.
Configuring Dynamic Transport Switching for Large SIP Requests on a Dial-Peer Basis
To configure switching between UDP and TCP transport mechanisms for a specific dial peer, perform the following steps.
Dynamic transport switching from UDP to TCP is disabled by default.
When the dynamic transport switching mechanism is enabled in dial-peer voice configuration mode, it takes precedence over the global configuration.
SUMMARY STEPS1.
voice-class
DETAILED STEPS Command or ActionPurposeStep 1
Router& enable
Enables privileged EXEC mode. Enter your password if prompted.
Router# configure terminal
Enters global configuration mode.
Router(config)# dial-peer voice 25 voip
Enters dial-peer configuration mode for the specified VoIP dial peer.
voice-class
Router(config-dial-peer)# voice-class sip transport switch udp tcp
Enables switching between UDP and TCP transport mechanisms for large SIP messages for a specific dial peer. Keywords are as follows:
--Switching transport from UDP on the basis of the size of the SIP request being greater than the MTU size.
--Switching transport to TCP.
Router(config-dial-peer)# exit
Exits the current mode.
Configuring Dynamic Transport Switching for Large SIP Requests on a Global Basis
To configure switching between UDP and TCP transport mechanisms on all the connections of a Cisco SIP gateway, perform the following steps.
Note Dynamic transport switching from UDP to TCP is disabled by default.
When the dynamic transport switching mechanism is enabled in dial-peer voice configuration mode, it takes precedence over the global configuration. Consider the global configuration described below only when there is no matching VoIP dial peer.
SUMMARY STEPS1.
DETAILED STEPS Command or ActionPurposeStep 1
Router& enable
Enables privileged EXEC mode.
Enter your password if prompted.
Router# configure terminal
Enters global configuration mode.
Router(config)# voice service voip
Enters voice-service configuration mode.
Router(config-voi-srv)# sip
Enters SIP configuration mode.
Router(conf-serv-sip)# transport switch udp tcp
Enables switching between UDP and TCP transport mechanisms globally for large SIP messages. Keywords are as follows:
-- Switching transport from UDP based on the size of the SIP request being greater than the MTU size.
--Switching transport to TCP.
Router(conf-serv-sip)# exit
Exits the current mode.
What to Do Next
Use the following commands to aid in verifying and troubleshooting the SIP transport and connection configurations:
connections
To learn more about these commands as well as other verification and troubleshooting commands, see "Verifying SIP RFC Compliance" and "Troubleshooting Tips".
Configure Call-Hold
To specify how the
POT-SIP gateway should initiate call-hold requests, perform the following
SUMMARY STEPS1.
{conn-addr |
direction-attr}
DETAILED STEPS Command or ActionPurposeStep 1
Router& enable
privileged EXEC mode.
Enter your
password if prompted.
Router# configure terminal
Enters global
configuration mode.
Router(config)# sip-ua
Enters SIP
user-agent configuration mode.
{conn-addr |
direction-attr}
Router(config-sip-ua)# offer call-hold direction-attr
Specifies how
the POT-SIP gateway should initiate call-hold requests. Keywords are as
--RFC 2543/RFC 3261 method of using the connection
address for initiating call-hold requests. Uses 0.0.0.0.
direction-attr
--RFC 3264 method of using the direction attribute for
initiating call-hold requests. Uses the direction attribute in SDP.
Router(config-sip-ua)# exit
current mode.
Configure Max Forwards
To set the maximum number of proxy or redirect servers that can forward the SIP request, perform the following steps.
SUMMARY STEPS1.
max-forwards
DETAILED STEPS Command or ActionPurposeStep 1
Router& enable
Enables privileged EXEC mode.
Enter your password if prompted.
Router# configure terminal
Enters global configuration mode.
Router(config)# sip-ua
Enters SIP user-agent configuration mode.
max-forwards
Router(config-sip-ua)# max-forwards 65
Sets the maximum number of hops--that is, proxy or redirect servers that can forward the SIP request. The argument is as follows:
Number of forwards. Range: 1 to 70. Default: 70.
Router(config-sip-ua)# exit
Exits the current mode.
Verifying SIP RFC Compliance
To verify SIP RFC compliance, perform the following steps as appropriate (commands are listed in alphabetical order).
A typical verification sequence involves use of one of the show sip-ua connectionscommands to view call statistics, followed by judicious use of the clear sip-ua tcp connection or clear sip-ua udp connection command to clear those statistics.
SUMMARY STEPS1.
connections
{tcp [tls] | udp} {brief | detail}
statistics
DETAILED STEPSStep 1
connections
{tcp [tls] | udp} {brief | detail}
Use this command, after a call is made, to learn connection details.
The following sample output shows multiple calls to multiple destinations. This example shows UDP details, but the command output looks identical for TCP calls.
Router# show sip-ua connections udp detail
Total active connections : 2
No. of send failures : 0
No. of remote closures : 0
No. of conn. failures : 0
No. of inactive conn. ageouts : 0
---------Printing Detailed Connection Report---------
** Tuples with no matching socket entry
- Do 'clear sip &tcp/udp& conn t ipv4:&addr&:&port&'
to overcome this error condition
++ Tuples with mismatched address/port entry
- Do 'clear sip &tcp/udp& conn t ipv4:&addr&:&port& id &connid&'
to overcome this error condition
Remote-Agent:172.18.194.183, Connections-Count:1
Remote-Port Conn-Id Conn-State WriteQ-Size
=========== ======= =========== ===========
5060 1 Established 0
Remote-Agent:172.19.154.18, Connections-Count:1
Remote-Port Conn-Id Conn-State WriteQ-Size
=========== ======= =========== ===========
5060 2 Established 0
The following sample output shows sequential display and clearing of call statistics for connection to a particular target (in this case, 172.18.194.183, port 5060).
Take care when you use the clear commands. Inappropriate usage without understanding the issue or the implications can lead to erroneous call behavior, inappropriate usage of connections, and call failures.
Output for the show sip-ua connectionscommand displays call statistics:
Router# show sip-ua connections tcp detail
Total active connections : 1
No. of send failures : 0
No. of remote closures : 0
No. of conn. failures : 0
No. of inactive conn. ageouts : 0
Max. tcp send msg queue size of 1, recorded for 172.18.194.183:5060
---------Printing Detailed Connection Report---------
** Tuples with no matching socket entry
- Do 'clear sip &tcp/udp& conn t ipv4:&addr&:&port&'
to overcome this error condition
++ Tuples with mismatched address/port entry
- Do 'clear sip &tcp/udp& conn t ipv4:&addr&:&port& id &connid&'
to overcome this error condition
Remote-Agent:172.18.194.183, Connections-Count:1
Remote-Port Conn-Id Conn-State WriteQ-Size
=========== ======= =========== ===========
5060 1 Established 0
Output for the clear sip-ua tcp connection command shows that statistics are being cleared:
Router# clear sip-ua tcp connection id 1 target ipv4:172.18.194.183:5060
Purging the entry from sip tcp process
Purging the entry from reusable global connection table
Output for the show sip-ua connections command verifies that all connections are cleared as expected:
Router# show sip-ua connections tcp detail
Total active connections : 0
No. of send failures : 0
No. of remote closures : 0
No. of conn. failures : 0
No. of inactive conn. ageouts : 0
Max. tcp send msg queue size of 1, recorded for 172.18.194.183:5060
---------Printing Detailed Connection Report---------
** Tuples with no matching socket entry
- Do 'clear sip &tcp/udp& conn t ipv4:&addr&:&port&'
to overcome this error condition
++ Tuples with mismatched address/port entry
- Do 'clear sip &tcp/udp& conn t ipv4:&addr&:&port& id &connid&'
to overcome this error condition
Remote-Agent:172.18.194.183, Connections-Count:0
statistics
Use this command to display SIP statistics, including UPDATE requests.
Router# show sip-ua statistics
SIP Response Statistics (Inbound/Outbound)
Informational
Trying 1/4, Ringing 0/0,
Forwarded 0/0, Queued 0/0,
SessionProgress 1/4
OkInvite 1/2, OkBye 1/2,
OkCancel 0/2, OkOptions 0/0,
OkPrack 1/4, OkPreconditionMet 0/0,
OkSubscribe 0/0, OkNotify 0/0,
OkInfo 0/0, 202Accepted 0/0,
OkUpdate 0/0
Redirection (Inbound only):
MultipleChoice 0, MovedPermanently 0,
MovedTemporarily 0, UseProxy 0,
AlternateService 0
Client Error:
BadRequest 0/0, Unauthorized 0/0,
PaymentRequired 0/0, Forbidden 0/0,
NotFound 0/0, MethodNotAllowed 0/0,
NotAcceptable 0/0, ProxyAuthReqd 0/0,
ReqTimeout 0/0, Conflict 0/0, Gone 0/0,
ReqEntityTooLarge 0/0, ReqURITooLarge 0/0,
UnsupportedMediaType 0/0, BadExtension 0/0,
TempNotAvailable 0/0, CallLegNonExistent 0/0,
LoopDetected 0/0, TooManyHops 0/0,
AddrIncomplete 0/0, Ambiguous 0/0,
BusyHere 0/0, RequestCancel 0/2,
NotAcceptableMedia 0/0, BadEvent 0/0,
SETooSmall 0/0, RequestPending 0/0
Server Error:
InternalError 0/0, NotImplemented 0/0,
BadGateway 0/0, ServiceUnavail 2/0,
GatewayTimeout 0/0, BadSipVer 0/0,
PreCondFailure 0/0
Global Failure:
BusyEverywhere 0/0, Decline 0/0,
NotExistAnywhere 0/0, NotAcceptable 0/0
Miscellaneous counters:
RedirectRspMappedToClientErr 0
SIP Total Traffic Statistics (Inbound/Outbound)
Invite 4/4, Ack 4/3, Bye 2/1,
Cancel 2/0, Options 0/0,
Prack 4/1, Comet 0/0,
Subscribe 0/0, Notify 0/0,
Refer 0/0, Info 0/0,
Update 0/0
Retry Statistics
Invite 1, Bye 0, Cancel 0, Response 0,
Prack 0, Comet 0, Reliable1xx 0, Notify 0
SDP application statistics:
Parses: 6, Builds 10
Invalid token order: 0, Invalid param: 0
Not SDP desc: 0, No resource: 0
Last time SIP Statistics were cleared: &never&
Troubleshooting Tips
Note For general troubleshooting tips and a list of important
debug commands, see the “General Troubleshooting Tips” section in the “Basic SIP Configuration” module in this guide.
all command to enable SIP-related debugging.
transportcommand to debug transport and connection related operations while sending out an Invite Message.
Sample output of some of these commands is shown below:
Sample Output for the debug ccsip transport Command
The operations captured here show the following:
That the connection is established and the Invite was sent.
That UDP is the transport of the initial Invite message.
R that is where the request is to be sent.
That the size of the message exceeded the threshold size of the MTU. Therefore transport switching (from UDP to TCP) is enabled.
That the connection
that is, the counter starts to age out the TCP or UDP connection if inactivity occurs.
Router# debug ccsip transport
1w1d: //18/8EA/SIP/Transport/sipSPISendInvite: Sending Invite to the transport layer
1w1d: //18/8EA/SIP/Transport/sipSPIGetSwitchTransportFlag: Return the Global configuration, Switch Transport is TRUE
1w1d: //18/8EA/SIP/Transport/sipSPITransportSendMessage: msg=0x64082D50, addr=172.18.194.183, port=5060, sentBy_port=0, is_req=1, transport=1, switch=1, callBack=0x614FAB58
1w1d: //18/8EA/SIP/Transport/sipSPITransportSendMessage: Proceedable for sending msg immediately
1w1d: //18/8EA/SIP/Transport/sipTransportLogicSendMsg: switch transport is 1
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportGetInterfaceMtuSize: MTU size for remote address 172.18.194.183 is 500
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportVerifyMsgForMTUThreshold: Interface MTU Size 500, Msg Size 1096
1w1d: //18/8EA/SIP/Transport/sipTransportLogicSendMsg: Switching msg=0x64082D50 transport UDP-&TCP
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportSetAgeingTimer: Aging timer initiated for holder=0x,addr=172.18.194.183
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipCreateConnHolder: Created new holder=0x, addr=172.18.194.183
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportPostRequestConnection: Posting TCP conn create request for addr=172.18.194.183, port=5060, context=0x64128D5C
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportSetConnWaitTimer: Wait timer set for connection=0x64129BF4,addr=172.18.194.183, port=5060
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipCreateConnInstance: Created new initiated conn=0x64129BF4, connid=-1, addr=172.18.194.183, port=5060, transport=tcp
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipConnectionManagerProcessConnCreated: gConnTab=0x64128D5C, addr=172.18.194.183, port=5060, connid=1, transport=tcp
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipInstanceHandleConnectionCreated: Moving connection=0x64129BF4, connid=1state to pending
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportProcessNWConnectionCreated: context=0x64128D5C
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipConnectionManagerProcessConnCreated: gConnTab=0x64128D5C, addr=172.18.194.183, port=5060, connid=1, transport=tcp
1w1d: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportPostSendMessage: Posting send for msg=0x64082D50, addr=172.18.194.183, port=5060, connId=1 for TCP
Configuration Examples for SIP RFC Compliance
Note IP addresses and hostnames in examples are fictitious.
SIP Gateway Compliance to RFC 3261
and RFC 3264
This section provides a configuration example to match the identified configuration tasks in the previous sections.
1w1d: %SYS-5-CONFIG_I: Configured from console by console
Building configuration...
Current configuration : 3326 bytes
!Last configuration change at 18:09:20 EDT Fri Apr 23 2004
version 12.3
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
boot-start-marker
boot system tftp mantis/c3640-is-mz.disc_w_pi 172.18.207.10
boot-end-marker
clock timezone EST -5
clock summer-time EDT recurring
voice-card 3
aaa new-model
aaa accounting connection h323 start-stop group radius
aaa nas port extended
aaa session-id common
ip subnet-zero
ip host example.com 172.18.194.183
ip host CALLGEN-SECURITY-V2 10.36.54.81 10.1.0.0
ip name-server 172.18.192.48
isdn switch-type primary-ni
trunk group 1
voice service voip
rel1xx require "100rel"
transport switch udp tcp
voice class uri 800 sip
controller T1 3/0
framing sf
linecode ami
pri-group timeslots 1-24
controller T1 3/1
framing sf
linecode ami
pri-group timeslots 1-24
gw-accounting aaa
interface Ethernet0/0
description CentreComm Hub port 9 in PP070
ip address 172.18.194.170 255.255.255.0
no ip proxy-arp
ip mtu 500
half-duplex
no cdp enable
ip rsvp bandwidth 100 100
interface Serial3/0:23
no ip address
no logging event link-status
isdn switch-type primary-ni
isdn incoming-voice voice
no cdp enable
interface Serial3/1:23
no ip address
no logging event link-status
isdn switch-type primary-ni
isdn protocol-emulate network
isdn incoming-voice voice
no cdp enable
no ip http server
ip classless
ip route 0.0.0.0 0.0.0.0 172.18.194.1
ip route 0.0.0.0 0.0.0.0 Ethernet0/0
ip route 10.0.0.0 255.0.0.0 172.18.194.1
ip route 172.16.0.0 255.0.0.0 Ethernet0/0
dialer-list 1 protocol ip permit
no cdp run
radius-server host 10.13.84.133 auth-port 1645 acct-port 1646
radius-server timeout 2
radius-server key cisco
radius-server vsa send accounting
radius-server vsa send authentication
control-plane
call application voice testapp79 tftp://172.18.207.10/mantis/my_app.tcl
call application voice testapp888 tftp://172.18.207.10/mantis/AL_FEAT_SIP_URL_O_RV_79.tcl
call application voice testapp888 mcid-dtmf 9876
call application voice testapp888 test 5444
voice-port 1/1/0
voice-port 1/1/1
voice-port 3/0:23
voice-port 3/1:23
dial-peer cor custom
dial-peer voice 9876 voip
destination-pattern 9876
voice-class sip transport switch udp tcp
session protocol sipv2
session target ipv4:172.18.194.183
session transport udp
dial-peer voice 222 pots
incoming called-number .
direct-inward-dial
max-forwards 65
retry invite 4
retry bye 4
retry cancel 4
retry comet 4
retry notify 4
timers connection aging 15
offer call-hold conn-addr
line con 0
exec-timeout 0 0
line vty 0 4
password password1
ntp clock-period
ntp server 172.18.194.178
ntp server 10.81.254.131
Additional References
The following sections provide references related to the Achieving SIP RFC Compliance.
Related Documents
Related Topic
Document Title
Technical Assistance
Description
Was this Document Helpful?
Let Us Help
(Requires a )
Related Support Community Discussions}

我要回帖

更多关于 y等于根号x的图像 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信