I am making an outgoing call and trying to get recording of only incoming audio , but after a lot of searching I cannot get it done.
I tried using b
flag with MixMonitor , but it creates an empty file without any recording, I was able to get full recording with both the incoming and outgoing audio , but not only the incoming audio.
I did tried using r(File) , like r(/tmp/audio-incoming) but this gives me an error saying cannot find file
Here is my dialplan
[call-out]
exten => _X.,1,NoOp(Outgoing Call to ${EXTEN})
same => n,Set(CALLERID(num)=+18802388194)
same => n,Set(DIAL_NUMBER=${EXTEN})
same => n,Dial(PJSIP/${DIAL_NUMBER}@CallTWILIO)
same => n,NoOp(Call answered, starting MixMonitor)
same => n,MixMonitor(/tmp/asterisk_audio-${UNIQUEID}-fullAudio.wav,i)
same => n,AGI(agi://localhost:4573)
same => n(hangup),Hangup()
I tried using r(file)
[call-out]
exten => _X.,1,NoOp(Outgoing Call to ${EXTEN})
same => n,Set(CALLERID(num)=+18802388194)
same => n,Set(DIAL_NUMBER=${EXTEN})
same => n,Set(FILENAME=/tmp/${UNIQUEID}-incoming.wav)
same => n,Monitor(wav,r(${FILENAME}),b)
same => n,Dial(PJSIP/${DIAL_NUMBER}@CallTWILIO)
same => n,NoOp(Call ended with DIALSTATUS: ${DIALSTATUS})
same => n,StopMonitor()
same => n,AGI(agi://localhost:4573)
same => n,Hangup()
gives me error
== Begin MixMonitor Recording PJSIP/CallTWILIO-00000018
[Aug 7 20:17:35] WARNING[4024][C-0000000d]: file.c:1566 ast_writefile: No such format 'wav)'
[Aug 7 20:17:35] ERROR[4024][C-0000000d]: app_mixmonitor.c:703 mixmonitor_save_prep: Cannot open /var/spool/asterisk/monitor/r(/tmp/asteris
k_audio-1723061842.48-incoming.wav)```
I have Asterisk 20.9.1 running on Ubuntu 22.04
I am really lost here.