[asterisk-users] Playback don't play the beginning if a sound file

Yves Räber yraber at mailup.net
Mon May 5 03:41:31 CDT 2008


Hello,

I'm using this dialplan to let user record messages. The recording part
works quite fine, but there is something strange :

When Asterisk plays vm-torerecord, it misses the beginning, I only hear
the few last seconds (vm-torerecord is a sound file that was in the
asterisk-sounds cvs repo, but I simply renamed it). 

I've looked on voip-info.org, googled anything I could think about and
checked on bugs.digium.com, I don't have any clue of what's going on.

Does anyone has an idea ? Thanks.


Here is my dialplan :

[record]
exten => s,1,Answer
exten => s,n,Set(counter=1)
exten => s,n,NoOp(${counter})
exten => s,n,GotoIf($[${counter} = 1]?record)
exten => s,n(next),System(/bin/rm
-f /var/lib/asterisk/sounds/${RECORDED_FILE}.wav)
exten => s,n(record),Set(counter=$[${counter}+1]);
exten => s,n,GotoIf($[${counter} > 3]?i,1)
exten => s,n,Playback(vm-intro)
exten => s,n,Record(webrecord%d:wav,10,60)
exten => s,n,Wait(1)
exten => s,n,Set(CDR(userfield)=${RECORDED_FILE})
exten => s,n,Playback(${RECORDED_FILE})
exten => s,n(askretry),Background(vm-torerecord)
exten => s,n,WaitExten(5)
exten => i,1,Goto(s,askretry)
exten => 3,1,Goto(s,next)
exten => t,1,Set(CDR(userfield)=${RECORDED_FILE})
exten => t,n,Hangup




More information about the asterisk-users mailing list