Playing an audio file to end destination before bridging the call
Hi All, I'm looking for a way to play an audio file to the end destination before bridging the call, eg. below is an example in Asterisk which I'm trying to replicate in FS. exten => _0ZXXXXXXXXX,1,Dial(SIP/outsip/${dest},30,rA(/srv/files/whisperfile)) Is this possible in FS? Any feedback would be highly appreciated. Adnan
On Sun, Jul 13, 2008 at 1:31 PM, Adnan Barakat <adnan@barakatdesigns.net> wrote:
Hi All,
I'm looking for a way to play an audio file to the end destination before bridging the call, eg. below is an example in Asterisk which I'm trying to replicate in FS.
exten => _0ZXXXXXXXXX,1,Dial(SIP/outsip/${dest},30,rA(/srv/files/whisperfile))
Is this possible in FS?
Any feedback would be highly appreciated.
Good question. I'd be keen to find out if it's possible myself :) - Gonzalo
I assume you are meaning as you are connecting, you may want to play a custom ringback or fake the ring. Here's the page to do it: http://wiki.freeswitch.org/wiki/Custom_Ring_Back_Tones Or if you are using the originate command: originate {ringback=/path/to/music.wav}sofia/gateway/name/number &bridge(sofia/gateway/name/othernumber) On Sun, Jul 13, 2008 at 1:32 PM, Gonzalo Servat <gservat@gmail.com> wrote:
On Sun, Jul 13, 2008 at 1:31 PM, Adnan Barakat <adnan@barakatdesigns.net> wrote:
Hi All,
I'm looking for a way to play an audio file to the end destination before bridging the call, eg. below is an example in Asterisk which I'm trying to replicate in FS.
exten => _0ZXXXXXXXXX,1,Dial(SIP/outsip/${dest},30,rA(/srv/files/whisperfile))
Is this possible in FS?
Any feedback would be highly appreciated.
Good question. I'd be keen to find out if it's possible myself :)
- 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
-- --Joe "Success is easy if you think of it like Rust: It's inevitable if you keep at it. Guys claim there are magic moments, but that's just bullshit." --Fred Franzia (The famous wine guy)
Joseph Bajin wrote:
I assume you are meaning as you are connecting, you may want to play a custom ringback or fake the ring.
Here's the page to do it:
http://wiki.freeswitch.org/wiki/Custom_Ring_Back_Tones
Or if you are using the originate command:
originate {ringback=/path/to/music.wav}sofia/gateway/name/number &bridge(sofia/gateway/name/othernumber) Thanks Joe, but this will play the file to the caller, I'm trying to play a file to the receiver (ie. when the receiver picks up the phone the voice file will be played to them [the receiver], then the call will get bridged - and while the file is being played [to the receiver] the caller will continue to hear the normal ringtone until the call is bridged)
Adnan
Hi, So, you want call from A to B, and make B listen to a file when he picks up, right ? You can originate the call to LegB , and make it drop to a context which does the following - first play the file - Then bridge to LegA Regards, ashutosh On Mon, Jul 14, 2008 at 8:00 AM, Adnan Barakat <adnan@barakatdesigns.net> wrote:
Joseph Bajin wrote:
I assume you are meaning as you are connecting, you may want to play a custom ringback or fake the ring.
Here's the page to do it:
http://wiki.freeswitch.org/wiki/Custom_Ring_Back_Tones
Or if you are using the originate command:
originate {ringback=/path/to/music.wav}sofia/gateway/name/number &bridge(sofia/gateway/name/othernumber) Thanks Joe, but this will play the file to the caller, I'm trying to play a file to the receiver (ie. when the receiver picks up the phone the voice file will be played to them [the receiver], then the call will get bridged - and while the file is being played [to the receiver] the caller will continue to hear the normal ringtone until the call is bridged)
Adnan
_______________________________________________ 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
Ashutosh wrote:
So, you want call from A to B, and make B listen to a file when he picks up, right ? You can originate the call to LegB , and make it drop to a context which does the following - first play the file - Then bridge to LegA Thanks Ashutosh, is this possible to do in an XML dialplan? I'd really appreciate if you could please provide a simple example of how to achieve this as I'm still quite new to FS. I've had a good look around the wiki, but couldn't find a way to achieve this either using XML or JS.
Adnan
Check out: http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate#Answer_confirmation just setting the group_confirm_file without setting group_confirm_key I think will do what you want. Mike On Jul 13, 2008, at 12:31 PM, Adnan Barakat wrote:
Hi All,
I'm looking for a way to play an audio file to the end destination before bridging the call, eg. below is an example in Asterisk which I'm trying to replicate in FS.
exten => _0ZXXXXXXXXX,1,Dial(SIP/outsip/${dest},30,rA(/srv/files/ whisperfile))
Is this possible in FS?
Any feedback would be highly appreciated.
Adnan
_______________________________________________ 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
Michael Jerris wrote:
Check out:
http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate#Answer_confirmation
just setting the group_confirm_file without setting group_confirm_key I think will do what you want. Excellent thanks Mike, just tried that, however it won't work without group_confirm_key, but yes in principle this is exactly what I'm after. Any ideas on how to get around needing the group_confirm_key setting?
Adnan
You are correct, You should be able to use: http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate#exec_in_answer_conf... or http://wiki.freeswitch.org/wiki/Channel_Variables#execute_on_answer using playback. Mike On Jul 14, 2008, at 10:18 AM, Adnan Barakat wrote:
Michael Jerris wrote:
Check out:
http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate#Answer_confirmation
just setting the group_confirm_file without setting group_confirm_key I think will do what you want. Excellent thanks Mike, just tried that, however it won't work without group_confirm_key, but yes in principle this is exactly what I'm after. Any ideas on how to get around needing the group_confirm_key setting?
Adnan
_______________________________________________ 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
Michael Jerris wrote:
You are correct, You should be able to use:
http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate#exec_in_answer_conf... I tried this one, and in principle does exactly as needed however the playback quality is really bad:
<action application="set" data="group_confirm_key=exec" /> <action application="set" data="group_confirm_file=playback /tmp/file.wav" /> But if I use playback normally as below the quality if perfect (I realise that this below will play to the caller, but I just used to test the file was encoded correctly)?? <action application="playback" data="/tmp/file.wav" /> I've tried several encoding types, but none of worked, any ideas??
http://wiki.freeswitch.org/wiki/Channel_Variables#execute_on_answer This one played the file to the caller.
Thanks for your time and help on this Adnan
try adding a set var for timer=soft Mike On Jul 14, 2008, at 11:46 AM, Adnan Barakat wrote:
Michael Jerris wrote:
You are correct, You should be able to use:
http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate#exec_in_answer_conf... I tried this one, and in principle does exactly as needed however the playback quality is really bad:
<action application="set" data="group_confirm_key=exec" /> <action application="set" data="group_confirm_file=playback /tmp/ file.wav" />
But if I use playback normally as below the quality if perfect (I realise that this below will play to the caller, but I just used to test the file was encoded correctly)?? <action application="playback" data="/tmp/file.wav" />
I've tried several encoding types, but none of worked, any ideas??
http://wiki.freeswitch.org/wiki/Channel_Variables#execute_on_answer This one played the file to the caller.
Thanks for your time and help on this
Adnan
_______________________________________________ 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
Brian West wrote:
<action application="set" data="timer_name=soft"/> Nope, still no luck, adding this setting didn't seem to make any difference.
Here is the actual dialplan I'm using on mod_xml_curl: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="dialplan" description="DialPlan"> <context name="public"> <extension name="DialPlan"> <condition field="destination_number" expression="^([0-9]+)$"> <action application="set" data="timer_name=soft"/> <action application="set" data="group_confirm_key=exec"/> <action application="set" data="group_confirm_file=playback /tmp/whisper.wav"/> <action application="set" data="ringback=${uk-ring}"/> <action application="ring_ready" /> <action application="bridge" data="sofia/internal/1234@gw.domain.com" /> </condition> </extension> </context> </section> </document> However if I do this the quality is perfect (but the receiver is required to press a key before the call is bridged which I'm trying to avoid): <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="dialplan" description="DialPlan"> <context name="public"> <extension name="DialPlan"> <condition field="destination_number" expression="^([0-9]+)$"> <action application="set" data="timer_name=soft"/> <action application="set" data="group_confirm_key=1"/> <action application="set" data="group_confirm_file=/tmp/whisper.wav"/> <action application="set" data="ringback=${uk-ring}"/> <action application="ring_ready" /> <action application="bridge" data="sofia/internal/1234@gw.domain.com" /> </condition> </extension> </context> </section> </document> Thanks again guys for your time and help on this. Adnan
Please update to the latest SVN trunk and try again. Thanks, /b On Jul 14, 2008, at 10:46 AM, Adnan Barakat wrote:
Michael Jerris wrote:
You are correct, You should be able to use:
http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate#exec_in_answer_conf... I tried this one, and in principle does exactly as needed however the playback quality is really bad:
<action application="set" data="group_confirm_key=exec" /> <action application="set" data="group_confirm_file=playback /tmp/ file.wav" />
But if I use playback normally as below the quality if perfect (I realise that this below will play to the caller, but I just used to test the file was encoded correctly)?? <action application="playback" data="/tmp/file.wav" />
I've tried several encoding types, but none of worked, any ideas??
http://wiki.freeswitch.org/wiki/Channel_Variables#execute_on_answer This one played the file to the caller.
Thanks for your time and help on this
Adnan
_______________________________________________ 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
Brian West sip:brian@freeswitch.org
Thanks Brian, I will update today, and will get back to you. Adnan Brian West wrote:
Please update to the latest SVN trunk and try again.
Thanks, /b
On Jul 14, 2008, at 10:46 AM, Adnan Barakat wrote:
Michael Jerris wrote:
You are correct, You should be able to use:
http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate#exec_in_answer_conf... I tried this one, and in principle does exactly as needed however the playback quality is really bad:
<action application="set" data="group_confirm_key=exec" /> <action application="set" data="group_confirm_file=playback /tmp/ file.wav" />
But if I use playback normally as below the quality if perfect (I realise that this below will play to the caller, but I just used to test the file was encoded correctly)?? <action application="playback" data="/tmp/file.wav" />
I've tried several encoding types, but none of worked, any ideas??
http://wiki.freeswitch.org/wiki/Channel_Variables#execute_on_answer This one played the file to the caller.
Thanks for your time and help on this
Adnan
_______________________________________________ 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
Brian West sip:brian@freeswitch.org
_______________________________________________ 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
Adnan Barakat wrote:
Thanks Brian, I will update today, and will get back to you.
Adnan
Brian West wrote:
Please update to the latest SVN trunk and try again. Fantastic, thanks a lot Brian for your help, it works perfectly now.
Adnan
I'm only partly to thank. 99% of the credit goes to Anthony. On Jul 15, 2008, at 12:31 PM, Adnan Barakat wrote:
Fantastic, thanks a lot Brian for your help, it works perfectly now.
Brian West sip:brian@freeswitch.org
participants (6)
-
Adnan Barakat
-
Ashutosh
-
Brian West
-
Gonzalo Servat
-
Joseph Bajin
-
Michael Jerris