voiceip / oreka

OpenSource G711, G722, G729, Opus & Other Format VoIP SIP Recorder
GNU General Public License v3.0
145 stars 76 forks source link

Files are not written to AudioOutputPath #113

Open pancitmiki opened 2 years ago

pancitmiki commented 2 years ago

Hi,

I have set /etc/orkaudio/config.xml to "/data/orkaudio/another_audio_folder". orkaudio and orktrack are both running properly but the actual files are not written to the custom folder. Setting it back to the default one also does not fix it.

I see in the logs where the files are supposedly being written to:

2022-06-30 20:59:57,423 INFO reporting:376 - [localhost:9000/orktrack] timedeltasecs:0 sending: type=tape recid=20220630_205957_LETT stage=start captureport=LETT timestamp=1656622797 filename=2022/06/30/20/20220630_205957_LETT localparty=2004@192.168.254.150 localentrypoint= remoteparty=2003@192.168.254.150 direction=out duration=0 service=orkaudio-siptap localip=10.0.254.6 remoteip=192.168.254.150 nativecallid=mIDP2eiJNC tags=holdduration:0 ondemand=false side=both live=true hostname=siptap

And I have confirmed through a packet capture that the rtp packets are on the ports mentioned.

Is there any specific user/group permission i have to set into that custom folder so that orkaudio writes the files to it? btw, I have set AudioFileOwner and AudioFileGroup as 'root'. Everything is also run as root.

pancitmiki commented 2 years ago

Just to note, I had to check out the latest code and compiled orkaudio and still the writing of audio files do not work. The odd thing is when I run orkaudio, not from local, but through docker, the audio files get written properly.

kingster commented 2 years ago

@pancitmiki Have you checked if the folder is writable or not?

I just tried the same and I can see files being created there

<config>
        <AudioOutputPath>/data/orkaudio/another_audio_folder</AudioOutputPath>
....
# tree /data/orkaudio/another_audio_folder/
/data/orkaudio/another_audio_folder/
└── 2022
    └── 07
        └── 01
            └── 09
                ├── 20220701_094457_NOVM.opus
                ├── 20220701_094458_NOVS.opus
                ├── 20220701_094458_NOVU.opus
                └── 20220701_094458_NOVV.opus
pancitmiki commented 2 years ago

@kingster - it is writable: root@siptap:~# tree /data /data └── orkaudio └── another_audio_folder

2 directories, 0 files root@siptap:~# image

Please note that this only happens with the compiled orkaudio. If i run the docker version, the writing works perfectly to the audio path.

I'm using Debian 11.3 for this. Thank you

kingster commented 2 years ago

@pancitmiki We mostly run on Ubuntu boxes, you can refer to the list of os and version combinations on which its supported / tested today.

I haven't personally tried Debian 11, but if you have complied it natively it should ideally work.

Can you give it a try on a supported Ubuntu/Debian using the pre-built binaries?

PS. I will try out on deb11 when I get some free time.

kingster commented 2 years ago

Hi @pancitmiki

I just compiled on a freshly configured deb11 VM and I can see the files being properly recorded in the destination folder

root@debian11-orkaudio:/oreka-src/orkaudio# cat /etc/debian_version
11.4

Recorded Files

root@debian11-orkaudio:/oreka-src/orkaudio# tree /data/orkaudio/another_audio_folder/
/data/orkaudio/another_audio_folder/
└── 2022
    └── 07
        └── 10
            └── 14
                ├── 20220710_143933_BIUY.wav
                ├── 20220710_143933_BIVA.wav
                ├── 20220710_143933_BIVC.wav
                ├── 20220710_143933_BIVD.wav
                ├── 20220710_143934_BIVE.wav
                └── 20220710_143934_BIVG.wav

4 directories, 6 files
root@debian11-orkaudio:/oreka-src/orkaudio# ls -ltrah /data/orkaudio/another_audio_folder/2022/07/10/14
total 468K
drwxr-xr-x 3 root root 4.0K Jul 10 14:39 ..
-rw-r--r-- 1 root root  83K Jul 10 14:39 20220710_143933_BIUY.wav
-rw-r--r-- 1 root root  49K Jul 10 14:39 20220710_143933_BIVD.wav
-rw-r--r-- 1 root root  76K Jul 10 14:39 20220710_143934_BIVG.wav
-rw-r--r-- 1 root root  81K Jul 10 14:39 20220710_143933_BIVA.wav
-rw-r--r-- 1 root root  96K Jul 10 14:39 20220710_143934_BIVE.wav
-rw-r--r-- 1 root root  68K Jul 10 14:39 20220710_143933_BIVC.wav
drwxr-xr-x 2 root root 4.0K Jul 10 14:39 .

Here is the exact /etc/orkaudio/config.xml that I had used for this test run

<config>
    <AudioOutputPath>/data/orkaudio/another_audio_folder</AudioOutputPath>
    <CapturePlugin>libvoip.so</CapturePlugin>
    <CapturePluginPath>/usr/lib</CapturePluginPath>
    <StorageAudioFormat>pcmwav</StorageAudioFormat>
    <DeleteNativeFile>yes</DeleteNativeFile>
    <TrackerHostname>localhost</TrackerHostname>
    <TrackerTcpPort>8080</TrackerTcpPort>
    <TlsClientCACertFile>/etc/orkaudio/certs/orkweb.pem</TlsClientCACertFile>
    <TapeProcessors>BatchProcessing, Reporting</TapeProcessors>
    <BatchProcessingEnhancePriority>true</BatchProcessingEnhancePriority>
    <AudioFileOwner>root</AudioFileOwner>
    <AudioFileGroup>root</AudioFileGroup>
    <AudioFilePermissions>644</AudioFilePermissions>

    <SipUAPlugin>
        <SipRecExtractFields>groupid,serviceproviderid</SipRecExtractFields>
        <SdpOfferAnswerMode>true</SdpOfferAnswerMode>
    </SipUAPlugin>

    <VoIpPlugin>
        <PcapSocketBufferSize>67108864</PcapSocketBufferSize>
        <IpFragmentsReassemble>true</IpFragmentsReassemble>
        <!-- <Devices>eth10</Devices> -->
         <PcapDirectory>/opt/pcap</PcapDirectory> 
    </VoIpPlugin>
</config>

I am unable to replicate the issue that you reported. Can you try on a fresh VM just to eliminate any other conflict that you might be having on your system?