your issue with pre_execute_b is probably fixed in latest trunk.
As far as execute_on_answer, you need to set the variable on that dialing leg not the inbound leg.

{execute_on_answer=playback\s/some/file.wav}sofia/profile/u@dom.com



On Sun, Nov 2, 2008 at 8:59 PM, Gonzalo Servat <gservat@gmail.com> wrote:
Hi All,

This is basically what I'm trying to do:

- Caller dials in and FS runs the Lua script I'm writing
- Main menu is played to the caller
- Caller presses 1
- Still in Lua, i run session:transfer() to an extension of another dialplan context
- When the called party picks up, a wav file (or TTS) is played to the CALLED party
- Once the sound stops playing, the caller is bridged to the called party

To achieve this, the nice folks at #freeswitch suggested a few things:

1) execute_on_answer. This doesn't appear to work ... no application seems to be executed when the called party picks up. Is it because the call is already answered when the caller originally dials in at the very beginning?
2) bridge_pre_execute_bleg_app / bridge_pre_execute_bleg_data. This is the closest I've come to getting it working. I used the following in the Lua script:

if( selection == "1" ) then
      session:setAutoHangup(false)
      session:execute( "set", "bridge_pre_execute_bleg_app=speak" );
      session:execute( "set", "bridge_pre_execute_bleg_data=flite|kal|this is kal saying something" );
      session:transfer( "10", "XML", "extensions" )
end

I actually see in the logs that it's "saying text: this is kal saying something" but it goes no further. On the called party side, I don't hear the text nor is the call bridged. I tried using "playback" instead of "speak" to see if it was a TTS problem but no, same result.

Any ideas?

Thanks
Gonzalo

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400