MGCP

advertisement
Media Gateway Control Protocol
(MGCP)
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 1
Agenda
MGCP Software Architecture
MGCP General Concepts and Overview
MGCP Messages
MGCP Command line parameters
MGCP Basic Call Flows
MGCP Configuration
CCM Backhaul/Redundancy
CallManager Express
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 2
Software Architecture
Call Agent
SGCP application
CCAPI
VTSP
RTP SPI
IP
© Cisco Systems, Inc. All rights reserved.
XCC TSP
(SS7 ISUP)
HTSP
TDM driver
DSPRM
DSP
VoIP Bootcamp Day 5 - 3
General Concepts
• Defined in RFC 2705
• Master/Slave Protocol
• The call control "intelligence" is outside the
gateways and handled by external call control
elements called Call Agents. Call Agent
(CallManager) communicates with endpoints
(Ports on Gateways)
• MGCP is a text based protocol with plain-text
commands sent over UDP port 2427 called
Signaling Plane.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 4
General Concepts – Call Agents
• The Call Control elements that play the
Master role in MGCP are known as Call
Agents.
• CA provides “centralized” call intelligence.
• A Call Manager controlling an MGCP gateway
is an example of a Call Agent.
• MGCP does not define a mechanism for
synchronizing Call Agents. They need to have
their own means of synchronizing. This
function is achieved in Cisco’s Call Manager
Clusters by the SDL layer.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 5
General Concepts - Endpoint Identifiers
Endpoint identifiers have two components:
• Domain name of the gateway that is managing
the endpoint (case sensitive)
• Local name within that gateway (case
insensitive)
e.g. AALN/S1/SU0/[email protected]
AALN= Analog Access Line eNdpoints
S1/SU0/0 = Slot 1/SubUnit 0/Port 0
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 6
Messages - MGCP Primitives
End Point Configuration
Create Connection
Modify Connection
Delete Connection
Notification Request
Notify
Audit Endpoint
Audit Connection
Restart In Progress
© Cisco Systems, Inc. All rights reserved.
EPCF
CRCX
MDCX
DLCX
RQNT
NTFY
AUEP
AUCX
RSIP
(CA  EP)
(CA  EP)
(CA  EP)
(CA  EP)
(CA  EP)
(CA  EP)
(CA  EP)
(CA  EP)
(CA  EP)
VoIP Bootcamp Day 5 - 7
Messages - Command Format
<verb> <transID> <endpt> <protocol> <version>
<0 or more parameter lines>
<optional SDP (RFC 2327)>
MDCX 229 S1/DS1-1/[email protected] MGCP 0.1
C: D0000000020000090000000080000003
I: E
Endpoint Identifier
X: 1
L: p:20, a:PCMU, s:off
M: recvonly Transaction ID
R: D/[0-9ABCD*#]
Q: process,loop
MGCP Command
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 8
MGCP Transaction ID
MDCX 229 S1/DS1-1/[email protected] MGCP 0.1
C: D0000000020000090000000080000003
I: E
X: 1
L: p:20, a:PCMU, s:off
M: recvonly
R: D/[0-9ABCD*#]
Q: process,loop
• Serves as a Sequence Number.
• MGCP is UDP-based, so Transaction Ids are used to
detect lost messages for retransmission.
• Every MGCP Message must be acknowledged and the
acknowledgement must have the same transaction ID
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 9
Components of an MGCP Message
MDCX 229 S1/DS1-1/[email protected] MGCP 0.1
C: D0000000020000090000000080000003
I: E
X: 1
L: p:20, a:PCMU, s:off
M: recvonly
R: D/[0-9ABCD*#]
Q: process,loop
Parameter Lines
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 10
MGCP Parameter Lines
• Similar to ‘Information Elements’ in ISDN
• Described as one or two ASCII characters
followed by a colon, then the parameter
data.
• Parameter data format varies depending
on the parameter.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 11
MGCP Parameter Lines
Code
A
B
C
D
E
ES
F
I
I2
K
L
LC
M
Parameter Name
Capabilities
BearerInformation
CallId
DigitMap
ReasonCode
EventStates
RequestedInfo
ConnectionId
SecondConnectionId
ResponseAck
LocalConnectionOptions
LocalConnection Descriptor
Connection Mode
© Cisco Systems, Inc. All rights reserved.
Code
N
O
P
Q
R
RC
RD
RM
S
T
X
Z
Z2
Parameter Name
NotifiedEntity
ObservedEvents
ConnectionParameters
QuarantineHandling
RequestedEvents
RemoteConnection Descriptor
RestartDelay
RestartMethod
SignalRequests
DetectEvents
RequestIdentifier
SpecificEndpointID
Second Endpoint ID
VoIP Bootcamp Day 5 - 12
CallId Parameter Line
MDCX 229 S1/DS1-1/[email protected] MGCP 0.1
C: D0000000020000090000000080000003
I: E
X: 1
L: p:20, a:PCMU, s:off
M: recvonly
R: D/[0-9ABCD*#]
Q: process,loop
• A globally unique hexadecimal string of up
to 32 characters that identifies the call that
is active on an endpoint
• Useful for correlating a CCM trace with a
debug on a gateway.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 13
ConnectionId Parameter Line
MDCX 229 S1/DS1-1/[email protected] MGCP 0.1
C: D0000000020000090000000080000003
I: E
X: 1
L: p:20, a:PCMU, s:off
M: recvonly
R: D/[0-9ABCD*#]
Q: process,loop
• A hex string that uniquely identifies the
call on a single endpoint.
• Typically increments for each call on an
endpoint.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 14
RequestIdentifier Parameter Line
MDCX 229 S1/DS1-1/[email protected] MGCP 0.1
C: D0000000020000090000000080000003
I: E
X: 1
L: p:20, a:PCMU, s:off
M: recvonly
R: D/[0-9ABCD*#]
Q: process,loop
• A hex string of up to 32 characters used to
correlate this requests with the notifications it
triggers
• Responding NTFY message with RequestID “1” is
correlated to above request
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 15
LocalConnectionOptions Parameter Line
MDCX 229 S1/DS1-1/[email protected] MGCP 0.1
C: D0000000020000090000000080000003
I: E
X: 1
L: p:20, a:PCMU, s:off
M: recvonly
R: D/[0-9ABCD*#]
Q: process,loop
• Specifies the operational parameters that CallManager
suggests to the gateway.
p: Packetization Period (20 ms)
a: Preferred Compression Algorithm (Codec). PCMU = G.711µ-law
s: Silence Suppression (VAD)
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 16
ConnectionMode Parameter Line
MDCX 229 S1/DS1-1/[email protected] MGCP 0.1
C: D0000000020000090000000080000003
I: E
X: 1
L: p:20, a:PCMU, s:off
M: recvonly
R: D/[0-9ABCD*#]
Q: process,loop
• Tells the gateway what to do with the media stream(s).
• In this case, the gateway is told to only receive packets
and not send packets.
• Valid values are: sendonly, recvonly, sendrecv,
confrnce, inactive, loopback, cottest, netwloop, netwtest,
data.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 17
RequestedEvents Parameter Line
MDCX 229 S1/DS1-1/[email protected] MGCP 0.1
C: D0000000020000090000000080000003
I: E
X: 1
L: p:20, a:PCMU, s:off
M: recvonly
R: D/[0-9ABCD*#]
Q: process,loop
• Denotes a list of events that the gateway should notify
CallManager of, such as off-hook or on-hook transitions. Event
names are composed of an optional package name, separated
from the name of the event by a slash (/). The event name can
optionally be followed by an at sign (@) and the identifier of a
connection on which the event should be observed.
• Each event can be qualified by a requested action or list of
actions. The actions, when specified, are encoded as a list of
keywords, enclosed in parentheses and separated by commas.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 18
RequestedEvents Parameter Line
• The codes for the various actions are as follows:
N – Notify immediately
I – Ignore
A – Accumulate
K – Keep signal(s) active
D – Treat according to digit map
E – Embedded notification request
S – Swap
• When no action is specified, the default action is to
notify the event. This means that, for example, ft and
ft(N) are equivalent. Events that are not listed are
ignored.
• The requested list is encoded on a single line, with
event/action groups separated by commas. For
example: R: hu(N), hf(S,N)
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 19
Messages – SDP Keys
Messages – SDP Keys (RFC 2327)
Session description
v
o
s
i
u
e
p
c
b
z
k
a
=
=
=
=*
=*
=*
=*
=*
=*
=*
=*
=*
(protocol version)
(owner/creator and session identifier).
(session name)
(session information)
(URI of description)
(email address)
(phone number)
(connection information - not required if included in all media)
(bandwidth information)
(time zone adjustments)
(encryption key)
(zero or more session attribute lines)
* Optional items
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 21
Messages – SDP Keys (RFC 2327)
Time description
t
= (time the session is active)
r
=* (zero or more repeat times)
Media description
m = (media name and transport address)
I
=* (media title)
c
=* (connection information - optional if included at session-level)
b =* (bandwidth information)
k
=* (encryption key)
a
=* (zero or more media attribute lines)
* Optional items
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 22
MGCP Packages
• An MGCP Package is a grouping of the events
and signals supported by a particular type of
MGCP endpoint.
• Each package name is assigned one or more
letters (i.e. D, M, L, MS).
• Names of packages should not be confused with
names of parameter lines (i.e. M is the name of
the ConnectionMode parameter line and is also
the name of the MF package.
• Most packages are defined in RFC 2705, however
the T1 CAS packages are defined in RFC 3064.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 23
MGCP Packages
Package Symbol
Package Name
G
Generic media package
D
DTMF package
M
MF package
T
Trunk package
L
Line package
H
Handset emulation package
R
RTP package
DT
DTMF trunk package
MS
MF trunk package
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 24
MGCP Packages
For a complete list of all the events in each
package refer to RFC 2705 and RFC 3064 or
Chapter 6 of “Troubleshooting Cisco IP
Telephony”
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 28
MGCP Response Headers
• All MGCP messages must be acknowledged.
• If a message is not acknowledged in a timely
fashion, it is retransmitted up to three times.
• Acknowledgements are called response headers.
• A response header is composed of a response
line, optionally followed by headers that contain
additional parameters.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 29
Example MGCP Response Header
200 1203 OK
Comment
Transaction ID
Response Code
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 30
MGCP Response Codes
• The response line starts with a three-digit response code.
The code is followed by the transaction identifier and an
optional comment.
• The response codes are divided into four ranges:
–100 to 199 indicates a provisional response
–200 to 299 indicates a successful completion
–400 to 499 indicates a transient error
–500 to 599 indicates a permanent error
• Transient errors typically indicate a problem with a single
call or a short-lived problem. A permanent error indicates a
problem that likely requires operator intervention to resolve,
such as a circuit going out of service or a hardware failure.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 31
MGCP Response Codes
Response Code
100
Definition
The transaction is currently being executed. An actual
completion message follows later.
200
250
400
The requested transaction was executed normally.
The connection was deleted.
The transaction could not be executed due to a
transient error.
401
The phone is already off-hook.
402
The phone is already on-hook.
403
The transaction could not be executed because the
endpoint does not have sufficient resources at this
time.
404
Insufficient bandwidth at this time.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 32
MGCP Response Codes
Response Code
Definition
500
The transaction could not be executed because the
endpoint is unknown.
501
The transaction could not be executed because the
endpoint is not ready.
502
The transaction could not be executed because the
endpoint does not have sufficient resources.
The transaction could not be executed because a
protocol error was detected.
510
511
The transaction could not be executed because the
command contained an unrecognized extension.
512
The transaction could not be executed because the
gateway is not equipped to detect one of the
requested events.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 33
MGCP Response Codes
Response Code
Definition
513
The transaction could not be executed because the
gateway is not equipped to generate one of the
requested signals.
514
The transaction could not be executed because the
gateway cannot send the specified announcement.
515
The transaction refers to an incorrect connection-id
(it might already have been deleted).
516
The transaction refers to an unknown call-id.
517
Unsupported or invalid mode.
518
Unsupported or unknown package.
519
The endpoint does not have a digit map.
520
The transaction could not be executed because the
endpoint is "restarting."
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 34
MGCP Response Codes
Response Code
521
522
Definition
The endpoint was redirected to another call agent.
No such event or signal.
523
Unknown action or illegal combination of actions.
524
Internal inconsistency in LocalConnectionOptions.
525
Unknown extension in LocalConnectionOptions.
526
Insufficient bandwidth.
527
Missing RemoteConnectionDescriptor.
528
529
530
Incompatible protocol version.
Internal hardware failure.
CAS protocol error.
531
Failure of a grouping of trunks (for example, facility
failure).
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 35
Registration and Endpoint Initialization
MGCP Gateway
Call Manager
* TCP Socket Open
Open completes
RSIP/Restart
ACK with EP info
Simple ACK “200 <n> OK”
© Cisco Systems, Inc. All rights reserved.
Simple ACK “200 <n> OK”
Audit Endpt (AUEP)
(one per endpoint)
Request Notify (RQNT)
“RQNT R: L/hd”
(one per endpoint)
VoIP Bootcamp Day 5 - 36
Sample FXS Call Flow: Dialing & Connect
MGCP Gateway
Call Manager
(1) {Offhook:}
“NTFY O: L/hd”
(3) {Digit:}
(2) “RQNT R:L/hu,D/[0-9*#] S:dl”
{dial-tone, send digit map}
“NTFY O: 4”
(4) :RQNT R:L/hu, D/[0-9*#] S:”
(5) {Digit(s)...} “NTFY O: 5”
Ack with local RTP addr/port
© Cisco Systems, Inc. All rights reserved.
{Turn off dial-tone}
.
.
(6) CRCX {create connection}
Turns on ring tone.
VoIP Bootcamp Day 5 - 37
IOS Configuration Statements
• MGCP
Starts the MGCP process
• mgcp call-agent <primary CM ip address>
Primary CM IP address or DNS name
• mgcp dtmf-relay codec all mode out-of-band
Enable DTMF relay
• ccm-manager MGCP
Initializes the Viola process (TCP Socket & MGCP Link monitor)
• ccm-manager redundant-host <1st backup> <2nd backup>
Specifies the IP address or DNS name of first and second call manager backup
systems.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 38
IOS Configuration Statements (Cont’d)
ccm-manager switchback <mode>
• Controls how the gateway attempts to return management to the next
higher priority call manager in list. (CM systems must have an open
TCP socket to be considered viable)
Configuration Options:
•
Never -- MGCP GW ignores return of a higher priority CM and does not switchback
•
Graceful (default) --Switches back after last active call ends.
•
Immediate --Switches back as soon as TCP link to primary is established.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 39
IOS Configuration Statements (Cont’d)
More Switchback Options:
• ccm-manager switchback schedule-time <hh:mm>
Allows specific time-of-day switchback. (If specified
time earlier than current time, waits until next day.)
• ccm-manager switchback uptime-delay <1-1440>
Allows user to set a switchback delay timer in minutes
Switchover can be forced from enable mode:
2600-1a# ccm-manager switchover-to-backup
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 40
IOS MGCP Configuration - Sample
Required MGCP statements:
mgcp
<== Starts the MGCP process
mgcp call-agent <ip address #1>
<== Primary Call Manager DNS name or IP address
mgcp dtmf-relay codec all mode out-of-band
<== Enable DTMF relay
Required CCM-Manager statements:
ccm-manager mgcp
For Redundant configurations:
(First backup CM)
ccm-manager redundant-host <ip address #2>
(Second backup CM)
<ip addr #3>
Required Dial-Peers:
dial-peer voice xxx pots
application MGCPAPP or service MGCPAPP (New)
port x/x/x
© Cisco Systems, Inc. All rights reserved.
<== Required!
VoIP Bootcamp Day 5 - 41
IOS MGCP Configuration – PRI Backhaul Sample
Additional Configuration on controller and serial line characteristics:
controller T1 1/0
pri-group timeslots 1-24 service mgcp
!
interface serial 1/0:23
isdn switch-type primary-ni
isdn bind-l3 ccm-manager
© Cisco Systems, Inc. All rights reserved.
<=== Specify MGCP controlled channels
<=== Activate Q931 backhaul mode
VoIP Bootcamp Day 5 - 42
Do not use these commands
• For MGCP managed endpoints (those with
“application MGCPAPP” in the dial-peer statement),
all dial-plan related configuration elements are
controlled by Call ManagerDon’t configure:
• destination-pattern
• session target
• number expansion
• connection PLAR/tie-line/trunk (voice-port)
• Codec
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 43
CallManager MGCP Configuration - 1
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 44
CallManager MGCP Configuration - 2
In the upper right, select “Add a New Gateway”
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 45
CallManager MGCP Configuration - 3
Select the gateway from the pull down
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 46
CallManager MGCP Configuration - 4
1. Enter MGCP Domain Name (Need to match hostname and ip domain-name)
2. Description if necessary.
3. Select Module Type and Click “Insert”
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 47
CallManager MGCP Configuration - 5
1. Select the VIC cards used in the network module.
2. Select Module Type and Click “Update”.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 48
CallManager MGCP Configuration - 6
Select the endpoints to configure them
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 49
CallManager MGCP Configuration - 7
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 50
CallManager MGCP Configuration - 9
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 51
IOS MGCP Config Server
Automatically download your MGCP gateway
configuration from CallManager/TFTP server:
Router(config)# ccm-manager config server 10.0.0.1
Router(config)# ccm-manager config
* But you still need to setup MGCP in the CallManager first.
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 52
IOS MGCP Config Server – auto. download
Loading Router.cnf.xml from 10.0.0.1 (via Ethernet0/0): !
[OK - 4110 bytes]
This package type is not the default package type.
Both ports are out of service
No voice peer with tag = 999300
*Jul 11 03:24:57: %LINK-3-UPDOWN: Interface Foreign Exchange Station 3/0/0, chan
ged state to Administrative Shutdown
*Jul 11 03:24:57: %LINK-3-UPDOWN: Interface Foreign Exchange Station 3/0/1, chan
ged state to Administrative ShutdownBoth ports are set to the new value
Both ports are set to the new value
Both ports are in service
Both ports are in service
*Jul 11 03:24:59: %LINK-3-UPDOWN: Interface Foreign Exchange Station 3/0/1, chan
ged state to up
*Jul 11 03:24:59: %LINK-3-UPDOWN: Interface Foreign Exchange Station 3/0/0, chan
ged state to upBoth ports are in service
Configuration done!!!
Building configuration...
[OK]
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 53
IOS MGCP Config Server – Result
!
ccm-manager mgcp
ccm-manager music-on-hold
ccm-manager config server 10.0.0.1
ccm-manager config
!
mgcp
mgcp call-agent 10.0.0.2 2427 service-type mgcp version 0.1
mgcp rtp unreachable timeout 1000 action notify
mgcp package-capability rtp-package
mgcp package-capability sst-package
no mgcp package-capability fxr-package
no mgcp timer receive-rtcp
mgcp sdp simple
mgcp fax t38 inhibit
mgcp rtp payload-type g726r16 static
!
mgcp profile default
!
!
dial-peer voice 999300 pots
application mgcpapp
port 3/0/0
!
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 54
Backhaul Link/Redundant Link
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 55
CallManager Backhaul
• MGCP protocol does not define
mechanism for synchronization with
multiple CallAgents
• CCM Backhaul is Cisco’s proprietary
approach
• Provide CallAgent Redundancy and
Session Management (i.e.. Calls
reservation)
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 56
CCM Backhaul Links
• UDP connection for MGCP messaging
• TCP Redundancy links
• PRI Backhaul utilizes the Redundancy link to the Active
CM to transport ISDN Layer 3 signaling messages
CM1
(active)
CM2
(backup)
CM3
Backhaul channel
IP
MGCP channel
TCP link for connectivity
to a Backup CM
MGCP
Gateway
© Cisco Systems, Inc. All rights reserved.
MGCP over UDP
Redundant/Backhaul
link over TCP
VoIP Bootcamp Day 5 - 57
Backhaul Links Initialization sequence
BH (ISDN)
MGCP
GATEWAY
MGCP
RSIP (RST)
BH (ISDN)
CCM
RSIP ACK
AUEP (for each B-channel)
UDP
2427
AUEP ACK
AUCX (to obtain CRV of any existing connection)
AUCX ACK
TCP Open
ESTABLISH_REQ
ESTABLISH_REQ [re-transmit until Backhaul is ready on GW]
TCP
2428
ESTABLISH_CFM
STATUS_ENQ(crv) [if there are existing calls]
Call STATUS
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 58
MGCP Keep-alive
• The Empty NTFY keep-alive mechanism is sent
over the UDP channel, and a failure by the CM to
respond to the NTFYs (after 30 seconds) will
result in a switchover
*Feb 8 14:42:05.738: MGCP Packet sent to 10.0.0.1:2427--->
NTFY 569372529 *@Router-1a MGCP 0.1
X: 0
O:
<--*Feb 8 14:42:05.742: MGCP Packet received from 10.0.0.1:2427--->
200 569372529
<--© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 59
TCP Redundant Links
• Gateway open TCP redundant links to
ACTIVE CM and all STANDBY CMs.
• The gateway can detect if this TCP link has
gone down and initiate switchover to the
Backup CM without waiting for the
application-level keep-alive to timeout
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 60
Backhaul/Redundant Link Initialization
Router-1a#debug ccm-manager backhaul ?
events Call Manager backhaul events
packets Call Manager backhaul packets
Router-1a#debug ccm-manager backhaul packets
Call Manager backhaul packets debugging is on
Router-1a#debug ccm-manager backhaul events
Call Manager backhaul events debugging is on
Router-1a#
*Feb 8 14:48:47.926: cmbh_init_link_record: Allocated link record with address 64631C08 for 10.0.0.1.
*Feb 8 14:48:47.926: cmbh_open_tcp_link: Opening TCP link with Rem IP 10.0.0.1, Local IP 10.1.0.1, port 2428
*Feb 8 14:48:47.930: cmbh_tcp_open_ind: TCP open succeeded for 10.0.0.1, calling callback.
*Feb 8 14:48:48.106:
cmbh_rcv_callback: <-- Receiving backhaul msg for Se1/0:23 :
| bk_msg_type = ESTABLISH_REQ
| bk_chan_id (slot:port) = 1:0
| Q.931 length = 0
*Feb 8 14:48:48.114:
cmbrl_send_pak: --> Sending backhauled msg for Se1/0:23 :
| bk_msg_type = ESTABLISH_CFM
| bk_chan_id (slot:port) = 1:0
| Q.931 length = 0
Router-1a#
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 61
CCM Failover
• Switchover on either Backhaul Link
failure or MGCP Keep-alive timeout
• On switchover CallManager:
– Will disconnect all calls in
TRANSIENT_STATE
– Calls that are in MGCP_ACTIVE state, and
RTP send-recv state are considered
connected
– Active, CONNECTED calls are preserved
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 62
CCM Failover with PRI Backhaul
• CCM encode Q.931 Call Reference Value (CRV) in the MGCP
CALL ID parameter
• The MGCP Call ID (“C” parameter) is allocated by the CCM
when it issues an initial CRCX command
• Upon switchover, the CCM will retrieve the Call IDs of any
active B-channel connections using the AUEP and AUCX
commands
• It will then be able to get the current signaling status of these
calls via the Q.931 STATUS_ENQ message, using the CRV
extracted from the MGCP Call ID
NOTE: Normal MGCP practice is for all call legs in a call to share
the same Call ID; CCM breaks from convention and allocates a
new Call ID for each call leg in the call
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 63
Troubleshooting MGCP
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 64
Debugging and Show commands
Useful debug command
• debug mgcp
all|errors|events|packets|parser
detailed output of “debug mgcp packet” with explanations can be
found here:
http://www-tac.cisco.com/solutions/cactus/mgcp_call_sequence_decodes.html
• debug ccm-manager
Useful show commands
• Show ccm-manager – shows if the gateway is registered and
also shows backup CallManager servers
• Show mgcp endpoint – shows voice ports for use with MGCP
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 65
show ccm-manager
Total number of host: 3
Priority
Status
Host
============================================================
Primary
Registered
172.20.71.30
First backup
Backup ready
172.20.71.26
Second backup
Idle
172.20.71.47
Current active Call Manager:
Current backup Call Manager:
Redundant link port:
Failover Interval:
Keepalive Interval:
Last keepalive check:
Last MGCP traffic time:
Last switchover time:
Switchback mode:
© Cisco Systems, Inc. All rights reserved.
172.20.71.30
172.20.71.26
2428
30 seconds
15 seconds
00:00:00
00:00:32
None
Immediate
VoIP Bootcamp Day 5 - 66
show mgcp
MGCP Admin State ACTIVE, Oper State ACTIVE - Cause Code NONE
MGCP call-agent: 172.20.71.30 Initial protocol service is MGCP
MGCP block-newcalls DISABLED
MGCP dtmf-relay codec all mode out-of-band
MGCP modem passthru disabled
MGCP request timeout 500, MGCP request retries 3
MGCP gateway port: 2427, MGCP maximum waiting delay 3000
MGCP restart delay 0, MGCP vad DISABLED
MGCP simple-sdp ENABLED, MGCP cisco fgdos DISABLED
MGCP codec type g711ulaw, MGCP packetization period 20
MGCP JB threshold lwm 30, MGCP JB threshold hwm 150
MGCP LAT threshold lmw 150, MGCP LAT threshold hwm 300
MGCP PL threshold lwm 1000, MGCP PL threshold hwm 10000
MGCP playout mode is adaptive 60, 4, 200 in msec
MGCP IP precedence 3, MGCP default package: line-package
MGCP supported packages: gm-package dtmf-package trunk-package
line-package hs-package rtp-package
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 67
Show mgcp connection
Endpoint
Call_ID(C) Conn_ID(I) (P)ort (M)ode (S)tate
(C)odec (E)vent[SIFL] (R)esult[EA]
1. S0/DS1-1/5
C=F123AB,5,6 I=0x3 P=16506,16602 M=3 S=4
C=1 E=2,0,0,2 R=0,0
2. S0/DS1-1/6
C=F123AB,7,8 I=0x4 P=16602,16506 M=3 S=4
C=1 E=0,0,0,0 R=0,0
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 68
Show mgcp statistics
UDP pkts rx 18, tx 30
Unrecognized rx pkts 0, MGCP message parsing errors 0
Duplicate MGCP ack tx 0, Invalid versions count 0
CreateConn rx 9, successful 9, failed 0
DeleteConn rx 4, successful 4, failed 0
ModifyConn rx 4, successful 4, failed 0
DeleteConn tx 1, successful 1, failed 0
NotifyRequest rx 0, successful 0, failed 0
AuditConnection rx 0, successful 0, failed 0
AuditEndpoint rx 1, successful 1, failed 0
RestartInProgress tx 1, successful 1, failed 0
Notify tx 1, successful 1, failed 0
ACK tx 17, NACK tx 0
ACK rx 0, NACK rx 0
IP address based Call Agents statistics
IP address 1.13.89.3, Total msg rx 18,
successful 18, failed 0
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 69
show mgcp endpoint
aaln/S0/SU0/[email protected]
Or
T1/0
T1/1
T1/2
T1/3
© Cisco Systems, Inc. All rights reserved.
ds0-group
ds0-group
ds0-group
ds0-group
0
0
0
0
timeslots
timeslots
timeslots
timeslots
1-24
1-24
1-24
1-24
VoIP Bootcamp Day 5 - 70
Call Debugs (1)
Here is a call from a setup as follows:
Phone---FXS---3640R---MGCP-----CCM----IP Phone(1001)
The FXS port is registered to the CCM as an endpoint.
CCM IP address is 171.69.104.54
The 3640R is 172.16.13.41
FXS port 1/0/0
MGCP Decoding Reference
http://www-tac.cisco.com/solutions/cactus/mgcp_call_sequence_decodes.html
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 71
Call Debugs (2)
3640-5#sh log
Syslog logging: enabled (0 messages dropped, 1 messages rate-limited, 0 flushes,
0 overruns, xml disabled)
Console logging: level debugging, 280 messages logged, xml disabled
Monitor logging: level debugging, 109 messages logged, xml disabled
Buffer logging: level debugging, 69 messages logged, xml disabled
Logging Exception size (4096 bytes)
Count and timestamp logging messages: disabled
Trap logging: level informational, 39 message lines logged
Log Buffer (10000000 bytes):
The FXS port goes off hook and notifies the CallAgent of the status through observed
event.
*Mar 1 02:16:29.399: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:29.399: NTFY 186 aaln/S1/SU0/[email protected] MGCP 0.1
X: 1b
O: L/hd
<--*Mar 1 02:16:29.399: MGCP Packet received from 171.69.104.54200 186
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 72
Call Debugs (3)
The CallAgent directs the port to provide the dialtone and requests to be notified if there
is any change of events i.e. hangup of port or digits recvd.
*Mar 1 02:16:29.411: MGCP Packet received from 171.69.104.54RQNT 40 AALN/S1/SU0/[email protected] MGCP 0.1
X: 1c
R: L/hu, D/[0-9ABCD*#]
S: L/dl
Q: process,loop
*Mar 1 02:16:29.419: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:29.419: 200 40 OK
<--The FXS port (endpoint) notifies the CA about the digits that it receives
*Mar 1 02:16:33.595: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:33.595: NTFY 187 AALN/S1/SU0/[email protected] MGCP 0.1
X: 1c
O: D/1
<--*Mar 1 02:16:33.599: MGCP Packet received from 171.69.104.54200 187
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 73
Call Debugs (4)
*Mar 1 02:16:33.603: MGCP Packet received from 171.69.104.54RQNT 41 AALN/S1/SU0/[email protected] MGCP 0.1
X: 1d
R: L/hu, D/[0-9ABCD*#], L/hf
S:
Q: process,loop
*Mar 1 02:16:33.607: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:33.607: 200 41 OK
<--*Mar 1 02:16:35.655: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:35.655: NTFY 188 AALN/S1/SU0/[email protected] MGCP 0.1
X: 1d
O: D/0
<--*Mar 1 02:16:35.659: MGCP Packet received from 171.69.104.54200 188
*Mar 1 02:16:37.275: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:37.275: NTFY 189 AALN/S1/SU0/[email protected] MGCP 0.1
X: 1d
O: D/0
<--*Mar 1 02:16:37.279: MGCP Packet received from 171.69.104.54200 189
*Mar 1 02:16:38.815: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:38.815: NTFY 190 AALN/S1/SU0/[email protected] MGCP 0.1
X: 1d
O: D/1
<--*Mar 1 02:16:38.819: MGCP Packet received from 171.69.104.54200 190
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 74
Call Debugs (5)
*Mar 1 02:16:38.839: MGCP Packet received from 171.69.104.54CRCX 42 AALN/S1/SU0/[email protected] MGCP 0.1
C: A00000000200001d
X: 1e
M: inactive
R: L/hu
Q: process,loop
*Mar 1 02:16:38.851: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:38.851: 200 42 OK
I: 4
v=0
c=IN IP4 172.16.13.41
m=audio 19156 RTP/AVP 0 8 99 101 102 2 15 103 4 104 105 106 107 18 100
a=rtpmap:99 G.729a/8000
a=rtpmap:101 G.726-16/8000
a=rtpmap:102 G.726-24/8000
a=rtpmap:103 G.723.1-H/8000
a=rtpmap:104 G.723.1-L/8000
a=rtpmap:105 G.729b/8000
a=rtpmap:106 G.723.1a-H/8000
a=rtpmap:107 G.723.1a-L/8000
a=rtpmap:100 X-NSE/8000
a=fmtp:100 200-202
a=X-sqn:0
a=X-cap: 1 audio RTP/AVP 100
a=X-cpar: a=rtpmap:100 X-NSE/8000
a=X-cpar: a=fmtp:100 200-202
a=X-cap: 2 image udptl t38
<--© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 75
Call Debugs (6)
The CA directs the IP Phone to start playing ringbacks.
*Mar 1 02:16:38.855: MGCP Packet received from 171.69.104.54RQNT 43 AALN/S1/SU0/[email protected] MGCP 0.1
X: 1f
R: L/hu
S: G/rt
Q: process,loop
*Mar 1 02:16:38.859: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:38.859: 200 43 OK
At this time the call is sent to the IP Phone… Now the call is answered.
<--*Mar 1 02:16:46.159: MGCP Packet received from 171.69.104.54MDCX 44 AALN/S1/SU0/[email protected] MGCP 0.1
C: A00000000200001d
I: 4
X: 20
L: p:20, a:PCMU, s:off
M: recvonly
R: L/hu
Q: process,loop
*Mar 1 02:16:46.167: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:46.167: 200 44 OK
<--*Mar 1 02:16:46.171: MGCP Packet received from 171.69.104.54RQNT 45 AALN/S1/SU0/[email protected] MGCP 0.1
X: 21
R: L/hu, D/[0-9ABCD*#], L/hf
S:
Q: process,loop
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 76
Call Debugs (7)
*Mar 1 02:16:46.175: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:46.175: 200 45 OK
<--Note that media is cut in both directions.
*Mar 1 02:16:46.179: MGCP Packet received from 171.69.104.54MDCX 46 AALN/S1/SU0/[email protected] MGCP 0.1
C: A00000000200001d
I: 4
X: 22
L: p:20, a:PCMU, s:off
M: sendrecv
R: L/hu, L/hf, D/[0-9ABCD*#]
S:
Q: process,loop
v=0
o=- 4 0 IN EPN AALN/S1/SU0/[email protected]
s=Cisco SDP 0
t=0 0
c=IN IP4 10.17.179.33
m=audio 28390 RTP/AVP 96
a=rtpmap:96 PCMU
*Mar 1 02:16:46.187: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:46.191: 200 46 OK
<--© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 77
Call Debugs (8)
After about 12 seconds, the called party on the IP Phone drops the call.
*Mar 1 02:16:58.355: MGCP Packet received from 171.69.104.54MDCX 47 AALN/S1/SU0/[email protected] MGCP 0.1
C: A00000000200001d
I: 4
X: 23
M: recvonly
R: L/hu
Q: process,loop
*Mar 1 02:16:58.359: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:58.359: 200 47 OK
<--*Mar 1 02:16:58.379: MGCP Packet received from 171.69.104.54DLCX 48 AALN/S1/SU0/[email protected] MGCP 0.1
C: A00000000200001d
I: 4
X: 24
R: L/hu
S:
Q: process,loop
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 78
Call Debugs (9)
*Mar 1 02:16:58.383: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:16:58.383: 250 48 OK
P: PS=608, OS=97280, PR=604, OR=96640, PL=0, JI=64, LA=0
<--*Mar 1 02:17:01.403: MGCP Packet received from 171.69.104.54RQNT 49 AALN/S1/SU0/[email protected] MGCP 0.1
X: 25
R: L/hu, D/[0-9ABCD*#]
S: L/dl
Q: process,loop
Since this call was made from an FXS phone the calling party hears a dialtone
*Mar 1 02:17:01.411: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:17:01.411: 200 49 OK
<--*Mar 1 02:17:03.135: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 79
Call Debugs (10)
*Mar 1 02:17:03.135: NTFY 191 AALN/S1/SU0/[email protected] MGCP 0.1
X: 25
O: L/hu
<--*Mar 1 02:17:03.139: MGCP Packet received from 171.69.104.54200 191
*Mar 1 02:17:03.143: MGCP Packet received from 171.69.104.54RQNT 50 AALN/S1/SU0/[email protected] MGCP 0.1
X: 26
R: L/hd
S:
Q: process,loop
*Mar 1 02:17:03.147: send_mgcp_msg, MGCP Packet sent to 171.69.104.54 --->
*Mar 1 02:17:03.147: 200 50 OK
<--3640-5#
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 80
© Cisco Systems, Inc. All rights reserved.
VoIP Bootcamp Day 5 - 81
Download
Related flashcards
Create Flashcards