SIP With Ethereal
SIP With Ethereal
SIP With Ethereal
Executive Summary
This application note explains how to set up, configure, and use the
Open Source, PC-based network protocol analyzer Ethereal with
Dialogic® voice over Internet Protocol (VoIP) telephony products.
Setting up and using Ethereal in a telephony hardware and software
environment involves some special considerations, which this
application note addresses. This note also serves as a beginning
installation, configuration, and user’s guide for Ethereal with Dialogic
VoIP products. It explores the use of Ethereal in a VoIP test
environment by describing how to get started debugging VoIP protocols
using Ethereal, providing debugging guidelines, and showing examples
of real-world problem scenarios.
Using Ethereal to Debug SIP and RTP on Dialogic® Voice over IP (VoIP) Products Application Note
Table of Contents
About Ethereal........................................................................................................ 2
Test Environment.................................................................................................... 2
Methodology........................................................................................................... 2
Windows® Installation.............................................................................................. 2
Address Changed for Host Media Processing Software Host System ................ 6
Conclusions............................................................................................................ 7
References ............................................................................................................. 8
Acronyms ............................................................................................................... 8
1
Application Note Using Ethereal to Debug SIP and RTP on Dialogic® Voice over IP (VoIP) Products
2
Using Ethereal to Debug SIP and RTP on Dialogic® Voice over IP (VoIP) Products Application Note
Analog Phones
HMP-based SIP Endpoint
IVR Application
IVR Application
compatible with the Red Hat Linux version you are using Openxtra Ethereal Installation
(go to http://www.rpmfind.net to locate these and other An extended version of Ethereal, Ethereal-XTRA, is also
RPMs.) There are four packages you must install for the available under GNU Public License from Openxtra at
full GUI-based product. Install them in this order: http://www.openxtra.co.uk/freestuff/ethereal-xtra.php.
3
Application Note Using Ethereal to Debug SIP and RTP on Dialogic® Voice over IP (VoIP) Products
time, is calculated for each packet as well. Figure 2 shows We recommend that you plug in all Ethernet connections
an example of RTP stream analysis. into an Ethernet hub, rather than a router. A router has the
intelligence to not waste system resources by forwarding
Note that the two streams — one for each direction —
packets not destined for its address. A hub simply
are shown separately. Another feature makes it possible to
broadcasts all packets to all connected NICs. Access to IP
dump the payloads for either RTP stream into a file so
packets on the system's LAN can be beneficial when using a
that the audio data it is carrying can be heard.
host-based Ethernet monitor such as Ethereal. RTP packets
may be headed for the NIC on the Dialogic telephony
General Setup and Use board, but they need to be caught and displayed on the
You should run Ethereal in "promiscuous mode," system running Ethereal. Even with an Ethernet router,
meaning that it will grab and display any packet that it Ethereal can still be used to monitor the traffic coming in
sees on the Ethernet NIC, not just packets destined for its and out of the Dialogic VoIP system (see Figure 1) to debug
own address. This is important for two reasons: or to troubleshoot problems specific to that particular
system (for example, a connection with no RTP audio).
1. The Dialogic telephony board has its own address
and NIC. (The host NIC is not used for RTP.) The operation of Ethereal is described in an online
manual, which you can download at
2. The RTP (or SIP) packets could be headed
http://www.ethereal.com/docs/user-guide. Here we will
elsewhere, not to the system that you are expecting,
only cover the basics for setting up and using Ethereal to
where Ethereal is running.
get you going as quickly as possible with the utility. For
You can set promiscuous mode in either of two locations: general use, set these display options when a Capture ->
Start is used to begin packet capture:
• In the Edit -> Preferences -> Capture screen
X Update list of packets in real time
• In the Capture -> Start -> Capture options window
that pops up when starting packet capture X Automatic scrolling in live capture
4
Using Ethereal to Debug SIP and RTP on Dialogic® Voice over IP (VoIP) Products Application Note
This allows you to get an idea of what is happening in • Is there a match in the choice of media (given by
real time (although any in-depth analysis must be done Media Attribute) in the Session Description Protocol
after a call is made and the trace stopped). (SDP) portions of the INVITE and OK messages?
Ethereal provides a full set of filters to control collection • Does RTP streaming start after the SIP ACK
or display of protocols. Initially, ensure that the SIP acknowledgement message?
protocol is enabled:
• Are the source and destination addresses for the RTP
Edit -> Protocols -> Enable All packets correct?
Adding “SIP” to the filter text box on the bottom left side • Take a look at the RTP payload type. Does the
of the screen and then selecting the Apply button will payload type match that requested by the call
either suppress collection (pre-capture) or display (post- originator?
capture) of RTP packets. This is desirable due to the
• Look at the RTP payload itself. Does it look like a
number RTP packets generated. You can deactivate
"random" mixture of values that would likely be
filtering by pressing the Reset button.
describing digitized voice? Or is it a more a repetitive
RTP packets are normally displayed simply as UDP. To set of values, such as 0xff, that could indicate silence?
view them as RTP:
• If Ethereal-XTRA is used, listening to the RTP-based
• Select a UDP packet audio may also be useful. To do this:
• Decode by selecting Tools-> Decode As -> Transport o Select a UDP packet
-> RTP -> Apply
o Decode as RTP by selecting: Tools-> Decode As ->
Transport -> RTP -> Apply
VoIP Problem-Solving
In general, approach any VoIP problem by first looking at o Invoke RTP stream analysis by selecting Tools->
the SIP signaling. Only investigate RTP once the SIP Statistics -> RTP Streams -> Analyze. This will
protocol trace looks correct. Try a test run in which the bring up the analysis window, with each stream
inbound or outbound call is made, then look closely at under a different tab.
the results. These guidelines describe a quick checklist: o Streams may be saved separately or mixed as .au
• Are the IP addresses correct for the source and files (8000 HZ, 8-bit, mono PCM) by selecting the
destination systems or phones? Save Payload button. This brings up the Save
window, where it is possible to select Forward,
• The default SIP port is 5060 unless otherwise Reverse, or Both for the stream(s) to save. You must
specified. Check the port number in the UDP header. specify a directory in which to save and a file name.
• Are the addresses and ports correct for the Dialogic o The resulting .au audio file can then be heard on a
telecom board Ethernet NIC? system with a sound card with any audio player
• For a simple User-Agent-to-User-Agent session, the such as Windows Media Player or CoolEdit.
basic message flow will be similar to:
Troubleshooting Scenarios
o Caller ---- INVITE -- Called
This section presents in detail four real-world problems to
o Caller -- Trying ---- Called demonstrate common failure scenarios and how to address
o Caller -- Ringing --- Called them using Ethereal as an Ethernet packet monitor.
5
Application Note Using Ethereal to Debug SIP and RTP on Dialogic® Voice over IP (VoIP) Products
127.0.0.1 localhost localhost.localdomain bigsys Analysis and Resolution: rfc2833 DTMF is a special type
of payload carried by an RTP packet. This type of DTMF
192.168.1.100 bigsys
does not rely on an audio representation of the tone, and
Removing the name from the first line resulted in an is thus more compact and reliable. However, both parties
address of 192.168.1.100 appearing in the CallID and its in a call must agree that rfc2833 is being used for the
use as the return address for subsequent messages. tone representation.
6
Using Ethereal to Debug SIP and RTP on Dialogic® Voice over IP (VoIP) Products Application Note
The Snom SIP phone has been configured for out-of- ulParmValue is set to 100, the application is recompiled
band DTMF (rfc2833) and a Dialogic® application set up and rerun, and subsequent test calls now have working
to handle the same sort of DTMF recognition. One side DTMF detection.
(or possibly both) is not working correctly.
The Snom SIP Phone has been configured to handle out- Conclusions
of-band DTMF with a payload type of 100. The The Open Source, PC-based network protocol analyzer
application should be doing the same. But what do these Ethereal can be a great help in an environment that uses
particular DTMF packets look like? After running even a telephony hardware and software. By understanding the
short test call, hundreds or thousands of RTP packets are special considerations for this environment as outlined
captured. Ethereal’s filter must be used to separate out the in this document, it is easy to get started debugging
voice from rfc2833 packets. This can be done as follows: Dialogic VoIP protocols using Ethereal.
• Use Tools-> Decode As -> Transport -> RTP -> • Microsoft Windows operating system
Apply to interpret the packets as RTP.
• Dialogic Host Media Processing Software
• Create a filter for RTP payload type 100 with:
• SIP under Global Call
o Edit -> Display Filters.
• Ethereal
o Add a Name for a new filter.
Dialogic® Telephony Hardware-Based System
o Select “Add Expression” button and scroll down
• Tech Support Chassis
and expand RTP entry.
• Dialogic® DM/IP241-1T1-PCI-100BT IP Board
o Select “Payload type”, “==” and enter a value of
100 for the payload. • Red Hat Linux operating system
o Accept and Save the new entry. • Dialogic® System Release Software
• Apply the filter by selecting the filter button on the • Vovida SIP
bottom left corner of the screen. This will bring up • Ethereal
the list of predefined filters, including the one just
created. Select and apply it. Cisco ATA 188
The RTP packets remaining in the trace are those with a • Two-line analog phone to IP gateway
payload type of 100. The first two digits of the payload • SIP software
correspond to the DTMF key pressed during the test call
– 01, 02, etc. So, the SIP phone seems to be doing its job. Snom 200
This leads to the other SIP endpoint. Examining the • SIP phone
application code reveals that it is expecting rfc2833 • Snom200-SIP
DTMF, but is actually looking for a different payload
Networking Equipment
type. The Dialogic® RTP streaming interface, once
open, has a number of parameters that can be set to • NetGear 8 Port Pro Series Dual Speed Hub, DS108
define the RTP sessions that will be used. Here,
ulParmValue in IPM_PARM_INFO has been set to 96,
indicating that a type 96 payload is expected. This does
not match the payload type sent by the phone.
7
Application Note Using Ethereal to Debug SIP and RTP on Dialogic® Voice over IP (VoIP) Products
References Acronyms
Dialogic product information — ACK SIP message sent by the caller after a final
http://www.dialogic.com response has been received for an INVITE
request.
Dialogic telecom support —
http://www.dialogic.com/support/ API Application programming interface
Communications Services Framework Project — ARP Address resolution protocol
http://sourceforge.net/projects/commsvcfw
ATA Analog telephone adaptor
Ethereal Project —
DTMF Dual tone multiple frequency
http://www.ethereal.com
GNU Open source software licensing from the GNU
Linux RPM Locator Website —
Project (http://www.gnu.org)
http://www.rpmfind.net
GUI Graphical user interface
Openxtra Ethereal —
http://www.openxtra.com/products/ethereal_xtra.htm HMP Host Media Processing
IP Internet protocol
IVR Interactive voice response
LAN Local area network
NIC Network interface card
rfc2833 RTP request for comment proposal for out-of-
band DTMF transmission
RPM Remote packet module
RTP Real time protocol
SDP Session description protocol
SIP Session initiation protocol
TCP Transmission control protocol
UDP User datagram protocol
VoIP Voice over internet protocol
8
Using Ethereal to Debug SIP and RTP on Dialogic® Voice over IP (VoIP) Products Application Note
9
To learn more, visit our site on the World Wide Web at http://www.dialogic.com
Dialogic Corporation
9800 Cavendish Blvd., 5th floor
Montreal, Quebec
CANADA H4M 2V9
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH PRODUCTS OF DIALOGIC CORPORATION OR ITS SUBSIDIARIES (“DIALOGIC”). NO
LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS
PROVIDED IN A SIGNED AGREEMENT BETWEEN YOU AND DIALOGIC, DIALOGIC ASSUMES NO LIABILITY WHATSOEVER, AND DIALOGIC DISCLAIMS ANY
EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF DIALOGIC PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS
FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHT OF A THIRD PARTY.
Dialogic products are not intended for use in medical, life saving, life sustaining, critical control or safety systems, or in nuclear facility applications.
Dialogic may make changes to specifications, product descriptions, and plans at any time, without notice.
Dialogic is a registered trademark of Dialogic. Dialogic's trademarks may be used publicly only with permission from Dialogic. Such permission may only be granted
by Dialogic’s legal department at 9800 Cavendish Blvd., 5th Floor, Montreal, Quebec, Canada H4M 2V9. Any authorized use of Dialogic's trademarks will be subject
to full respect of the trademark guidelines published by Dialogic from time to time and any use of Dialogic’s trademarks requires proper acknowledgement.
The names of actual companies and products mentioned herein are the trademarks of their respective owners. Dialogic encourages all users of its products to procure
all necessary intellectual property licenses required to implement their concepts or applications, which licenses may vary from country to country.
This document discusses Ethereal, which is an open source product. Dialogic is neither responsible for your decision to use Ethereal (or any other open source product)
in connection with Dialogic products including without limitation those referred to herein, nor is Dialogic responsible for any present or future effects such usage
might have, including without limitation effects on your products, business, or intellectual property rights.
Copyright © 2007 Dialogic Corporation All rights reserved. 9008-02 06/07
www.dialogic.com