[Freeswitch-users] Playing a sound file (or TTS) to the called party when transferring a call just before bridging
Gonzalo Servat
gservat at gmail.com
Sun Nov 2 18:59:46 PST 2008
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081103/19c20ff3/attachment-0002.html
More information about the FreeSWITCH-users
mailing list