[Freeswitch-users] how to play a prompt after connection

Michael Collins msc at freeswitch.org
Wed Aug 29 19:18:21 MSD 2012


You could try doing a bridge_pre_execute and play the sounds to each leg
independently prior to the bridge. Check out these chan vars:
http://wiki.freeswitch.org/wiki/Channel_Variables#bridge_pre_execute_aleg_app
http://wiki.freeswitch.org/wiki/Channel_Variables#bridge_pre_execute_aleg_data
http://wiki.freeswitch.org/wiki/Channel_Variables#bridge_pre_execute_bleg_app
http://wiki.freeswitch.org/wiki/Channel_Variables#bridge_pre_execute_bleg_data

-MC

On Wed, Aug 29, 2012 at 4:24 AM, Dave Horton <daveh at beachdognet.com> wrote:

> > Set api_on_answer to execute
> > uuid_broadcast<
> > http://wiki.freeswitch.org/wiki/Mod_commands#uuid_broadcast
> > >
> > which
> > will let you pick which legs to play the recording to.
> > You can pass in the UUID with ${uuid}
> >
> > -Avi
> >
> I tried this, and it worked.....sort of.  If I play the prompt the A leg
> it is fine -- caller hears the prompt, then is connected to called party.
>  If I play it to the B leg, however, the prompt does not seem to start
> playing at all until the B party actually starts talking, and then the
> prompt is played extremely choppy and slow.....it takes about 10 seconds to
> play a 4 second prompt.  Meanwhile, the caller and called party can't hear
> each other.  Any idea what is going on and how to fix it?  I am doing it in
> lua as follows:
>
> session:execute("export","nolocal:jitterbuffer_msec=100") ;
> session:setVariable("RECORD_STEREO","true") ;
> session:setVariable("aleg_uuid",uuid) ;
> session:execute("record_session", outfile) ;
> session:execute("set","progress_timeout=60") ;
> session:execute("set","call_timeout=120") ;
> session:setVariable("hangup_after_bridge","true") ;
> session:execute("bridge","sofia/normal_customer/${outdial}@${egress_gateway}")
> ;
> --session:execute("bridge","{api_on_answer='uuid_broadcast " .. uuid .. "
> " .. this_call_is_being_recorded .. " " ..
> "bleg'}sofia/normal_customer/${outdial}@${egress_gateway}") ;
>
>
> _________________________________________________________________________
> 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
>



-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120829/9fdf0ac2/attachment-0001.html 


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