You are on page 1of 15

DTMF (Dual-Tone Multifrequency) - this tone generated when you press the button on the phone.

DTMF is widely used in the auto responders (IVR), for a variety of interactive systems. Attached to
VoIP, while working with different codecs DTMF requires quite close attention, so his work should be
clearly understood.
Default Gateway sends DTMF in RTP stream ( in-Band ), this works fine if the codec High-bit-
rate G.711, ie if the voice stream is not compressed.
main problem with DTMF arises when using compression algorithms, such as codec G.729. The fact
that the compressive qualities of head flow noticeably worse, and although it has almost no effect on
the ability of users to understand each other, DTMF tone is not sufficiently clear and perceived wrong.

This problem is solved by using DTMF Relay , where the DTMF signals are transported separately
from the RTP stream or out-of-Band .
Consider a few examples. The figure shows the wiring diagram telephony through the gateway H.323.

On the site is given PSTN DTMF in-band, ie there is even no concept of DTMF Relay, as this analog
line.
DTMF relay becomes necessary only in the section VoIP, where possible use of compression
techniques.
Also we can say that:
- in-Band DTMF relay would go inside the stream RTP, ie the figure on the red line RTP.
- out-of-Band DTMF relay will go along with the alarm, ie the green lines in the figure.
In areas phone-CUCM and CUCM-H.323Gateway used different alarm, and then various methods
DTMF relay. From the side of the phone comes SCCP messages, containing in its DTMF encoding by
H.323 gateway with DTMF signaling is H.245 messages.
CUCM in this case acts as a DTMF Forwarder between different types of alarms.
On a plot of phone-CUCM we will only be available out-of-Band , as SCCP-shny phone does not
support in-Band .
On the site CUCM-H.323Gateway possible methods as in-Band , and out-of-Band . In the case of
SCCP-shnogo number, to enable in-band need to use MTP .
You also need to understand that the DTMF settings for H.323 Trunk - this is the setting for this trunk
with Dial-peer on a physical H.323 Gateway.
Depending on the signaling protocol (H.323, SIP, MGCP, SCCP), there are various methods for
implementing DTMF Relay. In any case, Call Manager CUCM initially tries nekotsiirovat method
common to all. If the Aggregate method was not found, an attempt is made to use the MTP.
H.323 DTMF Support
Cisco Gateways supports the following methods of DTMF Relay:
 Cisco proprietary: - in-Band DTMF relay. DTMF is sent in the same RTP stream as voice, but DTMF
tones are encoded somewhat differently, allowing them to successfully differentiate and take on that
side. Samples identified as DTMF RTP payload type 121 . Method works only if both sides of
equipment Cisco, as well as the same method
Debug:
One source recommended debug voice rtp session named-Event , but I have not
worked.
Result gave only this debug: debug H245 asn1
 H.245 Alphanumeric: -Out-of-Band DTMF relay. DTMF separates from the RTP stream and sends
them through the H.245User Input Indication messages . When this method is not sent tone length :
always considered that the length of the tone 500msec.
In this example, we clicked on the "5".
Debug: debug H245 asn1
 H.245 Signal: -Out-of-Band DTMF relay. This method is able to send long tone ( tone length ).
Debug: debug H245 asn1
 NTE: - in-Band DTMF relay. Works like a Cisco proprietary, DTMF is sent in the same RTP stream as
voice using RTP Payload type . Another payload does not allow samples to be compressed
DTMF. Unlike Cisco proprietary , NTE uses standard RFC 2833.
Debug: debug H245 asn1
On a Cisco router, use the following command:
router (config-dial-peer) # dtmf-relay?
cisco-rtp Cisco Proprietary RTP
h245-alphanumeric DTMF Relay via H245 Alphanumeric IE
h245-signal DTMF Relay via H245 Signal IE
rtp-nte RTP Named Telephone Event RFC 2833
router (config-dial-peer) #
Best Practice:
On dial peers are best given command as follows:
dial-peer voice 3000 voip
description Long calls
destination-pattern [6-7]. [1-5] ..
session target ipv4: 192.168.0.11
dtmf-relay h245-signal h245-alphanumeric cisco-rtp rtp-nte
codec g711ulaw
no vad
In this case, both parties can negotiate a suitable method of dtmf-relay together.
To determine the selected DTMF relay Method: Show active voice call
router # show call active voice
...........
PeerAddress = 5001
...........
tx_DtmfRelay = rtp-nte
Thus, CUCM automatically checks which method DTMF suit both sides.
Regarding H.323 Gateway in CUCM, there is no DTMF settings. CUCM setting takes the other side.
MGCP DTMF Support
For MGCP following methods are available DTMF Relay:
 Cisco proprietary: DTMF is sent in the same RTP stream as voice, but DTMF tones are encoded
somewhat differently, allowing them to successfully differentiate and take on that side. Samples
identified as DTMF RTP payload type 121 . Method works only if both sides of Cisco equipment and
selected similar method (nothing negotiates).
 NSE: NSE - is essentially a Cisco Proprietary NTE. Method works only if both sides of Cisco
equipment and selected similar method (nothing negotiates).
 NTE: in turn, can operate in two modes:
- Gateway-controlled mode (NTE GW): Gateways agree with each other about their own DTMF
exchanging capability information in SDP messages. This process is transparent to the Call Agent. In
this case both MGCP gateways running and both are connected to the same CUCM.
- Call agent-controlled mode (NTE CA): In negotiation used Call Agent, ie acting on behalf of
MGCP-gateway (SDP message sent to the Agent). This mode can be used in the case where the
second gateway is not MGCP-Gateway. After negotiation Call Agent instructs the gateway of the
action on the other side of the RTP-NTE values.
 Out-of-band: The tones are sent to CUCM using messages MGCP, ie outside the flow of RTP (Out-
of-band). CUCM in turn, receives and transmits the DTMF other side.
MGCP uses DTMF relay only for low-rate codecs (G729, iLBC, GSM, etc). For bit-rate codecs G711
DTMF will be sent in-Band .
In the case of MGCP we can choose whether DTMF settings dictated by the Call Agent-th (CUCM) or
those that will be used on display at Gateway.
Head over to CUCM: Device> Gateway , select the appropriate MGCP Gateway.
We are interested in the section Type of DTMF Relay .

When choosing Current GW Config , will use the setting that stands at the gateway.
On IOS Gateway we can expose DTMF following command:
router (config) # mgcp dtmf-relay voip codec all mode?
cisco Set mgcp dtmf-relay mode to be cisco
disabled Set mgcp dtmf-relay mode to be disabled
nse Set mgcp dtmf-relay mode to be nse
nte-ca Set mgcp dtmf-relay mode to be nte-ca
nte-gw Set mgcp dtmf-relay mode to be nte-gw
out-of-band Set mgcp dtmf-relay mode to be out-of-band
If we expose on the CUCM another option, such as Cisco , corresponding to the above commands will
be introduced automaton (mechanisms MGCP).
With MGCP was spotted bug:
CSCta69407 Bug Details (When using any type of inband DTMF signaling (RTP-NTE, NSE, or Cisco
Proprietary) DSP's Are not turning off OOB dtmf using MGCP signaling packets. Duplicate digits Fore
There Will be Seen on the Terminating GW as one coming from rtp and other coming from CUCM)
Workaround: Use MGCP dtmf-relay type out-of-Band.
SIP DTMF Support
By default, the SIP sends DTMF in-Band , but we can use the following options:
 RTP-NTE ( NTE or RFC 2833 ) - in-Band DTMF relay. Which carry information instead uses DTMF
voice packets RTP Named Telephony Event (NTE). When this is used for SDP negotiation between
nodes values payload type = NTE. Although this is technically in-Band , but really the tone in the
audio stream is not heard because no voice packets NTE
RTP-NTE can not work with phones SCCP, as SCCP phones only use out-of-band DTMF relay. For this
reason, together with the RTP-NTE must use MTP.
 SIP INFO - out-of-Band (OOB) DTMF relay. DTMF information is sent to the SIP-messages
INFO. Ie if the gateway receives a message INFO, it gives the appropriate tone.
 SIP NOTIFY - out-of-Band (OOB) DTMF relay. or it is also called NOTIFY-based out-of-Band DTMF
relay . This type uses NOTIFY DTMF relay to transmit tones. This method is compatible with phones
SCCP, as it can be used with analog phones connected to FXS ports on the gateway.
 KPML - out-of-Band (OOB) DTMF relay. When using the Key Press Markup Language SIP phone
sends digit number on digit-by-digit. This method is similar to the SIP NOTIFY , with the only
difference that gives each digit individually.
router (config-dial-peer) # session protocol sipv2
router (config-dial-peer) # dtmf-relay?
cisco-rtp Cisco Proprietary RTP
h245-alphanumeric DTMF Relay via H245 Alphanumeric IE
h245-signal DTMF Relay via H245 Signal IE
rtp-nte RTP Named Telephone Event RFC 2833
sip-kpml DTMF Relay via KPML over SIP SUBCRIBE / NOTIFY
sip-notify DTMF Relay via SIP NOTIFY messages
router (config-dial-peer) #
Here we see several available methods to work with CUCM suitable only
- RTP-NTE ( NTE or RFC 2833 );
- SIP-NOTIFY ;
- SIP-KPML .
In the first part of the DTMF and its setting. Part 1. Theory we considered necessary theory for
DTMF. In this section we consider examples of the most common variants of interaction between
different signaling protocols and methods of DTMF relay. All of the examples used by the author in
practice, however, just say: all used codec G.711.
Telephone-PSTN gateway
For the most part there is almost no problem, but give examples tested and working in real life.



For more information about connecting to CUCM SIP provider see and SIP Call Manager. Part 3:
Connecting to the Call manager CUCM SIP provider
H.323 + MGCP

In this article we look at a practical example of the application of technology traskodirovaniya
(Transcoding). Transcoding, (transcoding) - a way to convert one codec to another. As is known to
convert analog voice to VoIP uses codecs (codec).Different codecs use different compression
ratio. There are so many codecs, only Cisco Router supports them about a dozen.But not all devices
poddezhivayut all types of codecs - hence the need for conversion.
Service Transcoder is located in a voice gateway.
For Transcoder requires the use of DSP .
More on the theory transcoder see Working with media resources: Transcoder and MTP
Consider a situation that may well occur in real life: In this example, we have a Main
Site and Remote Site , and settingRegions exhibited so that within each site using codec G.711 ,
and between sites G.729 .

Briefly how it works. Regions associated with Device Pool . Device Pool in turn is associated with
the target device. When trying to connect the two devices are trying to pick a codec that suits both of
them , ie not exceeding the bandwidth requirements for both devices. If the device is not able to
agree on the codec attempts to run Transcoder.
For example, if you connect two phones inside the Main Site will be selected G.711 , and when you
connect phones from different sites will be used G.729 .
Check it out if you can go to the web-page number or by clicking twice (?)


In our example, Main Site uses Conference Bridge , supports only codec G.711.
If no transcoder, a branch of the phone can not connect to the conference - the user will hear a busy
signal.
We need to configure a transcoder.
Before setting consider how it would work. Here is a diagram of the interaction devices, trace how this
interaction is made in the creation and use of the conference:

1. Phone Tel1 try to create the conference meet-me . Zhelezona concrete which will be created is
determined by the Conference chain: Tel1> Moscow_pool> Moscow_mrgl> Moscow_mrg>
CFB2. Creates a conference on Soft Conference Bridge , which supports only G.711
2. Any phone from Main Site associated with Device Pool Moscow_pool, on which
hung Region Moscow_region and which in turn is set to G.711 within the region. As a result, both
devaysa connected with each other by G.711
3. If you attempt to connect to the conference phone TEL11 of the region, you will connect to
another: TEL11> IGE_pool> IGE_region . IGE_region requires a connection between regions
for G.729 , but this codec is not supported by a soft-bridge itself CFB_2 . Then you try to use a
transcoder that is associated with CFB_2 chain: CFB2> Moscow_pool> Moscow_mrgl>
Moscow_mrg> msk01gtw01_tcd
Step 1: Determination of the number of required DSP resources
In our example, we select 16 sessions trankoding.
Step 2: Create a DSP Farm
DSP Farm - is allocated resources DSP, services available for conferencing, transcoding or MTP.
DSP Farm configured on a voice gateway, and then is administered by Cisco Unified Communications
Manager through theSCCP .
DSP Farm In combination supports concurrent sessions transcoding, MTP, conferences.
Moreover availability Resources defined at the router level and is transparent to the Call manager,
ie CUCM bluntly asks for and receives the desired service or good, or refusal.
So for allocating resources in DSP Farm:
Router (config) # voice-card 0
Router (config-voicecard) # dsp services dspfarm
Step 2: Creating and Configuring DSP Profiles SCCP
DSP farm profiles are created to allocate resources from the DSP Farm .
profile defines Service type (Conference, Transcode, MTP), is associated with him application, which
will take control over it and other specific parameters.
Thus DSP farm profiles resources are grouped by type ( Service type ), and an application
associated with it, is able to use its resources.
Each dspfarm associated with a unique Profile ID . We can create multiple dspfarm .
As already noted, the protocol SCCP is used for signaling between Cisco Unified Communications
Manager and the router equipped with a set of DSP resources.
sccp local Loopback0
sccp ccm 192.168.0.12 identifier 2 version 7.0
sccp ccm 192.168.0.11 identifier 1 version 7.0
sccp

sccp ccm group 1
associate ccm 1 priority 1
associate ccm 2 priority 2
associate profile 10 register msk1gw01_tcd

dspfarm profile 10 transcode
codec g722-64
codec g729br8
codec g729r8
codec gsmamr-nb
codec ilbc
codec isac
codec pass-through
codec g711ulaw
codec g711alaw
codec g729ar8
codec g729abr8
maximum sessions 16
associate application SCCP
Initially set node CUCM, as well as their identifiers. Identifier - is any unique number on this router.
Dalla for each resource group is created. The group number can be anything, but I made a matching
numbered sootvetstvuyuscheo dspfarm Profile .
Under defined nodes and priority access to them. Also associated with a group dspfarm profile with
his number.
msk1gw01_tcd - the names of groups that will be recorded on the CUCM. On CUCM must be a
corresponding configuration.
Side configuration CUCM
On the side we will create the structure CUCM Media Group resource , as well as the Media
Resource Group List according to our scheme. Carry out their mutual binding.
Each Media Resource Group List must be tied to the appropriate Device pool , in and in
accordance with the scheme.
Create Transcoder on CUCM
Cisco Unified Communications Manager Administration> Media Resources> Transcoder>
Add new

Media Termination Point here Name msk1gw01_tcd must match the corresponding name
configuring associate profile 10 register msk1gw01_tcd on the router.
After creating MTP on CUCM, it must successfully register.
transcoder should be placed in the appropriate Media Resource Group
Sniffing RTP or phone call
Search Form
Search
Search

пн, 27/02/2012 - ten three - vs

Network security should never take second place.
Consider the example of how to intercept traffic or RTP, simply put, IP phone conversation.
We will use freely available sniffer Wireshark.
To intercept the conversation we need to get access to traffic RTP, ie to traffic between two IP
phones.
In our case, for this we need to mirror a traffic interface with one of the phones on the interface to
which it is connected machine with Wireshark:
monitor session 1 Source interface gigabitethernet 1/0/1
monitor session 1 destination interface gigabitEthernet 1/0/5
After this you can run Wireshark to intercept.
Next click on one of the RTP packets and select: Telephony - VOIP calls - player - decode - play
Similarly, you can make prehvat session and telnet. When you see in practice intercepted the
password, it really makes an impression and sobering.
<Organization permissions in