Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Jonathan H
On 20 January 2018 at 23:30, Tim S wrote: > I have seen this take over 2 seconds before on a sluggish machine. Thanks - my host uses SSD and everything seems pretty quick, but I'll give it a 1 second pause. > you'd need to pipe that to a Google Speech API tunnel. > That's probably not something

Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Tim S
Also, be aware that by creating an audio file, you may need to insert a pause in your code before the file is: 1) written 2) flushed from cache to disk 3) registered as available to be opened by the OS I have seen this take over 2 seconds before on a sluggish machine. You can speed this up a bit

Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Antony Stone
On Saturday 20 January 2018 at 18:45:49, Jonathan H wrote: > Oh, what a good idea! That's exactly the kind of lateral thinking I > was hoping someone would come up with. > > I thought it was called MixMonitor, and tried to wrap my head around > it but couldn't. MixMonitor is related, but differe

Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Jonathan H
Oh, what a good idea! That's exactly the kind of lateral thinking I was hoping someone would come up with. I thought it was called MixMonitor, and tried to wrap my head around it but couldn't. I'll give this a go tomorrow and let you know what I come up with! Many thanks, Jonathan T On 20 Jan

Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Tim S
Just a quick and dirty thought, try the MONITOR application. Pseudo-code: Anchor-point PLAYBACK ("press or say") MONITOR (use the split audio files mode, not the mixed - this way you can roughly separate which side did the "talking") READ (audio file "1 to 5", try to grab one digit) STOPMONITOR

[asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Jonathan H
Hello, I want to start recording with a prompt of "press or say 1 to 5". If no DMTF is pressed, I want to send the recording to Google Speech to get the number back (got that part working already). If any dtmf key is pressed while Application_Record is running with option y, then the recording t

Re: [asterisk-users] Handling a long-running agi on hangup-handler?

2018-01-20 Thread Jonathan H
Thanks Eric, Well, with your guidance and after a fair bit of Googling, experimentation and headscratching, here is the Python version for anyone who wants it Also works with other long AGI background tasks to quickly return to the dialplan when something else is being processed. import os, s