jpluimers / fritzcap

Fork of elpatron68/fritzcap which was previously automatically exported from code.google.com/p/fritzcap
https://wiert.me/category/power-user/internet/fritz/fritzbox-fritz/
26 stars 11 forks source link

Fritzcap 10min record #19

Open digi2017 opened 6 years ago

digi2017 commented 6 years ago

maybe you can help me. I used the latest Fritzcap version 2.3.1 and always the record stopped after exactly 10 minutes for both streams and then i can only hear one voice.. The other voice disappeared .Also the captured wave folders are then ....-0 ...-1 .....-2 .....-3 .....4. Have you any ideas why this can happen?

jpluimers commented 6 years ago

Thanks for posting; can you show the following (please format with markdown for readability):

  1. The full capture command you use (without passwords)
  2. the LOCALE settings on your system (output of the locale command)
  3. the date and time formats on your system (output of the locale --category-name --keyword-name LC_TIME command)
  4. the recursive contents of your capture directory structure (using ls -alhR from where your captures are)?

Like on one of my systems:

  1. The capture command:
python fritzcap.py --capture_files --decode_files --monitor_calls --cap_interface 1-lan --box_name 192.168.124.23 --username myUserName --password myPassword
  1. the LOCALE settings
jeroenp@katrien:/tmp> locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
  1. the date and time formats
jeroenp@katrien:/tmp> locale --category-name --keyword-name LC_TIME
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %d %b %Y %r %Z"
d_fmt="%m/%d/%Y"
t_fmt="%r"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="S"
week-ndays=7
week-1stday=19971130
week-1stweek=1
first_weekday=1
first_workday=2
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="UTF-8"
  1. Recursive directory contents:
jeroenp@katrien:/tmp> ls -alhR /home/jeroenp/Versioned/fritzcap/captures
/home/jeroenp/Versioned/fritzcap/captures:
total 12K
drwxr-xr-x 3 jeroenp users 4.0K Sep 18 18:16 .
drwxr-xr-x 5 jeroenp users 4.0K Sep 18 18:16 ..
drwxr-xr-x 5 jeroenp users 4.0K Sep 18 20:34 2017-09-18

/home/jeroenp/Versioned/fritzcap/captures/2017-09-18:
total 20K
drwxr-xr-x 5 jeroenp users 4.0K Sep 18 20:34 .
drwxr-xr-x 3 jeroenp users 4.0K Sep 18 18:16 ..
drwxr-xr-x 2 jeroenp users 4.0K Sep 18 18:18 181643
drwxr-xr-x 2 jeroenp users 4.0K Sep 18 19:22 192132
drwxr-xr-x 2 jeroenp users 4.0K Sep 18 21:00 203435

/home/jeroenp/Versioned/fritzcap/captures/2017-09-18/181643:
total 6.4M
drwxr-xr-x 2 jeroenp users 4.0K Sep 18 18:18 .
drwxr-xr-x 5 jeroenp users 4.0K Sep 18 20:34 ..
-rw-r--r-- 1 jeroenp users 1.5M Sep 18 18:18 capture_20170918181643_0_.wav
-rw-r--r-- 1 jeroenp users 1.5M Sep 18 18:19 capture_20170918181643_1_.wav
-rw-r--r-- 1 jeroenp users 2.2M Sep 18 18:18 capture_20170918181643.cap
-rw-r--r-- 1 jeroenp users 1.5M Sep 18 18:19 capture_20170918181643_mix_0_1.wav

/home/jeroenp/Versioned/fritzcap/captures/2017-09-18/192132:
total 2.2M
drwxr-xr-x 2 jeroenp users 4.0K Sep 18 19:22 .
drwxr-xr-x 5 jeroenp users 4.0K Sep 18 20:34 ..
-rw-r--r-- 1 jeroenp users 465K Sep 18 19:22 capture_20170918192132_0_.wav
-rw-r--r-- 1 jeroenp users 491K Sep 18 19:22 capture_20170918192132_1_.wav
-rw-r--r-- 1 jeroenp users  378 Sep 18 19:22 capture_20170918192132_2_.wav
-rw-r--r-- 1 jeroenp users  22K Sep 18 19:22 capture_20170918192132_3_.wav
-rw-r--r-- 1 jeroenp users  378 Sep 18 19:22 capture_20170918192132_4_.wav
-rw-r--r-- 1 jeroenp users 744K Sep 18 19:22 capture_20170918192132.cap
-rw-r--r-- 1 jeroenp users 491K Sep 18 19:22 capture_20170918192132_mix_0_1.wav

/home/jeroenp/Versioned/fritzcap/captures/2017-09-18/203435:
total 97M
drwxr-xr-x 2 jeroenp users 4.0K Sep 18 21:00 .
drwxr-xr-x 5 jeroenp users 4.0K Sep 18 20:34 ..
-rw-r--r-- 1 jeroenp users  22M Sep 18 21:00 capture_20170918203435_0_.wav
-rw-r--r-- 1 jeroenp users  22M Sep 18 21:28 capture_20170918203435_1_.wav
-rw-r--r-- 1 jeroenp users  33M Sep 18 20:58 capture_20170918203435.cap
-rw-r--r-- 1 jeroenp users  22M Sep 18 21:28 capture_20170918203435_mix_0_1.wav

PS: Reference https://www.ip-phone-forum.de/members/jeroenp.429026/#profile-post-54

digi2017 commented 6 years ago

Hi, to get a fast finish in this issue i have two questions: Are you able to record more then as 10 minutes without loosing one voice? And if yes could you please show me your setup?

Many thank for your help!

jpluimers commented 6 years ago

That works here without any problems running fritzcap on a Raspberry Pi 3 connected to a Fritz!Box 7360 v1:

python fritzcap.py --capture_files --decode_files --monitor_calls --cap_interface 1-lan --box_name 192.168.aaa.bbb --username XXX --password XXX

I've listened to multiple WAV recordings that are longer than 10 minutes and none of the audio channels are truncated.

digi2017 commented 6 years ago

This is my Config file. Is it possible that here is the failure? My device is a 7490 at a VDSL all—ip connection

[settings]
# capture_files        =
# decode_files         =
# monitor_calls        =
# username               = xxx
password               = XXX

# logging_config       =
box_name               = 192.168.xxx.xxx
# call_service_port    = 1012
# login_not_required   =
# protocol             = http
# cap_interface        = 1-eth0
cap_folder             = captures/%(tcaps.Y-m-d/HMS)/
cap_file               = capture_%(tcaps.YmdHMS).cap
# after_capture_time   = 10
# decode_workers_count = 2

default_login   = getpage=../html/de/menus/menu2.html&errorpage=../html/index.html&var:lang=de&var:pagename=home&var:menu=home&=&login:command/password=%s
sid_challenge   = getpage=../html/login_sid.xml
sid_login       = login:command/response=%s&getpage=../html/login_sid.xml
start_str       = ?start=1&start1=Start
stop_str        = ?stop=1&stop1=Stop

[phone_book]
8556694       = ZuHause
0448556694    = ZuHause
0177111222    = MeineFrau-Handy
0048177111222 = MeineFrau-Handy
jpluimers commented 6 years ago

Is this the default configuration file?

I've not played around with configuration files yet: I've done all configuration from the command-line.

My Fritz!Box is a 7360 configured as network switch but used to be an xs4all ADSL connection. The main connection is on another Fritz!Box 7490 hooked up to xs4all Fiber, but transferring all phone settings/logs over was way more cumbersome than reconfiguring the 7360 from xs4all ADSL to becoming a network switch.

digi2017 commented 6 years ago

Yes, it,s the standard config file only modified with my own password and Home ipadress of the fritzbox.

jpluimers commented 6 years ago

@digi2017: Try keeping the standard config, then pass username/password/IP-address on the command-line like my example.

Please report back your results.

If that doesn't make a difference, then I think it is a Fritz!Box model-specific thing.

digi2017 commented 6 years ago

Hi short comment, AVM has done a new Firmware official release Firmware with 6.90 After changing to my box to to this firmware it´s going now more than 10 minutes record. But now i have sometimes another problems that it begin to capture and then it stopped by finalize decoding. But i need some more try to figure out the main problem. I will update here later with more information

digi2017 commented 6 years ago

Additonal information. I have had a labour firmware at my fritzbox during the problem with only 10min record.

jpluimers commented 6 years ago

What was the original German for "labour firmware"? (you can write German to me if it is easier for you: I can read that fine)

digi2017 commented 6 years ago

Sorry not labour. In German is called labor version. It´s a beta version.

jpluimers commented 6 years ago

@digi2017 which beta-version were you using when you hit the 10 minuted recording limit?

digi2017 commented 6 years ago

Hi always use all betas which they have Released before they have the official Firmware and the problem is fixed until they have send the official 6.90 and now the next 6.92.

jpluimers commented 6 years ago

@digi2017 thanks for the update.

jpluimers commented 5 years ago

Was it solved when the beta got promoted to release version?

chriszuckerberg commented 5 years ago

Hello, I have similar problems. However, this affects phone calls that are forcibly disconnected. Here Fritzcap crashes completely, but unfortunately does not quit itself, here I could then simply restart the application with Watchdog. Here's the excerpt from the log_debug_fritzcap.txt: 2019-05-08 02:31:01,993 [ Thread-3::139983572469504] [DEBUG ] [ capture_monitor::run_logic ] pre_capture wait(). 2019-05-08 02:35:10,299 [ Thread-4::139983580862208] [DEBUG ] [ call_monitor::run_logic ] Telnet:'08.05.19 02:35:10;DISCONNECT;1;11118;' 2019-05-08 02:35:10,299 [ Thread-4::139983580862208] [ERROR ] [exception_logging_thread::run ] Exception in run Traceback (most recent call last): File "/etc/fritzcap/core/exception_logging_thread.py", line 48, in run self.run_logic() File "/etc/fritzcap/core/call_monitor.py", line 190, in run_logic self.logger.info("Disconnect (ID:%s, ActiveCalls.:%s, Caller:%s, DialedNumber:%s, LinePort:%s)" % (sline[2],callers_count,call_id_map[sline[2]][0],call_id_map[sline[2]][1],call_id_map[sline[2]][2])) KeyError: '1'

Can you help me?