This is fake SMDR server, emulating Panasonic PBX SMDR server behavior. It provides access to SMDR data over telnet. It can be used to test SMDR analyzing software.
Calls data is taken from sample file. You can find examples with randomly generated data in samples
folder.
Minimum required Python version is 3.3
- Install dependencies:
pip3 install -r requirements.txt
- Run server:
python3 smdr_server.py -f samples/sample1.log
-f, --file
— path to sample log file. Required argument.
-H, --host
— server IP address. Default localhost
.
-P, --port
— default 2300
.
-p, --password
— prompt for a password to change it
from default pccsmdr
. Clients are prompted for this password
to access SMDR data.
-e, --eol
— EOL sequence. Choices are CR
, LF
, CR+LF
.
Default is CR+LF
.
-n, --records_on_page
— number of records per page. Pages are separated
by special headers.
-v, --loglevel
— set server loglevel. Choices are CRITICAL
, ERROR
, WARNING
, INFO
, DEBUG
(from less to more verbose). Default is WARNING
. Log is sent to stderr.
Telnet commands:
smdr
— get smdr dataq
— close connectionhelp
— show available commands