[Freeswitch-users] mod_lua play file into conference

Josh M. Patten jpatten at co.brazos.tx.us
Mon May 9 23:29:44 MSD 2011


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. 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110509/d3905de6/attachment-0001.html 


More information about the FreeSWITCH-users mailing list