Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Playing a sound file (or TTS) to the call


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
gservat at gmail.com
Guest





PostPosted: Sun Nov 02, 2008 10:11 pm    Post subject: [Freeswitch-users] Playing a sound file (or TTS) to the call Reply with quote

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
Back to top
anthony.minessale at g...
Guest





PostPosted: Mon Nov 03, 2008 12:21 pm    Post subject: [Freeswitch-users] Playing a sound file (or TTS) to the call Reply with quote

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 (u@dom.com)



On Sun, Nov 2, 2008 at 8:59 PM, Gonzalo Servat <gservat@gmail.com (gservat@gmail.com)> wrote:
Quote:
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 (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 ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
gservat at gmail.com
Guest





PostPosted: Mon Nov 03, 2008 6:10 pm    Post subject: [Freeswitch-users] Playing a sound file (or TTS) to the call Reply with quote

Thanks anthony! Works like a charm Smile

On Mon, Nov 3, 2008 at 2:47 PM, Anthony Minessale <anthony.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
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 (u@dom.com)




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


Quote:

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 (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 ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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

Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services