<html><head><title>Re: [Freeswitch-users] how to correctly use action application=&quot;record&quot;?</title>
</head>
<body>
<span style=" font-family:'Courier New'; font-size: 9pt;">Dobr&#253; den,<br>
<br>
And yet still I have a problem with the recording of both. <br>
Simple dialplan.<br>
<br>
&lt;include&gt;<br>
&lt;context name="centos"&gt;<br>
 &nbsp;&lt;extension name="from-centos"&gt;<br>
 &nbsp; &lt;condition field="destination_number" expression="^(onops)$"&gt;<br>
 &nbsp; &nbsp;&lt;action application="export" data="nolocal:absolute_codec_string=OPUS,PCMU,PCMA,VP8"/&gt;<br>
 &nbsp; &nbsp;&lt;action application="set" data="enable_file_write_buffering=false"/&gt;<br>
 &nbsp; &nbsp;&lt;action application="set" data="record_concat_video=true"/&gt;<br>
 &nbsp; &nbsp;&lt;action application="export" data="execute_on_answer=record_session $${base_dir}/recordings/${strftime(%Y%m%d_%H%M%S)}_${caller_id_number}_${destination_number}.mp4"/&gt;<br>
 &nbsp; &nbsp; &lt;action application="answer"/&gt;<br>
 &nbsp; &nbsp;&lt;action application="sleep" data="1000"/&gt;<br>
 &nbsp; &nbsp;&lt;action application="bridge" data="user/1004@sip1.applicloud.com"/&gt;<br>
 &nbsp; &nbsp;&lt;action application="hangup"/&gt;<br>
 &nbsp; &lt;/condition&gt;<br>
 &nbsp;&lt;/extension&gt;<br>
&lt;/context&gt;<br>
&lt;/include&gt;<br>
<br>
To record using mod_av. The file is created and written. But the video begins somewhere in the middle. The sound is recorded a maximum of 20 seconds. After just a video without sound.<br>
<br>
Video Sample <br>
(</span><a style=" font-family:'Courier New'; font-size: 9pt;" href="https://dl.dropboxusercontent.com/u/7843993/20150616_162859_onops123_onops.mp4">https://dl.dropboxusercontent.com/u/7843993/20150616_162859_onops123_onops.mp4</a><span style=" font-family:'Courier New'; font-size: 9pt;"> and </span><a style=" font-family:'Courier New'; font-size: 9pt;" href="https://dl.dropboxusercontent.com/u/7843993/20150616_163542_onops123_onops.mp4)">https://dl.dropboxusercontent.com/u/7843993/20150616_163542_onops123_onops.mp4)</a><br>
<br>
<br>
<br>
<span style=" font-family:'Courier New'; font-size: 9pt;"><b>LOG<br>
<br>
</b>2015-06-16 16:35:57.791516 [INFO] avformat.c:1483 use video codec: [28] h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)<br>
2015-06-16 16:35:57.791516 [NOTICE] avformat.c:401 sample_rate: 8000 nb_samples: 1024<br>
Output #0, mp4, to '/usr/local/freeswitch/recordings/20150616_163542_onops123_onops.mp4':<br>
 &nbsp; &nbsp;Stream #0.0: Audio: libvo_aacenc, 8000 Hz, mono, s16, 131 kb/s<br>
2015-06-16 16:35:57.791516 [INFO] avformat.c:1508 Opening File [/usr/local/freeswitch/recordings/20150616_163542_onops123_onops.mp4] 8000hz &nbsp;with VIDEO<br>
2015-06-16 16:35:57.841518 [NOTICE] switch_core_io.c:1182 Activating write resampler<br>
2015-06-16 16:35:57.861516 [INFO] switch_rtp.c:3006 Changing video DTLS state from HANDSHAKE to SETUP<br>
2015-06-16 16:35:57.871522 [INFO] switch_rtp.c:2915 video Fingerprint Verified.<br>
2015-06-16 16:35:57.871522 [INFO] switch_rtp.c:3495 Activating Video Secure RTP SEND<br>
2015-06-16 16:35:57.871522 [INFO] switch_rtp.c:3473 Activating Video Secure RTP RECV<br>
2015-06-16 16:35:57.871522 [INFO] switch_rtp.c:2955 Changing video DTLS state from SETUP to READY<br>
2015-06-16 16:35:57.891517 [INFO] switch_rtp.c:3006 Changing audio DTLS state from HANDSHAKE to SETUP<br>
2015-06-16 16:35:57.891517 [INFO] switch_rtp.c:2915 audio Fingerprint Verified.<br>
2015-06-16 16:35:57.891517 [INFO] switch_rtp.c:3495 Activating Audio Secure RTP SEND<br>
2015-06-16 16:35:57.891517 [INFO] switch_rtp.c:3473 Activating Audio Secure RTP RECV<br>
2015-06-16 16:35:57.891517 [INFO] switch_rtp.c:2955 Changing audio DTLS state from SETUP to READY<br>
2015-06-16 16:35:57.931516 [NOTICE] switch_core_io.c:1182 Activating write resampler<br>
2015-06-16 16:35:57.961517 [INFO] switch_core_media.c:1985 sofia/internal/016q4sbo@cfb2es5v5rhr.invalid Sync Audio and Video Jitterbuffer to 200ms 3 Video Frames FPS 15<br>
using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64<br>
profile High, level 5.2<br>
264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=60 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=660 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00<br>
2015-06-16 16:35:57.981516 [INFO] avformat.c:1844 use video codec implementation Video: libx264, yuv420p, 640x480, q=-1--1, 660 kb/s<br>
2015-06-16 16:35:57.981516 [NOTICE] avformat.c:463 video thread start<br>
<br>
<br>
<br>
<span style=" font-family:'calibri'; color: #c0c0c0;"><i>-- <br>
S pozdravem,<br>
Ing.Denis Jakovlev &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
mob.tel. 775-415-382<br>
<br>
pond&#283;l&#237; 15. &#269;ervna 2015, 17:18:26, napsal jste:<br>
<br>
</i></span></span><table>
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'courier new'; font-size: 9pt;">You should move it to record an answer via the execute_on_answer variables, because you've started the recording before the other side has picked up.<br>
<br>
On Mon, Jun 15, 2015 at 10:15 AM, Denis Jakovlev &lt;</span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:yadenis@seznam.cz">yadenis@seznam.cz</a><span style=" font-family:'courier new'; font-size: 9pt;">&gt; wrote:<br>
Hello,<br>
<br>
Thank you. It looks that trying to do what I need. But not quite to the end (see picture). <br>
<br>
<br>
dialplan looks like this.<br>
<br>
 &nbsp; &lt;context name="default"&gt;<br>
 &nbsp; &nbsp; &lt;extension name="onopsession963"&gt;<br>
 &nbsp; &nbsp; &nbsp; &lt;condition field="destination_number" expression="^(onopses963)$"/&gt;<br>
 &nbsp; &nbsp; &nbsp; &lt;condition field="username" expression="^(onop2618|onop2619)$"&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="set" data="enable_file_write_buffering=false"/&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="set" data="record_concat_video=true"/&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="record_session" data="/usr/local/freeswitch/recordings/${strftime(%Y%m%d_%H%M%S)}_${caller_id_number}_${destination_number}.mp4"/&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="bridge" data="{ignore_early_media=true}sofia/internal/onop2618%${sip_profile}"/&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="hangup"/&gt;<br>
 &nbsp; &nbsp; &nbsp; &lt;/condition&gt;<br>
 &nbsp; &nbsp; &lt;/extension&gt;<br>
 &nbsp; &lt;/context&gt;<br>
<br>
<br>
Where I make a mistake?<br>
<br>
<span style=" color: #c0c0c0;"><i>-- <br>
S pozdravem,<br>
Ing.Denis Jakovlev &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
</i></span></span><a style=" color: #c0c0c0; font-family:'courier new'; font-size: 9pt; font-style: Italic;" href="http://mob.tel">mob.tel</a><span style=" font-family:'courier new'; font-size: 9pt; color: #c0c0c0;"><i>. 775-415-382<br>
<br>
pond&#283;l&#237; 15. &#269;ervna 2015, 16:52:19, napsal jste:<br>
<br>
</i></span><table>
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'courier new'; font-size: 9pt;">record_concat_video=true<br>
<br>
On Mon, Jun 15, 2015 at 9:40 AM, Denis Jakovlev &lt;</span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:yadenis@seznam.cz">yadenis@seznam.cz</a><span style=" font-family:'courier new'; font-size: 9pt;">&gt; wrote:<br>
Hi all,<br>
<br>
So through a record_session video is written. But the video is recorded on only one side. How do the two to write two streams?<br>
<br>
Video writes mode_av if it matters.<br>
<br>
<span style=" color: #c0c0c0;"><i>-- <br>
S pozdravem,<br>
Ing.Denis Jakovlev &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
</i></span></span><a style=" color: #c0c0c0; font-family:'courier new'; font-size: 9pt;" href="http://mob.tel">mob.tel</a><span style=" font-family:'courier new'; font-size: 9pt; color: #c0c0c0;"><i>. 775-415-382<br>
<br>
p&#225;tek 12. &#269;ervna 2015, 17:18:53, napsal jste:<br>
<br>
</i></span><table>
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'courier new'; font-size: 9pt;">The record app is for a single channel, like you'd use if you were asking someone to record a voice message. They record their message and press a key when they're done. Perhaps you're needing the record_session app?<br>
<br>
-MC<br>
<br>
On Fri, Jun 12, 2015 at 4:18 AM, Denis Jakovlev &lt;</span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:yadenis@seznam.cz">yadenis@seznam.cz</a><span style=" font-family:'courier new'; font-size: 9pt;">&gt; wrote:<br>
Hi All,<br>
<br>
I use the version 1.7 on Debian 8. To record a video using mod_av. <br>
Command in the dialplan<br>
&lt;action application="record" data="/usr/local/freeswitch/recordings/${strftime(%Y%m%d_%H%M%S)}_${caller_id_number}_${destination_number}.mp4"/&gt;<br>
This works fine.<br>
<br>
The question in the following. How to use the account when calling someone. For example from 1004 in 1006. Or conferences. How to correctly use record? <br>
Command "record" I have put before the bridge, or the launch of the conference? After? If I do before starting the conference, the conference itself will not start. If I make the command after, will not start recording. How to use it properly? <br>
<br>
PS: Bridget works the same way.<br>
<br>
<br>
<br>
<span style=" color: #c0c0c0;"><i>-- <br>
S pozdravem,<br>
Ing.Denis Jakovlev &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
</i></span></span><a style=" color: #c0c0c0; font-family:'courier new'; font-size: 9pt;" href="http://mob.tel">mob.tel</a><span style=" font-family:'courier new'; font-size: 9pt; color: #c0c0c0;"><i>. 775-415-382<br>
<br>
<br>
</i><span style=" color: #000000;">_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
</span></span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
<br>
<span style=" font-family:'courier new'; font-size: 9pt;">Official FreeSWITCH Sites<br>
</span><a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.cluecon.com">http://www.cluecon.com</a><br>
<br>
<span style=" font-family:'courier new'; font-size: 9pt;">FreeSWITCH-users mailing list<br>
</span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
<span style=" font-family:'courier new'; font-size: 9pt;">UNSUBSCRIBE:</span><a style=" font-family:'courier new'; font-size: 9pt;" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitch.org">http://www.freeswitch.org</a></td>
</tr>
</table>
<br><br>
<br>
<span style=" font-family:'courier new'; font-size: 9pt;">_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
</span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
<br>
<span style=" font-family:'courier new'; font-size: 9pt;">Official FreeSWITCH Sites<br>
</span><a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.cluecon.com">http://www.cluecon.com</a><br>
<br>
<span style=" font-family:'courier new'; font-size: 9pt;">FreeSWITCH-users mailing list<br>
</span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
<span style=" font-family:'courier new'; font-size: 9pt;">UNSUBSCRIBE:</span><a style=" font-family:'courier new'; font-size: 9pt;" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<br>
<br>
<br>
<span style=" font-family:'courier new'; font-size: 9pt;">-- <br>
<span style=" font-size: 14pt;"><b><i>Brian West<br>
</i></b></span></span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:brian@freeswitch.org">brian@freeswitch.org</a><br>
<span style=" font-family:'courier new'; font-size: 9pt;"><b><i>Twitter: @FreeSWITCH , @briankwest<br>
</i></b></span><a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitchbook.com">http://www.freeswitchbook.com</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitchcookbook.com">http://www.freeswitchcookbook.com</a><br>
<span style=" font-family:'courier new'; font-size: 9pt;">ClueCon 2015 </span><a style=" font-family:'courier new'; font-size: 9pt;" href="https://www.cluecon.com/call-for-speakers/">Call for Speakers</a><span style=" font-family:'courier new'; font-size: 9pt;"> | </span><a style=" font-family:'courier new'; font-size: 9pt;" href="https://freeswitch.com/cart.php?gid=1">Register</a><span style=" font-family:'courier new'; font-size: 9pt;"> TODAY! | Reddit: </span><a style=" font-family:'courier new'; font-size: 9pt;" href="https://www.reddit.com/r/freeswitch">/r/freeswitch</a><br>
<span style=" font-family:'courier new'; font-size: 9pt;"><b>T:</b></span><a style=" font-family:'courier new'; font-size: 9pt;" href="tel:%2B19184209001">+19184209001</a><span style=" font-family:'courier new'; font-size: 9pt;"> | <b>F:</b></span><a style=" font-family:'courier new'; font-size: 9pt;" href="tel:%2B19184209002">+19184209002</a><span style=" font-family:'courier new'; font-size: 9pt;"> | <b>M:</b>+1918424WEST (9378)<br>
<b>iNUM:</b>+883 5100 1420 9001 | <b>ISN:</b>410*543 | <b>Skype:</b>briankwest</td>
</tr>
</table>
<br><br>
<span style=" font-family:'courier new'; font-size: 9pt;">_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
</span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
<br>
<span style=" font-family:'courier new'; font-size: 9pt;">Official FreeSWITCH Sites<br>
</span><a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.cluecon.com">http://www.cluecon.com</a><br>
<br>
<span style=" font-family:'courier new'; font-size: 9pt;">FreeSWITCH-users mailing list<br>
</span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
<span style=" font-family:'courier new'; font-size: 9pt;">UNSUBSCRIBE:</span><a style=" font-family:'courier new'; font-size: 9pt;" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<br>
<br>
<br>
<span style=" font-family:'courier new'; font-size: 9pt;">-- <br>
<span style=" font-size: 14pt;"><b><i>Brian West<br>
</i></b></span></span><a style=" font-family:'courier new'; font-size: 9pt;" href="mailto:brian@freeswitch.org">brian@freeswitch.org</a><br>
<span style=" font-family:'courier new'; font-size: 9pt;"><b><i>Twitter: @FreeSWITCH , @briankwest<br>
</i></b></span><a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitchbook.com">http://www.freeswitchbook.com</a><br>
<a style=" font-family:'courier new'; font-size: 9pt;" href="http://www.freeswitchcookbook.com">http://www.freeswitchcookbook.com</a><br>
<span style=" font-family:'courier new'; font-size: 9pt;">ClueCon 2015 </span><a style=" font-family:'courier new'; font-size: 9pt;" href="https://www.cluecon.com/call-for-speakers/">Call for Speakers</a><span style=" font-family:'courier new'; font-size: 9pt;"> | </span><a style=" font-family:'courier new'; font-size: 9pt;" href="https://freeswitch.com/cart.php?gid=1">Register</a><span style=" font-family:'courier new'; font-size: 9pt;"> TODAY! | Reddit: </span><a style=" font-family:'courier new'; font-size: 9pt;" href="https://www.reddit.com/r/freeswitch">/r/freeswitch</a><br>
<span style=" font-family:'courier new'; font-size: 9pt;"><b>T:</b>+19184209001 | <b>F:</b>+19184209002 | <b>M:</b>+1918424WEST (9378)<br>
<b>iNUM:</b>+883 5100 1420 9001 | <b>ISN:</b>410*543 | <b>Skype:</b>briankwest</td>
</tr>
</table>
</body></html>