<div dir="ltr"><font color="#333333"><font face="verdana,sans-serif"><div>session.SetVariable("playback_terminators", "#");</div><div><div>session.RecordFile(fileName, 7000, 1000, 5);</div></div><div><br>
</div><div>This should also work if you need something more advanced.</div><div><br></div><div>var receivedFunction = (c, t) => (c == '#') ? "break" : "";</div><div>session.DtmfReceivedFunction += receivedFunction;</div>
<div>session.RecordFile(fileName, 7000, 1000, 5);</div><div>session.DtmfReceivedFunction -= receivedFunction;</div><div><br></div><div><br></div></font></font>Yitzchok<br>
<br><br><div class="gmail_quote">On Mon, Jun 6, 2011 at 9:31 PM, Bob Coleman <span dir="ltr"><<a href="mailto:bobc@devassert.com">bobc@devassert.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
You just set the playback_terminators to a # before you issue the record<br>
<br>
Cheers<br>
<br>
Bob<br>
<div><div></div><div class="h5"><br>
On Tue, Jun 7, 2011 at 11:29 AM, Frankie Yiu <<a href="mailto:frankie.k.yiu@gmail.com">frankie.k.yiu@gmail.com</a>> wrote:<br>
> Hi there,<br>
><br>
> I am working on a C# project and would like to record a message when the<br>
> user is ready to record. Here is the API for C#:<br>
> public int RecordFile(string file_name, int time_limit, int<br>
> silence_threshold, int silence_hits);<br>
><br>
> This API will stop the call only on timeout or when there is seconds of<br>
> silence. What I want to do is to let the user decide when to end the<br>
> recording by pressing a "#" key. So how can I do that? Do I have to use C<br>
> code to do that? (by sending event to C code side?)<br>
><br>
> Thanks,<br>
> Frankie<br>
><br>
<br>
</div></div>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>