[Freeswitch-users] mod_lua play file into conference

Josh M. Patten jpatten at co.brazos.tx.us
Tue May 10 03:40:23 MSD 2011


I would like to stream the file as soon as the conference is started, no matter who is in there.

What I'm asking isn't really time dependent though. I'm trying to find out why I can't stream an audio file into a conference with lua.

Basically I'm looking to implement a paging system based on the the "Mad Boss" example located here: http://wiki.freeswitch.org/wiki/Conferencing_and_Intercom but implemented in lua using a postgres database to store what extensions to page for what "page group" (I promise to post my code, honest). In most overhead paging environments there is either a short tone or sound before the page is broadcast. I'm trying to replicate that by streaming a short wav file once the conference is established.

Let me know if you need any more info.

________________________________
From: freeswitch-users-bounces at lists.freeswitch.org [freeswitch-users-bounces at lists.freeswitch.org] on behalf of Michael Collins [msc at freeswitch.org]
Sent: Monday, May 09, 2011 5:41 PM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] mod_lua play file into conference



On Mon, May 9, 2011 at 12:29 PM, Josh M. Patten <jpatten at co.brazos.tx.us<mailto: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<mailto: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/7da5aa86/attachment-0001.html 


More information about the FreeSWITCH-users mailing list