<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Might I suggest LUA… I do exactly what you want and then some. I control the early media as well. Caller hears “Hi Tom, please hold while our phones ring”, music. “hold on Tom on while our iPhones ring”, music, “Sorry Tom, please leave a message”. The media is constructed based on the incoming line, the caller ID, etc. The LUA program even adjusts the music between verbiage so the full length is constant and takes into account resolution. The string can be used for early media or music on hold. The point is, it is far more dynamic than anything you can do in XML. BTW, the same LUA program also sets different ringtones based on caller ID. Lot’s of work but once done worth it. Something to think about.<div><br></div><div>This is how to build the string in FreeSWITCH (I added this to the wiki Feb 13):&nbsp;<a href="http://wiki.freeswitch.org/wiki/Mod_local_stream#Execution_Parameters">http://wiki.freeswitch.org/wiki/Mod_local_stream#Execution_Parameters</a></div><div><div>Mario G<br><div><br><div><div>On Oct 3, 2014, at 3:27 PM, Michael Collins &lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div><div><div><div>In the long term I would create some sort of lookup, like using a Lua script and database. However, in the short term you could do something very simple, like create a utility extension whose sole job it is to set the my_hold_music variable. Then you can play the hold music in the extension for 4000. Here's a sample:<br><br></div><font size="1"><span style="font-family:courier new,monospace">&lt;extension name="set my hold music" continue="true"&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp; &lt;condition break="never"&gt; <br>&nbsp;&nbsp;&nbsp; &lt;!-- default to standard hold music --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;action application="set" data="my_hold_music=${hold_music}"/&gt;</span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp; &lt;/condition&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp; &lt;condition field="effective_caller_id_number"
            expression="^(1000)$" break="on-true"&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp; &lt;action application="set" data="my_hold_music=/path/to/file1.wav"/&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp; &lt;/condition&gt;<br></span></font><div><font size="1"><span style="font-family:courier new,monospace">&nbsp; &lt;condition field="effective_caller_id_number"
            expression="^(1001)$" break="on-true"&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp; &lt;action application="set" data="my_hold_music=/path/to/file2.wav"/&gt;<br></span></font></div><font size="1"><span style="font-family:courier new,monospace">&nbsp; &lt;/condition&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp; &lt;!-- add a condition for each caller id value... --&gt;<br></span></font></div><font size="1"><span style="font-family:courier new,monospace">&lt;/extension&gt;<br><br></span></font></div><font size="1"><span style="font-family:courier new,monospace">&lt;extension name="x4000"&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp; &lt;condition field="destination_number" expression="^(4000)$"&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp; &lt;action application="answer"/&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp; &lt;action application="sleep" data="1000"/&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp; &lt;action application="playback" data="${my_hold_music}"/&gt;<br></span></font></div><div><font size="1"><span style="font-family:courier new,monospace">&nbsp; &lt;/condition&gt;<br></span></font></div><font size="1"><span style="font-family:courier new,monospace">&lt;/extension&gt;<br></span></font><div><div><font size="1"><span style="font-family:courier new,monospace"><br></span></font></div><div>Play around with that and see what happens. Don't forget about the <a href="https://wiki.freeswitch.org/wiki/Reporting_Bugs#Standard_Disclaimer">standard disclaimer</a>. :)<br></div><div>-MC<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 3, 2014 at 1:40 PM, Tom Angle <span dir="ltr">&lt;<a href="mailto:tangle70@gmail.com" target="_blank">tangle70@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 bgcolor="#FFFFFF" text="#000000">
    In plain english. I want an incoming SIP call to user 4000 to go
    directly to hold and play a wav file. Also I want to assign
    different wav file to different incoming numbers. This was a
    customer can choose what on hold music their clients will hear.&nbsp; <br>
    <br>
    I posted the cli output in pastebin under Tom Angle. Thanks<br>
    <br>
    Tom<br>
    <br>
    <div>On 10/3/2014 3:17 PM, Michael Collins
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>Welcome to FreeSWITCH!<br>
                  <br>
                </div>
                The folks around here will be happy to help. In this
                case I believe they/we just need some additional
                information. I recommend that you get a console debug
                log and drop it into <a href="http://pastebin.freeswitch.org/" target="_blank">pastebin.freeswitch.org</a>
                and set the syntax highlight to "FreeSWITCH Log". <br>
                <br>
              </div>
              Also, it would probably help if you gave us a plain
              language description of what you are trying to do with
              that dialplan snippet. I see a lot of anti-actions which
              may or may not be what you need. Maybe a brief description
              would help, something like: "When caller id 1005 calls in,
              play file1.wav and then hangup." <br>
              <br>
            </div>
            Lastly I recommend reviewing this wiki page: <a href="https://confluence.freeswitch.org/display/FREESWITCH/Troubleshooting+Debugging" target="_blank">https://confluence.freeswitch.org/display/FREESWITCH/Troubleshooting+Debugging</a><br>
            <br>
          </div>
          It will get you on the right path for figuring out what
          information to collect for the troubleshooting process.<br>
          <br>
        </div>
        -Michael<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Oct 3, 2014 at 8:47 AM, Tom
          Angle <span dir="ltr">&lt;<a href="mailto:tangle70@gmail.com" target="_blank">tangle70@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">I am new
            to Freeswitch.<br>
            <br>
            I am trying to create a MOH server for our Metaswitch.
            Currently I have<br>
            it working, but it will only play on audio file. I would
            like to set it<br>
            up to play a particular audio depending on the inbound phone
            number. The<br>
            below code is in my dialplan/default.xml and does not work.
            Could<br>
            someone tell me what I am doing wrong? Thanks for any help.<br>
            <br>
            <br>
            &nbsp; &nbsp; &nbsp;&lt;extension name="4000_hold_music"&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;condition field="effective_caller_id_number"
            expression="^(1000)$"&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="answer"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="execute_extension"
            data="is_secure XML<br>
            features"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="playback"
            data="$${hold_music}"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;anti-action application="set"
            data="zrtp_secure_media=true"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;anti-action application="answer"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;anti-action application="execute_extension"<br>
            data="is_zrtp_secure XML features"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;anti-action application="playback"
            data="/music/music1.wav"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;/condition&gt;<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;condition field="effective_caller_id_number"
            expression="^(1005)$"&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="answer"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="execute_extension"
            data="is_secure XML<br>
            features"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="playback"
            data="$${hold_music}"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;anti-action application="set"
            data="zrtp_secure_media=true"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;anti-action application="answer"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;anti-action application="execute_extension"<br>
            data="is_zrtp_secure XML features"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;anti-action application="playback"
            data="/music/music4.wav"/&gt;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;&lt;/condition&gt;<br>
            &nbsp; &nbsp; &nbsp;&lt;/extension&gt;<br>
            <br>
_________________________________________________________________________<br>
            Professional FreeSWITCH Consulting Services:<br>
            <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
            <a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.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://confluence.freeswitch.org/" target="_blank">http://confluence.freeswitch.org</a><br>
            <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.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>
            FreeSWITCH-users mailing list<br>
            <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a>

Official FreeSWITCH Sites
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a>
<a href="http://confluence.freeswitch.org/" target="_blank">http://confluence.freeswitch.org</a>
<a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a>

FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a></pre>
    </blockquote>
    <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>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org/" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.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>
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>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services: <br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://confluence.freeswitch.org<br>http://www.cluecon.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org</blockquote></div><br></div></div></div></body></html>