[Freeswitch-users] different moh in conference for each call?

Tim St. Pierre fs-list at communicatefreely.net
Wed Feb 15 23:30:04 MSK 2012


Are you using xml_curl?

If so, you can have mod_conference get it's configuration from your web 
server instead of the static XML file.

In our setup here, every time a new conference is launched, 
mod_conference requests config, and this is returned by a PHP script.  
We look at what conference number was requested, and we generate a 
profile on-the-fly.  We have a database that defines what music, rate, 
energy level, recording options, etc. on a per-conference basis.

If you use the static files, the profiles you create only get parsed 
when the XML is refreshed, so you can't use variable expansion in there, 
other than pre-process variables that you might have put elsewhere in 
the XML (ie. vars.xml).

-Tim

Anita Hall wrote:
> Hi
>
> I am trying to play different moh sound for each conference call by 
> passing a variable to moh-sound from the dialplan to 
> autoload_configs/conference.conf.xml
>
> In my dialplan/default.xml
>
>     <extension name="conference_incoming">
>         <condition field="destination_number" expression="^(.*)$">
>                 <action application="set" data="knowlus_hold_music=$1" />
>                 <action application="conference" data="3001 at default"/>
>                 <action application="hangup" />
>         </condition>
>     </extension>
>
> In my autoload_configs/conference.conf.xml
>
> <param name="moh-sound" value="local_stream://${knowlus_hold_music}"/>
>
> However, it does not work. It is not able to expand the variable 
> ${knowlus_hold_music}
>
> In the log
> 2012-02-15 19:55:31.195264 [WARNING] mod_local_stream.c:393 Unknown 
> source ${knowlus_hold_music}, trying 'default'
>
> Is it even possible to pass a channel variable to a config file ? Or 
> is there another way to achieve what I am trying to do ?
>
> Thanks.
>
> regards,
> Anita
>
> ------------------------------------------------------------------------
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>   




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list