Dialogic® PowerMedia™ Extended Media Server (PowerMedia XMS) - more articles
Extracting MSML xml code from packet captures
Introduction
This article describes a method to extract MSML content from a wireshark trace. It can also be used if the user needs to search for specific elements in the MSML scripts like conference id's, dialog names, ... etc.
A small awk script is used that enables one to all the MSML content out of packet captures and some basic information about the rest of the packets.
How to use it
- Unzip the attached zip file.
- Use it either in a Cygwin environment on Windows or in a Linux environment.
- Use either tethereal or tshark (The text based version of the Ethereal and Wireshark)
tshark -r int3.pcap -V |awk -f msmlextract.awk > output.txt
or
tethereal -r int3.pcap -V |awk -f msmlextract.awk > output.txt
The user can also filter for example on a particular SIP call id with the regular Ethereal or Wireshark filters:
tshark -r int3.pcap -V -R 'sip.Call-ID=="MjNmZTYwMDViZmRjMDEyMjA3NjIzMjFjNDliZmFmMzQ."' |awk -f msmlextract.awk > output.txt
Example output:
Packet
Arrival Time: Jul 15, 2012 23:57:47.083458000
[Time delta from previous captured frame: 19.982491000 seconds]
[Time delta from previous displayed frame: 19.982491000 seconds]
Frame Number: 33932
Request-Line: INFO sip:LinuxAMS@192.168.11.145:5060 SIP/2.0
<?xml
version="1.0"
encoding="UTF-8"
?>
<msml
version="1.0">
<modifyconference
id="conf:ping-conference"
mark="0">
<audiomix>
<asn
ri="0"/>
</audiomix>
</modifyconference>
<!-- AMS ping -->
</msml>
Packet
Arrival Time: Jul 15, 2012 23:57:47.086323000
[Time delta from previous captured frame: 0.002865000 seconds]
[Time delta from previous displayed frame: 0.002865000 seconds]
Frame Number: 33933
Status-Line: SIP/2.0 200 OK
<?xml
version="1.0"
encoding="UTF-8"
?>
<msml
version="1.1">
<result
mark="0"
response="200"/>
</msml>
Packet
Arrival Time: Jul 15, 2012 23:57:47.086494000
[Time delta from previous captured frame: 0.000171000 seconds]
[Time delta from previous displayed frame: 0.000171000 seconds]
Frame Number: 33934
Legal Note
This document discusses one or more open source products, systems and/or releases. Dialogic is not responsible for your decision to use open source 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, your business, or your intellectual property rights.
First published: 25-Mar-2013
Open access: Product rule: open; Page rule: Auto