Scapy and MGCP
Devaki Chokshi (dchokshi)
dchokshi at cisco.com
Mon Jun 29 16:06:05 EDT 2015
Hello,
As per reply received I have begun to use scapy for MGCP.
I started off with reading a .pcap file with MGCP packets.
For example:
from scapy.all import *
from scapy.utils import *
from scapy.layers.mgcp import *
mgcp_pkts = rdpcap("my-mgcp-capture.pcap")
However, rdpcap() is returning all MGCP packets as UDP packets. The output is something like:
<my-mgcp-capture.pcap: TCP:33 UDP:262 ICMP:1 Other:0>
All 262 UDP packets are actually MGCP packets.
I would have thought rdpcap() will understand MGCP packet format.
Would appreciate help on how I can make scapy read MGCP packets from a .pcap file.
Thank you
Devaki
-----Original Message-----
From: Laura Creighton [mailto:lac at openend.se]
Sent: Tuesday, June 23, 2015 7:47 AM
To: Devaki Chokshi (dchokshi)
Cc: python-list at python.org; shtoom at python.org; lac at openend.se
Subject: Re: MGCP Server implementation
In a message of Mon, 22 Jun 2015 20:42:21 -0000, "Devaki Chokshi (dchokshi)" wr
ites:
>Hello,
>
>I have a use case where a SIP voice call will be passing through an MGCP gateway.
>
>Is there a python implementation that simulates MGCP gateway/server?
>
>Thank you
>Devaki Chokshi
>
>--
>https://mail.python.org/mailman/listinfo/python-list
>
I think http://www.secdev.org/projects/scapy/ will do this for you.
In particular
https://code.google.com/p/pythonxy/source/browse/src/python/_scapy/PURELIB/scapy/layers/mgcp.py?repo=xy-27&name=v2.7.2.1&r=c4a08530c8ff74fd6078507743ce9982675aea8c
But I have only used Sacpy for other protocols, so I am not certain.
Laura
More information about the Python-list
mailing list