playing sound file without answering the call
Hi All, Is it possible to play a sound file without answering the call in free switch ? -- Thanks and Regards Vidhya Sagar Dixit
Hi, I am dialing from softphone to pstn using freeswitch. Is it possible to play a sound file before connecting the call. when dial from softphone i should hear first the sound file lets say welcome.wav and then dial the number. On Tue, Aug 19, 2008 at 2:10 PM, James Green <james.green@stealthnet.net>wrote:
vidhya sagar dixit wrote:
Hi All,
Is it possible to play a sound file without answering the call in free switch ?
To whom?
James
_______________________________________________ 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
-- Thanks and Regards Vidhya Sagar Dixit
Let me explain why i need this. I have a written a small script which will get balance from database and play the balance and after that connect the call by using session.originate. Dialing 009199XXXXXXX will call test.js which will first play balance and then dial 9199XXXXXX. Now the problem is : *If i answer the call first and then play balance and then dial number . Call goes fine but the the session time calculated by freeswitch is from dialing 009199XXXXXXX till the end of call. * which is wrong it should calculate only the call duration of new session originated by js. *If not answer the call, duration is correct but it will not play the balance. * On Tue, Aug 19, 2008 at 2:15 PM, vidhya sagar dixit <vids.cs@gmail.com>wrote:
Hi,
I am dialing from softphone to pstn using freeswitch. Is it possible to play a sound file before connecting the call.
when dial from softphone i should hear first the sound file lets say welcome.wav and then dial the number.
On Tue, Aug 19, 2008 at 2:10 PM, James Green <james.green@stealthnet.net>wrote:
vidhya sagar dixit wrote:
Hi All,
Is it possible to play a sound file without answering the call in free switch ?
To whom?
James
_______________________________________________ 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
-- Thanks and Regards
Vidhya Sagar Dixit
-- Thanks and Regards Vidhya Sagar Dixit
Hi - The answer to your initial question is "it depends." The ringtone that a caller hears is generated by a switch at the far end of a call - that's why, when you call people in different countries, you will usually hear the ringtone for that country. If that switch is before you in the chain - as it will be if, for example, you're receiving the calls via an analogue line - then you cannot play audio to the caller without answering the call. If there isn't a switch before you in the chain which believes that it's its job to generate ringtone, then you can play audio to the caller before answering. If you can do what you want calling FS directly from a softphone on your desk - I use X-Lite - then you've done your bit. If it doesn't work when calling via the PSTN (but you hear ringing while the "your balance is.." message is playing, then someone between FS and the caller is generating that ringtone. Cheers -- Dave
Let me explain why i need this.
I have a written a small script which will get balance from database and play the balance and after that connect the call by using session.originate.
Dialing 009199XXXXXXX will call test.js which will first play balance and then dial 9199XXXXXX.
Now the problem is :
If i answer the call first and then play balance and then dial number .
Call goes fine but the the session time calculated by freeswitch is from dialing 009199XXXXXXX till the end of call.
which is wrong it should calculate only the call duration of new session originated by js.
If not answer the call, duration is correct but it will not play the balance.
On Tue, Aug 19, 2008 at 2:15 PM, vidhya sagar dixit <vids.cs@gmail.com> wrote: Hi,
I am dialing from softphone to pstn using freeswitch. Is it possible to play a sound file before connecting the call.
when dial from softphone i should hear first the sound file lets say welcome.wav and then dial the number.
On Tue, Aug 19, 2008 at 2:10 PM, James Green <james.green@stealthnet.net
wrote: vidhya sagar dixit wrote: Hi All,
Is it possible to play a sound file without answering the call in free switch ?
To whom?
James
_______________________________________________ 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
-- Thanks and Regards
Vidhya Sagar Dixit
-- Thanks and Regards
Vidhya Sagar Dixit _______________________________________________ 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
Hi Dave, Thanks for the reply but the problem here is : if i want to play message your account balance is xxx then i must answer my call in starting of js before playing file which creates a session. so basically here are two sessions and call is answered 2 times . After answering the call and playing account balance it originates call from js and creates another session. Now what i need is the exact session time(the time between end user answered the call and the disconnect time of the call) of new session . I hope i was able to explain . here is my js script: ====start ======== var DialNumber = '12127773456'; console_log("notice", "Your destination :"+DialNumber+"\n"); var dialstr = "sofia/external/"+DialNumber+"@192.168.1.10:5090"; new_session = new Session(); new_session.setCallerData("caller_id_name", "ABC"); new_session.setCallerData("caller_id_number", "2121231234"); new_session.originate(session, dialstr,60); bridge(session, new_session); var Acallduration=session.getVariable("billsec"); var p1time=session.getVariable("progresssec"); var p4time=session.getVariable("duration"); var Bcallduration=new_session.getVariable("billsec"); var ptime=new_session.getVariable("progresssec"); var p5time=new_session.getVariable("duration"); console_log("notice", "Your old session time bill duration:"+Acallduration+"\n"); console_log("notice", "Your old session progress time :"+p1time+"\n"); console_log("notice", "Your old session total time :"+p4time+"\n"); console_log("notice", "Your new session time :"+Bcallduration+"\n"); console_log("notice", "Your new session progress time :"+ptime+"\n"); console_log("notice", "Your new session total time :"+p5time+"\n"); new_session.hangup(); session.hangup(); ===end=== On Tue, Aug 19, 2008 at 3:27 PM, David Knell <dave@3c.co.uk> wrote:
Hi - The answer to your initial question is "it depends." The ringtone that a caller hears is generated by a switch at the far end of a call - that's why, when you call people in different countries, you will usually hear the ringtone for that country. If that switch is before you in the chain - as it will be if, for example, you're receiving the calls via an analogue line - then you cannot play audio to the caller without answering the call. If there isn't a switch before you in the chain which believes that it's its job to generate ringtone, then you can play audio to the caller before answering.
If you can do what you want calling FS directly from a softphone on your desk - I use X-Lite - then you've done your bit. If it doesn't work when calling via the PSTN (but you hear ringing while the "your balance is.." message is playing, then someone between FS and the caller is generating that ringtone.
Cheers --
Dave
Let me explain why i need this.
I have a written a small script which will get balance from database and play the balance and after that connect the call by using session.originate.
Dialing 009199XXXXXXX will call test.js which will first play balance and then dial 9199XXXXXX.
Now the problem is :
*If i answer the call first and then play balance and then dial number .
Call goes fine but the the session time calculated by freeswitch is from dialing 009199XXXXXXX till the end of call. * which is wrong it should calculate only the call duration of new session originated by js.
*If not answer the call, duration is correct but it will not play the balance. *
On Tue, Aug 19, 2008 at 2:15 PM, vidhya sagar dixit <vids.cs@gmail.com>wrote:
Hi,
I am dialing from softphone to pstn using freeswitch. Is it possible to play a sound file before connecting the call.
when dial from softphone i should hear first the sound file lets say welcome.wav and then dial the number.
On Tue, Aug 19, 2008 at 2:10 PM, James Green <james.green@stealthnet.net>wrote:
vidhya sagar dixit wrote:
Hi All,
Is it possible to play a sound file without answering the call in free switch ?
To whom?
James
_______________________________________________ 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
-- Thanks and Regards
Vidhya Sagar Dixit
-- Thanks and Regards
Vidhya Sagar Dixit _______________________________________________ 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
_______________________________________________ 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
-- Thanks and Regards Vidhya Sagar Dixit
Using setCallerData isn't the proper way to set the callerid. http://wiki.freeswitch.org/wiki/Channel_Variables#origination_caller_id_name and http://wiki.freeswitch.org/wiki/Channel_Variables#origination_caller_id_numb... As for playing a file to the called party try http://wiki.freeswitch.org/wiki/Channel_Variables#group_confirm_file /b On Aug 19, 2008, at 6:39 AM, vidhya sagar dixit wrote:
new_session.setCallerData("caller_id_name", "ABC");
new_session.setCallerData("caller_id_number", "2121231234");
Brian West sip:brian@freeswitch.org
Does this apply to: http://wiki.freeswitch.org/wiki/Session_waitForAnswer http://wiki.freeswitch.org/wiki/Session_originate I can update the wiki if so. On Tue, Aug 19, 2008 at 3:18 PM, Brian West <brian@freeswitch.org> wrote:
Using setCallerData isn't the proper way to set the callerid.
http://wiki.freeswitch.org/wiki/Channel_Variables#origination_caller_id_name
and
http://wiki.freeswitch.org/wiki/Channel_Variables#origination_caller_id_numb...
As for playing a file to the called party try
http://wiki.freeswitch.org/wiki/Channel_Variables#group_confirm_file
/b
On Aug 19, 2008, at 6:39 AM, vidhya sagar dixit wrote:
new_session.setCallerData("caller_id_name", "ABC");
new_session.setCallerData("caller_id_number", "2121231234");
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
If it does not play the balance when you do not answer. That means that the softphone does not support early media. Because, by default, if you play audio on a non-answered call it will establish early media automaticly. I bet if you look at the sip traffic you will see a 183+sdp right when the file plays. I actually know for a fact that eyebeam/x-lite ignores early media which I think is a limitation of the software and a much needed improvement. On Tue, Aug 19, 2008 at 8:43 AM, Jonas Gauffin <jonas.gauffin@gmail.com>wrote:
Does this apply to:
http://wiki.freeswitch.org/wiki/Session_waitForAnswer http://wiki.freeswitch.org/wiki/Session_originate
I can update the wiki if so.
On Tue, Aug 19, 2008 at 3:18 PM, Brian West <brian@freeswitch.org> wrote:
Using setCallerData isn't the proper way to set the callerid.
http://wiki.freeswitch.org/wiki/Channel_Variables#origination_caller_id_name
and
http://wiki.freeswitch.org/wiki/Channel_Variables#origination_caller_id_numb...
As for playing a file to the called party try
http://wiki.freeswitch.org/wiki/Channel_Variables#group_confirm_file
/b
On Aug 19, 2008, at 6:39 AM, vidhya sagar dixit wrote:
new_session.setCallerData("caller_id_name", "ABC");
new_session.setCallerData("caller_id_number", "2121231234");
Brian West sip:brian@freeswitch.org <sip%3Abrian@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
_______________________________________________ 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 <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Anthony Minessale wrote:
I actually know for a fact that eyebeam/x-lite ignores early media which I think is a limitation of the software and a much needed improvement. Mine (X-Lite 3.0 on a Mac) plays early media just fine - it starts off with its own ringback, but will switch if something else is sent.
--Dave
thanks guys i got it fixed. i have used session.preanswer() and then streamfile . On Tue, Aug 19, 2008 at 8:45 PM, David Knell <dave@3c.co.uk> wrote:
Anthony Minessale wrote:
I actually know for a fact that eyebeam/x-lite ignores early media which I think is a limitation of the software and a much needed improvement. Mine (X-Lite 3.0 on a Mac) plays early media just fine - it starts off with its own ringback, but will switch if something else is sent.
--Dave
_______________________________________________ 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
-- Thanks and Regards Vidhya Sagar Dixit
participants (6)
-
Anthony Minessale
-
Brian West
-
David Knell
-
James Green
-
Jonas Gauffin
-
vidhya sagar dixit