Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93315

Scapy and MGCP

From "Devaki Chokshi (dchokshi)" <dchokshi@cisco.com>
Subject Scapy and MGCP
Date 2015-06-29 20:06 +0000
Newsgroups comp.lang.python
Message-ID <mailman.182.1435648490.3674.python-list@python.org> (permalink)

Show all headers | View raw


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@openend.se] 
Sent: Tuesday, June 23, 2015 7:47 AM
To: Devaki Chokshi (dchokshi)
Cc: python-list@python.org; shtoom@python.org; lac@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Scapy and MGCP "Devaki Chokshi (dchokshi)" <dchokshi@cisco.com> - 2015-06-29 20:06 +0000

csiph-web