[Freeswitch-users] mod_lua play file into conference

Michael Collins msc at freeswitch.org
Tue May 10 02:41:48 MSD 2011


On Mon, May 9, 2011 at 12:29 PM, Josh M. Patten <jpatten at co.brazos.tx.us>wrote:

>  OK so I’ve successfully managed to get a lua script working to enhance
> the functionality of the “mad boss” intercom via conference example however
> I’m having trouble getting an audio file to stream into the conference at
> the beginning.
>

An audio file to stream at the beginning of what, exactly? When the first
person enters the conference? Or when every participant enters? I'm just
trying to understand what problem you're solving. Please describe it in
plain language: when user enters he hears xyz, when next user enters he and
the conference hear abc, etc.

-MC


> Here is what I’m trying:
>
>
>
> Dialplan:
>
>
>
> <extension name="outbound-socket">
>
>       <condition field="destination_number" expression="^3402$">
>
>       <action application="lua"
> data="/usr/local/freeswitch/scripts/test.lua 3402"/>
>
>     </condition>
>
>    </extension>
>
>
>
> Snip of test.lua:
>
>
>
> session:execute("conference", argv[1] .. "@default")
>
> session:execute("set", "tmp=${conference " .. argv[1] .. " play
> /usr/local/freeswitch/sounds/tones/norstar.wav}")
>
>
>
> I’ve also tried:
>
>
>
> session:execute("conference", argv[1] .. "@default")
>
> api = freeswitch.API()
>
> confplay = api:execute("conference", argv[1] .. " play
> /usr/local/freeswitch/sounds/tones/norstar.wav ")
>
>
>
>
>
> In watching fs_cli it appears freeswitch never executes the entry that
> would set this file.
>
>
>
> What am I doing wrong here? I’ve got the FreeSWITCH 1.0.6 book and I can’t
> seem to find my answer there either.
>
>
>
> Oh, playing a sound on participant entry won’t work because it will play
> that sound for EVERY user that enters the conference. When 80 extensions are
> auto-joined to the conference at the same time it is useless for a while
> playing entry sounds for all those extensions.
>
>
>
> Thanks!
>
>
>
> Josh Patten
>
> Brazos County Network Engineer
>
> 979.361.4676
>
>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110509/9e3e7563/attachment.html 


More information about the FreeSWITCH-users mailing list