|
Asterisk - The Open Source Telephony Project GIT-master-9647a4f
|
Data Structures | |
| class | FaxPcap |
| class | SkipPacket |
| class | SpandspLog |
Functions | |
| main (logname, pcapname) | |
| n2b (text) | |
Variables | |
| bool | EMPTY_RECOVERY = False |
| IFP = namedtuple('IFP', 'date seqno data') | |
| bool | LOSSY = False |
Usage: ./spandspflow2pcap.py SPANDSP_LOG SENDFAX_PCAP
Takes a log from Asterisk with SpanDSP, extracts the "received" data
and puts it in a pcap file. Use 'fax set debug on' and configure
logger.conf to get fax logs.
Input data should look something like this::
[2013-08-07 15:17:34] FAX[23479] res_fax.c: FLOW T.38 Rx 5: IFP c0 ...
Output data will look like a valid pcap file ;-)
This allows you to reconstruct received faxes into replayable pcaps.
Replaying is expected to be done by SIPp with sipp-sendfax.xml. The
SIPp binary used for replaying must have image (fax) support. This means
you'll need a version higher than 3.5.0 (unreleased when writing this),
or the git master branch: https://github.com/SIPp/sipp
Author: Walter Doekes, OSSO B.V. (2013,2015,2016,2019)
License: Public Domain
| main | ( | logname, | |
| pcapname | |||
| ) |
Definition at line 239 of file spandspflow2pcap.py.
| n2b | ( | text | ) |
Convert "aa bb cc" to bytearray('\xaa\xbb\xcc').
Definition at line 44 of file spandspflow2pcap.py.
References replace().
Referenced by SpandspLog.__iter__().
| bool EMPTY_RECOVERY = False |
Definition at line 38 of file spandspflow2pcap.py.
| IFP = namedtuple('IFP', 'date seqno data') |
Definition at line 41 of file spandspflow2pcap.py.
Referenced by SpandspLog.__iter__(), and FaxPcap.add().
| bool LOSSY = False |
Definition at line 37 of file spandspflow2pcap.py.