[Freeswitch-users] Playing on hold music for certain inbound numbers

Tom Angle tangle70 at gmail.com
Fri Oct 3 19:47:39 MSD 2014


I am new to Freeswitch.

I am trying to create a MOH server for our Metaswitch. Currently I have 
it working, but it will only play on audio file. I would like to set it 
up to play a particular audio depending on the inbound phone number. The 
below code is in my dialplan/default.xml and does not work. Could 
someone tell me what I am doing wrong? Thanks for any help.


     <extension name="4000_hold_music">
       <condition field="effective_caller_id_number" expression="^(1000)$">
         <action application="answer"/>
         <action application="execute_extension" data="is_secure XML 
features"/>
         <action application="playback" data="$${hold_music}"/>
         <anti-action application="set" data="zrtp_secure_media=true"/>
         <anti-action application="answer"/>
         <anti-action application="execute_extension" 
data="is_zrtp_secure XML features"/>
         <anti-action application="playback" data="/music/music1.wav"/>
       </condition>

       <condition field="effective_caller_id_number" expression="^(1005)$">
         <action application="answer"/>
         <action application="execute_extension" data="is_secure XML 
features"/>
         <action application="playback" data="$${hold_music}"/>
         <anti-action application="set" data="zrtp_secure_media=true"/>
         <anti-action application="answer"/>
         <anti-action application="execute_extension" 
data="is_zrtp_secure XML features"/>
         <anti-action application="playback" data="/music/music4.wav"/>
       </condition>
     </extension>



Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list