Non Blocking Teletone (Background Audio)
Hi Folks, I was was wondering if it's possible to play a teletone in a non-blocking way. What I want to achieve is following: 1) Party A calls to my FS box, 2) A Javascript script picks up the call 3) The script generates a teletone to party A. 4) Then the script starts some processing while A is on hold listening for the teletone (or any other audio?) 5) The script dials some other party B 6) Party B picks up 7) Script stops the teletone being played to A 8) Script bridges A and B. As far as I could experiment with teletone.generate, the execution of the script is paused when the teletone is played to the near end (Party A). I would love if you could help me with this. Thanks, Klaus L'Imbecile. -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
You can likely do this with a combination of broadcast (see uuid_broadcast api command) and mod_tone_stream which lets you use teletone just like you are playing a file. Mike On Jun 22, 2008, at 10:49 PM, Klaus Teller wrote:
Hi Folks,
I was was wondering if it's possible to play a teletone in a non- blocking way.
What I want to achieve is following:
1) Party A calls to my FS box, 2) A Javascript script picks up the call 3) The script generates a teletone to party A. 4) Then the script starts some processing while A is on hold listening for the teletone (or any other audio?) 5) The script dials some other party B 6) Party B picks up 7) Script stops the teletone being played to A 8) Script bridges A and B.
As far as I could experiment with teletone.generate, the execution of the script is paused when the teletone is played to the near end (Party A).
I would love if you could help me with this.
Thanks, Klaus L'Imbecile.
-- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
_______________________________________________ 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 for the input Mike. The Wiki says that uuid_broadcast needs few arguments: uuid_broadcast <uuid> <path> [aleg|bleg|both] Any idea how these arguments should be passed to this application? I tried the following without much success: session.execute("uuid_broadcast", "/usr/local/freeswitch/sounds/dialtones/test.wav"); I tried using playback in the same way and with the same argument. Everything worked fine. But it has the same issue as teletone.generate. So, my problem now is that i cant't seem to make sense of how to use uuid_broadcast. I would further appreciate your help. Thanks, Klaus L'Imbecile. -------- Original-Nachricht --------
Datum: Sun, 22 Jun 2008 23:20:50 -0400 Von: Michael Jerris <mike@jerris.com> An: freeswitch-users@lists.freeswitch.org Betreff: Re: [Freeswitch-users] Non Blocking Teletone (Background Audio)
You can likely do this with a combination of broadcast (see uuid_broadcast api command) and mod_tone_stream which lets you use teletone just like you are playing a file.
Mike
On Jun 22, 2008, at 10:49 PM, Klaus Teller wrote:
Hi Folks,
I was was wondering if it's possible to play a teletone in a non- blocking way.
What I want to achieve is following:
1) Party A calls to my FS box, 2) A Javascript script picks up the call 3) The script generates a teletone to party A. 4) Then the script starts some processing while A is on hold listening for the teletone (or any other audio?) 5) The script dials some other party B 6) Party B picks up 7) Script stops the teletone being played to A 8) Script bridges A and B.
As far as I could experiment with teletone.generate, the execution of the script is paused when the teletone is played to the near end (Party A).
I would love if you could help me with this.
Thanks, Klaus L'Imbecile.
-- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
_______________________________________________ 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
-- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
In order to do 2 things at once like that you need 2 threads. Here are your options: 1) Use outbound mode of mod_event_socket to connect to a tcp port and control the call from there. 2) Use the jsrun api call to launch another js in it's own thread and then uuid_bridge the channels. 3) *Easiest* set the ringback variable on the A leg to the teletone script of choice or path to an audio file so when you dial B the A will hear it. On Sun, Jun 22, 2008 at 9:49 PM, Klaus Teller <klaus.teller@gmx.net> wrote:
Hi Folks,
I was was wondering if it's possible to play a teletone in a non-blocking way.
What I want to achieve is following:
1) Party A calls to my FS box, 2) A Javascript script picks up the call 3) The script generates a teletone to party A. 4) Then the script starts some processing while A is on hold listening for the teletone (or any other audio?) 5) The script dials some other party B 6) Party B picks up 7) Script stops the teletone being played to A 8) Script bridges A and B.
As far as I could experiment with teletone.generate, the execution of the script is paused when the teletone is played to the near end (Party A).
I would love if you could help me with this.
Thanks, Klaus L'Imbecile.
-- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
_______________________________________________ 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
I'm trying the third variant without much success. Here is what i do: session.execute("ring_ready"); session.execute("set","ringback=%(2000,4000,440,480)"); session.execute("set", "transfer_ringback=%(2000,4000,440,480)"); The main problem i have is that there is no tone at all. No dial tone, and no ring tone. Any wrong with this code? Thanks, Klaus L'Imbecile. -------- Original-Nachricht --------
Datum: Mon, 23 Jun 2008 08:45:56 -0500 Von: "Anthony Minessale" <anthony.minessale@gmail.com> An: freeswitch-users@lists.freeswitch.org Betreff: Re: [Freeswitch-users] Non Blocking Teletone (Background Audio)
In order to do 2 things at once like that you need 2 threads. Here are your options:
1) Use outbound mode of mod_event_socket to connect to a tcp port and control the call from there. 2) Use the jsrun api call to launch another js in it's own thread and then uuid_bridge the channels. 3) *Easiest* set the ringback variable on the A leg to the teletone script of choice or path to an audio file so when you dial B the A will hear it.
On Sun, Jun 22, 2008 at 9:49 PM, Klaus Teller <klaus.teller@gmx.net> wrote:
Hi Folks,
I was was wondering if it's possible to play a teletone in a non-blocking way.
What I want to achieve is following:
1) Party A calls to my FS box, 2) A Javascript script picks up the call 3) The script generates a teletone to party A. 4) Then the script starts some processing while A is on hold listening for the teletone (or any other audio?) 5) The script dials some other party B 6) Party B picks up 7) Script stops the teletone being played to A 8) Script bridges A and B.
As far as I could experiment with teletone.generate, the execution of the script is paused when the teletone is played to the near end (Party A).
I would love if you could help me with this.
Thanks, Klaus L'Imbecile.
-- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
_______________________________________________ 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
-- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
try to replace "ring_ready" with "pre_answer" if your phone does not support early media you will not be able to generate inband indication. ring_ready is a an app that sends a out of band ringing indication so in the case of SIP it will generate a 180 ringing which will make most devices send a ringback sound. On Mon, Jun 23, 2008 at 8:38 PM, Klaus Teller <klaus.teller@gmx.net> wrote:
I'm trying the third variant without much success. Here is what i do:
session.execute("ring_ready"); session.execute("set","ringback=%(2000,4000,440,480)"); session.execute("set", "transfer_ringback=%(2000,4000,440,480)");
The main problem i have is that there is no tone at all. No dial tone, and no ring tone. Any wrong with this code?
Thanks, Klaus L'Imbecile.
-------- Original-Nachricht --------
Datum: Mon, 23 Jun 2008 08:45:56 -0500 Von: "Anthony Minessale" <anthony.minessale@gmail.com> An: freeswitch-users@lists.freeswitch.org Betreff: Re: [Freeswitch-users] Non Blocking Teletone (Background Audio)
In order to do 2 things at once like that you need 2 threads. Here are your options:
1) Use outbound mode of mod_event_socket to connect to a tcp port and control the call from there. 2) Use the jsrun api call to launch another js in it's own thread and then uuid_bridge the channels. 3) *Easiest* set the ringback variable on the A leg to the teletone script of choice or path to an audio file so when you dial B the A will hear it.
On Sun, Jun 22, 2008 at 9:49 PM, Klaus Teller <klaus.teller@gmx.net> wrote:
Hi Folks,
I was was wondering if it's possible to play a teletone in a non-blocking way.
What I want to achieve is following:
1) Party A calls to my FS box, 2) A Javascript script picks up the call 3) The script generates a teletone to party A. 4) Then the script starts some processing while A is on hold listening for the teletone (or any other audio?) 5) The script dials some other party B 6) Party B picks up 7) Script stops the teletone being played to A 8) Script bridges A and B.
As far as I could experiment with teletone.generate, the execution of the script is paused when the teletone is played to the near end (Party A).
I would love if you could help me with this.
Thanks, Klaus L'Imbecile.
-- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
_______________________________________________ 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>< MSN%3Aanthony_minessale@hotmail.com<MSN%253Aanthony_minessale@hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> <PAYPAL%3Aanthony.minessale@gmail.com<PAYPAL%253Aanthony.minessale@gmail.com>
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org>< sip%3A888@conference.freeswitch.org<sip%253A888@conference.freeswitch.org>
iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> <googletalk%3Aconf%2B888@conference.freeswitch.org<googletalk%253Aconf%252B888@conference.freeswitch.org>
pstn:213-799-1400
-- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
_______________________________________________ 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
participants (3)
-
Anthony Minessale
-
Klaus Teller
-
Michael Jerris