[asterisk-users] problem when exiting from "record file" function without pressing the escape digit
Sammy Govind
govoiper at gmail.com
Fri Nov 4 04:04:47 CDT 2011
Hello again,
Hmmm...So you are in the AGI, I'm not much into AGI stuff, but let me
reproduce this in my local env...BTW which asterisk version you are using !
--
Regards,
Sammy
On Fri, Nov 4, 2011 at 1:43 PM, Yaprak Ayazoglu
<yaprak.ayazoglu at gmail.com>wrote:
> Hi Sammy,
>
> Sorry for the previous answer. I accidentally pressed the send button.
> So, I'm re-sending this mail with
> my additional information.
>
> Thank you for the reply.
>
> I'm not using MixMonitor or Monitor. I'm recording the file in the perl
> script that I call in my dial plan.
> When there is an incoming call, asterisk answers it and plays the
> wellcome.wav file. Later on, the
> "recording.pl" script is executed. In this script, I call the
> AGI->record_file(...) function and I require that
> the client must press the escape character ('#'). If the client presses
> the escape character in his/her phone
> wrong. If the client presses "the end of call" button in his/her phone,
> "record_file(...)" function keeps
> working 3 more seconds (because "silence = 3") and exits this function.
>
> When I listen to the recorded wav file, I hear the busy line sound(beeep
> beeep beeep ...)
>
> Isn't it possible for asterisk to understand the call is ended when the
> telephone is closed.
>
> My dialplan is as follows:
>
>
> #---------------------dialplan-------------------------------------------------
>
> exten => 500,1,Answer()
> exten => 500,2,Playback(wellcome) ; play the wellcome message
> exten => 500,3,AGI(recording.pl) ; Do the echo test
> exten => 500,4,Playback(demo-echodone) ; Let them know it's over
> exten => 500,5,Hangup
>
> #-----------------EOF dialplan--------------------------------
>
> The relevant part of the perl script is as follows:
>
> #---------------------recording.pl--------------------------------
> ....
> $filename = 'recordedSound';
> $format = 'wav';
> $digits = '#';
> $timeout = -1;
> $beep = 1;
> $offset = 0;
> $silence = 3;
> $AGI->record_file($filename, $format, $digits, $timeout, $beep, $offset,
> $beep, $silence);
> ....
> #---------------------EOF recording.pl--------------------------------
>
>
>
> On Fri, Nov 4, 2011 at 10:05 AM, Sammy Govind <govoiper at gmail.com> wrote:
>
>> Hey,
>>
>> How are you starting the recording? MixMonitor? or Monitor? or some
>> option in an application?
>> If you are using MixMonitor or anything alike then you should
>> StopMixMonitor when the call hits the "h" extension.
>>
>> Paste your dialplan relevant to the recording scenario to suggest you
>> something better.
>>
>> --
>> Regards,
>> Sammy
>>
>> On Fri, Nov 4, 2011 at 12:57 PM, Yaprak Ayazoglu <
>> yaprak.ayazoglu at gmail.com> wrote:
>>
>>> Hi everybody,
>>>
>>> I've been working on a project which records the voice of the incoming
>>> call.
>>>
>>> I use record_file function of asterisk as described below:
>>>
>>> RECORD FILE <filename> <format> <escape digits> <timeout> [offset
>>> samples] [BEEP] [s=<silence>]
>>>
>>> filename: record1
>>> format: wav
>>> escape digits: #
>>> timeout: -1
>>> offset samples: 0
>>> BEEP: 1
>>> silence: 3000
>>>
>>> *Please read the scenario for an incoming call:*
>>> *
>>> *
>>> - The user calls the asterisk
>>> - The user talks on the telephone
>>> - Ends the conversation without pressing the escape digit ("#")
>>>
>>> In this scenario, unfortunately, "record file" do not end automatically
>>> but since the "silence" field is
>>> 3 seconds, the record file function waits for 3 seconds to end.
>>>
>>> After record file function is ended, I listened the recorded file and I
>>> heard a "busy tone" sound in this file as
>>> "beeep beeeep beeep" continously.
>>>
>>> *My question:*
>>> *
>>> *
>>> Why do I need to hit the escape character ('#') to end the "record file"
>>> function? Is there any way, that
>>> asterisk shall detect that the caller has closed the telephone?
>>>
>>> Regards.
>>>
>>> --
>>> _____________________________________________________________________
>>> -- 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
>>>
>>
>>
>> --
>> _____________________________________________________________________
>> -- 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
>>
>
>
> --
> _____________________________________________________________________
> -- 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/20111104/48dd51bd/attachment.htm>
More information about the asterisk-users
mailing list