[Freeswitch-users] Setting hold_music variable
Peter Baines (lists)
lists at pbaines.com
Fri Mar 30 12:18:48 UTC 2018
Hello,
I am trying to set hold music per channel but cannot override the default
that is set in vars.xml.
I am setting the default hold_music variable in vars.xml, then in a
dialplan I am overriding like so:
<extension name="prefs_2007" continue="true">
<condition field="${sip_to_uri}" expression="2007 at pbaines.com">
<action application="log" data="WARNING I have matched preferences
for user [2007 at pbaines.com]"/>
<action application="set" data="hold_music=/var/lib/mymusic.wav"/>
<action application="export" data="hold_music=/var/lib/mymusic.wav"/>
<action application="bridge_export" data="hold_music=/var/lib/
mymusic.wav"/>
</condition>
</extension>
I can see it hitting the logline in fs_cli, I am them putting it on hold
like so:
<extension name="soft_hold">
<condition field="destination_number" expression="^soft_hold$">
<action application="log" data="WARNING putting on hold with
${hold_music}" />
<action application="set" data="hold_music=${hold_music}" />
<action application="export" data="hold_music=${hold_music}" />
<action application="soft_hold" data="4"/>
</condition>
</extension>
The music from vars.xml is played, even though the log line above tells me
that ${hold_music} is set to my custom wav.
I have also tried the following which also plays the default music on hold:
<action application="soft_hold" data="4 silence ${hold_music}"/>
Should I be able to overwrite the hold_music variable ?
Regards,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180330/97e43e91/attachment.html>
More information about the FreeSWITCH-users
mailing list