<div dir="ltr">Nikhitha,<div><br></div><div>You are using &#39;sed&#39; to print the first line (head -1), which will include a line return.</div><div><br></div><div>This will work:</div><div>Create a shell script &quot;getplayfile.sh&quot; and in your dialplan use:</div>
<div><b style="font-family:arial,sans-serif;font-size:13px"> data=&quot;RESULT=${system getplayfile.sh}&quot;</b><br></div><div><b style="font-family:arial,sans-serif;font-size:13px"><br></b></div><div><font face="arial, sans-serif">The shell script can use tr to strip out the end of line as follows:</font></div>
<div><font face="arial, sans-serif">sed -n 1p /nfs/th/play/${uuid} | tr &quot;\n&quot; &quot;\0&quot;</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 8, 2014 at 6:55 AM, Nikhitha T <span dir="ltr">&lt;<a href="mailto:nikhitha.voxta@gmail.com" target="_blank">nikhitha.voxta@gmail.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 dir="ltr">In freeswitch as I am setting the variable like this <br><br><b>&lt;action application=&quot;set&quot; data=&quot;RESULT=${system sed -n 1p /nfs/th/play/${uuid}}&quot; inline=&quot;true&quot;/&gt;</b><br>
<br>
 Here i am trying to assign the wav file path to the variable,but here the problem is it is getting assigned as <br><b><br>2014-05-08 13:34:56.659049 [DEBUG] mod_dptools.c:1402 sofia/internal/<a href="mailto:1002@192.168.0.106" target="_blank">1002@192.168.0.106</a> SET [RESULT]=[/usr/local/freeswitch/sounds/en/us/callie/directory/8000/dir-for_prev.wav<br>

<br>]</b><br><br>The variable RESULT is not being set properly,The closing square bracket is coming to the new line as it should be in the same line immediately after the path.So while playing the wav file it is showing the error as<br>

<br><b>2014-05-08 13:34:56.679046 [ERR] switch_core_file.c:150 Invalid file format [wav<br><br>] for [/usr/local/freeswitch/sounds/en/us/callie/directory/8000/dir-for_prev.wav<br><br>]!<br></b><br><p>Can anyone help me in solving this issue.Thanks in advance</p>
<span class="HOEnZb"><font color="#888888">
<br><br clear="all"><br>-- <br>Thanks &amp; Regards<br>---------------------------------<br>Nikhitha<br>
</font></span></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>