<div>Hello again,</div>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 !<div>--<br><div>Regards,</div><div>Sammy<br><div class="gmail_quote">
On Fri, Nov 4, 2011 at 1:43 PM, Yaprak Ayazoglu <span dir="ltr"><<a href="mailto:yaprak.ayazoglu@gmail.com">yaprak.ayazoglu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<span><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">Hi Sammy,</div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">
<br></div><div><font color="#222222" face="arial, sans-serif" size="2">Sorry for the previous answer. I </font><font color="#222222" face="arial, sans-serif">accidentally</font><font color="#222222" face="arial, sans-serif" size="2"> pressed the send button. So, I'm re-sending this mail with</font></div>
<div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">my additional information.</div><div class="im"><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px"><br></div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">
Thank you for the reply.</div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px"><br></div></div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">I'm not using MixMonitor or Monitor. I'm recording the file in the perl script that I call in my dial plan.</div>
<div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">When there is an incoming call, asterisk answers it and plays the wellcome.wav file. Later on, the</div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">
"<a href="http://recording.pl" target="_blank">recording.pl</a>" script is executed. In this script, I call the AGI->record_file(...) function and I require that</div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">
the client must press the escape character ('#'). If the client presses the escape character in his/her phone</div></span><span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:14px">wrong. If the client presses "the end of call" button in his/her phone, "record_file(...)" function keeps </span><div>
<span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:14px">working 3 more seconds (because "silence = 3") and exits this function. </span></div>
<div><span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:14px"><br></span></div><div><span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:14px">When I listen to the recorded wav file, I hear the busy line sound(beeep beeep beeep ...) </span></div>
<div><span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:14px"><br></span></div><div><span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:14px">Isn't it possible for asterisk to understand the call is ended when the telephone is closed.</span></div>
<div><span><div class="im"><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px"><br></div><font size="2" style="color:rgb(34, 34, 34);font-family:arial, sans-serif">My dialplan is as follows:</font><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">
<br></div></div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">#---------------------dialplan-------------------------------------------------</div><div class="im"><div><span style="background-color:rgb(255, 255, 255)"><pre style="font-family:arial, sans-serif;color:rgb(34, 34, 34);font-size:13px;white-space:pre-wrap;text-align:left;overflow-x:auto;overflow-y:auto">
<span style="font-size:15px">exten => 500,1,Answer()
exten => 500,2,Playback(wellcome) ; play the wellcome message
exten => 500,3,AGI(<a href="http://recording.pl/" style="color:rgb(17, 85, 204)" target="_blank">recording.pl</a>) ; Do the echo test
exten => 500,4,Playback(demo-echodone) ; Let them know it's over
exten => 500,5,Hangup</span></pre></span></div></div></span><span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:14px">#-----------------EOF dialplan--------------------------------</span><span><div>
<span style="background-color:rgb(255, 255, 255)"><pre style="white-space:pre-wrap;text-align:left;overflow-x:auto;overflow-y:auto"><span style="font-size:15px"><font face="arial, helvetica, sans-serif">The relevant part of the perl script is as follows:</font></span></pre>
</span></div></span><span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:14px">#---------------------recording.pl--------------------------------</span><div>
<font color="#222222" face="arial, sans-serif"><span style="font-size:15px">....</span></font></div><div><div><font face="arial, sans-serif" size="3">$filename = 'recordedSound';</font></div>
<div><font face="arial, sans-serif" size="3">$format = 'wav';</font></div><div><font face="arial, sans-serif" size="3">$digits = '#';</font></div><div><font face="arial, sans-serif" size="3">$timeout = -1;</font></div>
<div><font face="arial, sans-serif" size="3">$beep = 1;</font></div><div><font face="arial, sans-serif" size="3">$offset = 0;</font></div><div><font face="arial, sans-serif" size="3">$silence = 3;</font></div>
<span style="font-family:arial, sans-serif;background-color:rgb(255, 255, 255);font-size:medium"><a name="1336dbf76184f722_$AGI->record_file($filename,_$format,_$digits,_$timeout,_$beep,_$offset,_$beep,_$silence)">$AGI->record_file($filename, $format, $digits, $timeout, $beep, $offset, $beep, $silence);</a></span><div>
<font face="arial, sans-serif" size="3">....</font></div><div><font face="arial, sans-serif" size="3"><span style="color:rgb(34, 34, 34);font-size:14px">#---------------------EOF recording.pl--------------------------------</span></font></div>
<div><span style="color:rgb(34, 34, 34);font-family:arial, sans-serif"><div><span style="background-color:rgb(255, 255, 255)"><pre style="white-space:pre-wrap;text-align:left;overflow-x:auto;overflow-y:auto"><span style="font-size:15px"><br>
</span></pre></span></div></span><br><div class="gmail_quote"><div class="im">On Fri, Nov 4, 2011 at 10:05 AM, Sammy Govind <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>></span> wrote:<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hey,</div><div><br></div>How are you starting the recording? MixMonitor? or Monitor? or some option in an application?<div>
If you are using MixMonitor or anything alike then you should StopMixMonitor when the call hits the "h" extension. </div>
<div><br></div><div>Paste your dialplan relevant to the recording scenario to suggest you something better.</div><div> </div><div>--</div><div>Regards,</div><div>Sammy<br><br><div class="gmail_quote"><div><div>
On Fri, Nov 4, 2011 at 12:57 PM, Yaprak Ayazoglu <span dir="ltr"><<a href="mailto:yaprak.ayazoglu@gmail.com" target="_blank">yaprak.ayazoglu@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">Hi everybody,<div>
<br></div><div>I've been working on a project which records the voice of the incoming call.</div>
<div><br></div><div>I use record_file function of asterisk as described below:</div><div><br></div><div><span style="color:rgb(153, 0, 0);font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;background-color:rgb(199, 208, 217)">RECORD FILE <filename> <format> <escape digits> <timeout> [offset samples] [BEEP] [s=<silence>]</span></div>
<div><span style="color:rgb(153, 0, 0);font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;background-color:rgb(199, 208, 217)"><br></span></div><div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;background-color:rgb(255, 255, 255)">filename: record1</span></div>
<div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;background-color:rgb(255, 255, 255)">format: wav</span></div><div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;background-color:rgb(255, 255, 255)">escape digits: #</span></div>
<div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;background-color:rgb(255, 255, 255)">timeout: -1</span></div><div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;background-color:rgb(255, 255, 255)">offset samples: 0</span></div>
<div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;background-color:rgb(255, 255, 255)">BEEP: 1</span></div><div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;background-color:rgb(255, 255, 255)">silence: 3000</span></div>
<div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;background-color:rgb(255, 255, 255)"><br></span></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px"><u>Please read the scenario for an incoming call:</u></span></font></div>
<div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px"><u><br></u></span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px">- The user calls the asterisk</span></font></div>
<div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px">- The user talks on the telephone</span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px">- Ends the conversation without pressing the escape digit ("#")</span></font></div>
<div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px"><br></span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px">In this scenario, unfortunately, "record file" do not end automatically but since the "silence" field is</span></font></div>
<div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px">3 seconds, the record file function waits for 3 seconds to end.</span></font></div><div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px"><br>
</span></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px">After record file function is ended, I listened the recorded file and I heard a "busy tone" sound in this file as</span></font></div>
<div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px">"beeep beeeep beeep" continously.</span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px"><br>
</span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px"><u>My question:</u></span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px"><u><br>
</u></span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px">Why do I need to hit the escape character ('#') to end the "record file" function? Is there any way, that</span></font></div>
<div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px">asterisk shall detect that the caller has closed the telephone?</span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px"><br>
</span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif"><span style="font-size:12px">Regards.</span></font></div></span>
<br></div></div><span><font color="#888888">--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></font></span></blockquote></div><br></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div></div></div><br></div></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div></div>