[asterisk-users] Attatch monitor recording to a voicemail

Jared Smith jsmith at digium.com
Tue Feb 19 15:53:55 CST 2008


On Tue, 2008-02-19 at 20:59 +0000, Ben Willcox wrote:
> That gets me halfway there, but what I'm wondering about is the process 
> of moving of the recording to the correct place - i.e. should my 
> external program do the following:
> 
> 1) Check the users voicemail directory for existing message filenames
> 2) Copy the recording into the voicemail directory named msgxxxx.WAV 
> (incremented depending on number of existing messages)
> 3) Create the msgxxxx.txt file in the correct format
> 
> or is there another way that will sort this all out automatically? What 
> would happen if a real voicemail drops into that directory while my 
> external script is halfway through copying/creating for example...

No, you're on the right track.  

In a nutshell, you'll have to figure out whether app_voicemail looks a
the .txt files or the actually recordings first (when determining the
next message number), and have your program create that file first.  (As
I recall, it's the .txt files that app_voicemail looks at.)  Obviously
if you're not careful, there can be a race condition there, but the idea
is that if a caller were to leave a voicemail on the system, it would
see the file already there and choose the next number.
 
-- 
Jared Smith
Community Relations Manager
Digium, Inc.




More information about the asterisk-users mailing list