Download of pcap files / audio files using GUI's api

From VoIPmonitor.org
Jump to navigation Jump to search

Get list of CDRs

The main task is to get list of cdr.ids first, then use cdr.ids to get pcap/audio

easy filter

echo '{"task": "getVoipCalls", "user": "admin", "password": "adminecek","params": {"startTime": "2017-01-01", "endTime": "2017-04-13"}}' | php php/api.php

more filters

echo '{"task": "getVoipCalls", "user": "USER", "password": "PASSWORD", "params": [{"startTime": "2013-01-01", "endTime": "2013-08-01", "caller": "910251414", "called": "800123456"},{"startTime": "2013-01-01", "endTime": "2013-08-01", "caller": "910251415", "called": "800123456"}]}' | php php/api.php


Get pcap or audio

get pcap

echo '{"task": "getPCAP", "user": "admin", "password": "adminpass", "params": {"callId": "0CP7-HYtNF","calldate": "2017-04-01"}}' | php api.php > /tmp/b.pcapng

get ogg

echo '{"task": "getVoiceRecording", "user": "admin", "password": "adminecek", "params": {"cdrId": "1186", "ogg": "true"}}' | php php/api.php > 1186.ogg

get wav

echo '{"task": "getVoiceRecording", "user": "admin", "password": "adminecek", "params": {"cdrId": "1186"}}' | php php/api.php > 1186.wav