<div dir="ltr">First off you don&#39;t have to worry with that rate variable:<div><br></div><div>Layout your directories like so:</div><div><br></div><div>/opt/sharefs/moh/0/8000/1_1.wav</div><div>/opt/sharefs/moh/0/16000/1_1.wav</div><div>/opt/sharefs/moh/0/32000/1_1.wav<br></div><div>/opt/sharefs/moh/0/48000/1_1.wav<br></div><div><br></div><div>Then all you care is play this file <span style="font-size:12.8000001907349px">/opt/sharefs/</span><span style="font-size:12.8000001907349px">moh/0/1_1.wav</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">It will pick the one that matches the rate of the channel, see our default sound set does this too.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 15, 2015 at 9:06 AM, Dmitry Mordovin <span dir="ltr">&lt;<a href="mailto:dm@dwide.com" target="_blank">dm@dwide.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
Don&#39;t understand why ${rate} is null while one user call another...<br>
<br>
&lt;section name=&quot;dialplan&quot; description=&quot;Local call&quot;&gt;<br>
     &lt;context name=&quot;public&quot;&gt;<br>
       &lt;extension name=&quot;local&quot;&gt;<br>
         &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d{3})$&quot;&gt;<br>
           &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=105&quot;/&gt;<br>
<br>
           &lt;action application=&quot;set&quot; data=&quot;rrr=${rate}&quot;/&gt;<br>
<br>
           &lt;action application=&quot;export&quot;<br>
data=&quot;hold_music=/opt/sharefs/moh/0/${rate}/1_1.wav&quot; /&gt;<br>
           &lt;action application=&quot;bridge&quot;<br>
data=&quot;sofia/internal/00294539100%${domain_name}&quot;/&gt;<br>
         &lt;/condition&gt;<br>
       &lt;/extension&gt;<br>
     &lt;/context&gt;<br>
&lt;/section&gt;<br>
<br>
${rate} is empty<br>
<br>
May I can use rate after answer only?<br>
<br>
Best regards<br>
Dmitry<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">







<p><font face="courier new, monospace"><b><i><font size="4">Brian West</font></i></b><br><span style="font-size:x-small"><a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a></span></font></p>
<p><font size="1" face="courier new, monospace"><img src="http://billing.freeswitch.org/templates/default/img/whmcslogo.png"><br></font></p><p><font size="2" face="monospace, monospace"><b><i>Twitter: @FreeSWITCH , @briankwest</i></b><br><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a><br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</a></font></p><p><font face="monospace, monospace">ClueCon 2015 <a href="https://www.cluecon.com/call-for-speakers/" target="_blank">Call for Speakers</a> | <a href="https://freeswitch.com/cart.php?gid=1" target="_blank">Register</a> TODAY! | Reddit: <a href="https://www.reddit.com/r/freeswitch" target="_blank">/r/freeswitch</a></font></p>
<p><font size="2" face="monospace, monospace"><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</font></p></div></div></div></div></div></div></div></div>
</div>