<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">Hi Michael,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">

<br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">Thanks you for your input. </div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">

<br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">I can confirm that inserting a silence stream prior to the recording works in the same way that playing some actual audio does, resulting in a successful recording. Worth noting is that there appears to be a duration threshold where if the duration is too short (in my case &lt;100ms) then the recording come out blank - presumably this is because the stream has not had enough time to prepare the channel before recording starts.</div>

<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">In response to your question the call is a remotely registered VOIP handset (OpenSIPS) dialling directly into FreeSWITCH with all call control handled by ESL. When I stated &quot;initialise the RTP stream for recording&quot; that is my way of trying to communicate that its my understanding that this is what playing the audio file (or silence stream following your comment) was performing in FreeSWITCH.</div>

<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">I feel that you have answered my question however i wanted to post some fs_cli output to confirm that this is expected behaviour (or something I should learn to expect!). The lines in red are what i have called &quot;RTP stream initialise&quot;. </div>

<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><br></div><div class="gmail_default"><div class="gmail_default"><font color="#333399" face="verdana, sans-serif"><b>Call with a silence stream (This records successfully)</b></font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif"><br></font></div><div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:10:35.830044 [DEBUG] switch_ivr.c:612 sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> Command Execute playback(silence_stream://1000)</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">EXECUTE sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> playback(silence_stream://1000)</font></div><div class="gmail_default">

<font face="verdana, sans-serif" color="#ff0000">2013-10-01 15:10:35.830044 [DEBUG] switch_ivr_play_say.c:1308 Codec Activated L16@8000hz 1 channels 20ms</font></div><div class="gmail_default"><font face="verdana, sans-serif" color="#ff0000">2013-10-01 15:10:35.860032 [DEBUG] switch_core_session.c:998 Send signal sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> [BREAK]</font></div>

<div class="gmail_default"><font face="verdana, sans-serif" color="#ff0000">2013-10-01 15:10:35.860032 [DEBUG] switch_core_session.c:998 Send signal sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> [BREAK]</font></div>

<div class="gmail_default"><font face="verdana, sans-serif" color="#ff0000">2013-10-01 15:10:35.860032 [DEBUG] switch_core_session.c:998 Send signal sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> [BREAK]</font></div>

<div class="gmail_default"><font face="verdana, sans-serif" color="#ff0000">2013-10-01 15:10:35.880047 [DEBUG] switch_rtp.c:3704 Correct ip/port confirmed.</font></div><div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:10:35.880047 [DEBUG] sofia.c:5685 Channel sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> entering state [ready][200]</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:10:36.820081 [DEBUG] switch_ivr_play_say.c:1693 done playing file silence_stream://1000</font></div><div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:10:36.820081 [DEBUG] switch_ivr.c:612 sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> Command Execute record(/usr/share/sounds/recordings/test.wav 10 200)</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">EXECUTE sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> record(/usr/share/sounds/recordings/test.wav 10 200)</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:10:36.820081 [DEBUG] switch_ivr_play_say.c:599 Raw Codec Activated</font></div><div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:10:36.820081 [DEBUG] switch_core_codec.c:219 sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> Push codec L16:70</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:10:39.920081 [DEBUG] switch_core_session.c:998 Send signal sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> [BREAK]</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:10:39.940081 [NOTICE] sofia.c:716 Hangup sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> [CS_EXECUTE] [NORMAL_CLEARING]</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif"><br></font></div><div class="gmail_default"><font color="#333399" face="verdana, sans-serif"><b>Call without a silence stream (This records silence)</b></font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif"><br></font></div><div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:13:06.660045 [DEBUG] switch_ivr.c:612 sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> Command Execute playback(silence_stream://10)</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">EXECUTE sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> playback(silence_stream://10)</font></div><div class="gmail_default">

<font face="verdana, sans-serif" color="#ff0000">2013-10-01 15:13:06.660045 [DEBUG] switch_ivr_play_say.c:1308 Codec Activated L16@8000hz 1 channels 20ms</font></div><div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:13:06.680011 [DEBUG] switch_ivr_play_say.c:1693 done playing file silence_stream://10</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:13:06.680011 [DEBUG] switch_ivr.c:612 sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> Command Execute record(/usr/share/sounds/recordings/test.wav 10 200)</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">EXECUTE sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> record(/usr/share/sounds/recordings/test.wav 10 200)</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:13:06.680011 [DEBUG] switch_ivr_play_say.c:599 Raw Codec Activated</font></div><div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:13:06.680011 [DEBUG] switch_core_codec.c:219 sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> Push codec L16:70</font></div>

<div class="gmail_default"><font face="verdana, sans-serif" color="#ff0000">2013-10-01 15:13:06.760081 [DEBUG] switch_core_session.c:998 Send signal sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> [BREAK]</font></div>

<div class="gmail_default"><font face="verdana, sans-serif" color="#ff0000">2013-10-01 15:13:06.760081 [DEBUG] switch_core_session.c:998 Send signal sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> [BREAK]</font></div>

<div class="gmail_default"><font face="verdana, sans-serif" color="#ff0000">2013-10-01 15:13:06.760081 [DEBUG] switch_core_session.c:998 Send signal sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> [BREAK]</font></div>

<div class="gmail_default"><font face="verdana, sans-serif" color="#ff0000">2013-10-01 15:13:06.780071 [DEBUG] switch_rtp.c:3704 Correct ip/port confirmed.</font></div><div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:13:06.780071 [DEBUG] sofia.c:5685 Channel sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> entering state [ready][200]</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:13:09.680081 [DEBUG] switch_core_codec.c:244 sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> Restore previous codec PCMA:8.</font></div>

<div class="gmail_default"><font color="#333399" face="verdana, sans-serif">2013-10-01 15:13:09.680081 [DEBUG] switch_ivr.c:612 sofia/internal/<a href="mailto:3333320116@x-onsip.com">3333320116@x-onsip.com</a> Command Execute park()</font></div>

<div style="color:rgb(51,51,153);font-family:verdana,sans-serif;font-size:small"><br></div><div style="color:rgb(51,51,153);font-family:verdana,sans-serif;font-size:small">Please do let me know if there is anything interesting about the output i am seeing above or that i should apply caution to!</div>

</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">

Thanks,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">

Callum</div></div><div class="gmail_extra"><br clear="all"><div><pre style="word-wrap:break-word;white-space:pre-wrap"><font face="verdana, sans-serif" color="#333399">______________________________</font><font size="1" face="verdana, sans-serif" color="#333399">

Callum Guy
Developer

X-on
Framlingham Technology Centre
Station Road, Framlingham,
Suffolk, IP13 9EZ

T       0333 332 0116
E       <a href="mailto:callum.guy@x-on.co.uk" target="_blank">callum.guy@x-on.co.uk</a>


<img src="http://www.x-ondata.com/images/footerv2.jpg">
<br></font></pre><pre style="word-wrap:break-word;white-space:pre-wrap"><font size="1" face="verdana, sans-serif" color="#333399">X-on is a trading name of Storacall Technology Ltd a limited company registered in England and Wales
Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead, Herts, HP3 9SD  
Company Registration No. 2578478 

This email has been sent from X-on.The contents and attachments are confidential to the sender and the intended addressees.If the message
is received by anyone other than the addressee please return the message to the sender by replying to it and then delete the message from 
your computer without copying or disclosing the contents to anyone.Opinions, conclusions and statements of intent in this email are those of
the sender and do not bind X-on unless confirmed by authorised representatives independently of this message.While best endeavours have 
been taken to avoid transmission of viruses, it is the responsibility of the recipient to scan for these.Please note emails sent to and from X-on 
are routinely monitored for record keeping and quality control, to ensure regulatory compliance and prevent unauthorised use of our systems.

</font><font size="1" face="verdana, sans-serif" color="#006600">Please consider the environment before printing this email.</font></pre></div>
<br><br><div class="gmail_quote">On 1 October 2013 13:21, Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><br><div><div class="im"><div>On Oct 1, 2013, at 5:51 AM, Callum Guy &lt;<a href="mailto:callum.guy@x-on.co.uk" target="_blank">callum.guy@x-on.co.uk</a>&gt; wrote:</div><br><blockquote type="cite">

<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">



I am trying to understand how audio streams are initialised in FreeSWITCH. I&#39;m working with ESL (inbound and outbound) and trying to record some audio. Through testing i have proven that audio is working correctly for bridged calls, conferences and file playback however not for single legged audio recording - that is, until I play a file first.</p>

<p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">

In my example the playback application is executed from an outbound socket, the call is then parked and the inbound socket captures the park event and starts recording. With the playback in place i get audio, and without it I simply get a silent file of the correct duration presumably meaning that the the RTP stream is not active.</p>

</div></div></blockquote></div><div>You can try a brief silence_stream at the start of the call to address this.</div><div class="im"><br><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">

<p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">

My question therefore is: How can I initialise the RTP stream for recording, without having played a file first? Is there a command for this, or an argument I can pass to the record application?</p></div></div></blockquote>

</div><div>FreeSWITCH already does this, its likely whatever your talking to does not.  What is on the other end of the call.</div><div class="im"><br><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">

<p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">

My objective is to understand how RTP streams are initialised in FreeSWITCH and any input would be greatly appreciated.</p></div>
</div></blockquote></div></div><br></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<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>
<br></blockquote></div><br></div>