Hi all, Here is the script i want to make - Caller call to a number to record a message - Asterisk answer and start recording message as following + User press * to start recording + Record is finished if: + User press # + OR message duration reach 60 second + Hangup How do you counting down 60s, and how to detect # (i make a test using Read() but it cant read #) Thanks in advance Quyps
I figured that out, i can use monitor() function to record and using a loop to count down 60s. But I dont think it is best solution, any suggestion is appreciated. And still, how can i capture '#'? On Fri, 2010-03-12 at 15:03 +0700, Pham Quy wrote:> Hi all, > > Here is the script i want to make > > - Caller call to a number to record a message > - Asterisk answer and start recording message as following > + User press * to start recording > + Record is finished if: > + User press # > + OR message duration reach 60 second > + Hangup > > How do you counting down 60s, and how to detect # (i make a test using > Read() but it cant read #) > > Thanks in advance > Quyps
On Sunday 04 April 2010 22:49:44 Pham Quy wrote:> I records a audio file as alaw format, i tried to play it with several > audio player such as VLC, GNOME player, QUicktime,..but have no success. > > Do you know which player can play alaw file? > > I have a though that generated alaw file by asterisk seem not have > header, therefore none of my tools can play it?Correct, alaw files (as well as most Asterisk formats) have no header, so tools that require one may not function correctly. You could of course use a tool such as Audacity or sox to read the file and convert it into another format, if that was your need. However, Asterisk will not correctly play a soundfile which is not in its expected format, which is mostly headerless (notable exceptions are wav, wav49, ogg, and mp3). -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com & www.asterisk.org
hi Tighlman, That is all i need to know. Thanks. Quyps On Mon, Apr 5, 2010 at 11:53 AM, Tilghman Lesher <tlesher at digium.com> wrote:> On Sunday 04 April 2010 22:49:44 Pham Quy wrote: > > I records a audio file as alaw format, i tried to play it with several > > audio player such as VLC, GNOME player, QUicktime,..but have no success. > > > > Do you know which player can play alaw file? > > > > I have a though that generated alaw file by asterisk seem not have > > header, therefore none of my tools can play it? > > Correct, alaw files (as well as most Asterisk formats) have no header, so > tools that require one may not function correctly. You could of course use > a > tool such as Audacity or sox to read the file and convert it into another > format, if that was your need. However, Asterisk will not correctly play a > soundfile which is not in its expected format, which is mostly headerless > (notable exceptions are wav, wav49, ogg, and mp3). > > -- > Tilghman Lesher > Digium, Inc. | Senior Software Developer > twitter: Corydon76 | IRC: Corydon76-dig (Freenode) > Check us out at: www.digium.com & www.asterisk.org > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100405/c262fb94/attachment.htm