There is a file format called tone_stream that I was trying to explain yesterday.<br><br>tone_stream://<teletone spec><br><br>or <br><br>tone_stream://path=/path/to/text_file.ttml<br><br>you can use this to play tones anywhere a filename is supposed to go.<br>
<br>I guess loopback really is your only option if you must generate ringback.<br>Typically, whatever gateway you are calling out over will go into early media and start playing the real ringback.<br><br><br>You should not execute any apps during the on_ring_execute that block, (playing audio etc)<br>
Media has not even been established at that point and you have nobody to play the audio to anyway,<br>But you will block from that point until the application you chose has ended so you should only execute small apps that <br>
return immediately such as setting a variable etc.<br><br> As for ringback I think you have the whole thing reversed in your head.<br><br><br>the ringback vars etc only apply to the origination (a) leg of a call.<br><br>If you make an inbound call set the ringback variable and then call bridge, the ringback var is parsed on that inbound leg<br>
and the dialout process of the bridge app involves 2 channels the A leg and the B leg. When the B leg gets a ring indication and the A leg detects it, it will begin to play the ringback sound you chose back to the originator of that inbound leg.<br>
<br><br>In the conference or using originate situation, you are doing an outbound call with no relevant inbound call, so there is nothing <br>to generate ringback to. That's why loopback works because it cross connects an outbound call back to an inbound call which gives the bridge app everything it needs to be able to generate artificial ringback.<br>
<br><br><br><br><br><br><br><br><div class="gmail_quote">On Tue, Feb 3, 2009 at 2:25 AM, Sias Mey <span dir="ltr"><<a href="mailto:sias@cpdata.co.za">sias@cpdata.co.za</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hmmm no MOH wont work... since I am planning on pulling more than just 2<br>
members into the conference and I still need ringback for the later<br>
members as well.<br>
<br>
Is there a direct way for me to use conference <number> play <audiofile><br>
to play teletone directly? or should I just records some ringing if I<br>
want to use that?<br>
<br>
And lastly for my own sanity ;-) why would the following in a<br>
on_ring_execute stop execution of the call at that point?<br>
<br>
call = argv[1];<br>
conf = argv[2];<br>
<br>
consoleLog("info","Making ringback channel for uuid : "+ session.uuid<br>
+"\n");<br>
var ringuuid = apiExecute("originate","loopback/ringback-conf="+ conf +"-conf &park()")<br>
<br>
//I tried with and without a exit() at the end<br>
<br>
It seems to stop media detection??(not really sure about the term) for the call that executes this<br>
script.<br>
<br>
Freeswitch doesent recognize the pickup of that call and thus it doesent<br>
get bridged into the conference. when I uuid_kill the call that gets<br>
originated everything else starts happening again.<br>
<br>
Oh Im running this in FS ver. 1.0.trunk (11226:11561M)<br>
<br>
and that loopback points to<br>
<extension name="ringback"><br>
<condition field="destination_number" expression="^ringback-conf=(.*)$"><br>
<action application="javascript" data="ringback.js $1"/><br>
</condition><br>
</extension><br>
<br>
and ringback.js is<br>
<br>
use("TeleTone");<br>
session.answer();<br>
var tts = new TeleTone(session);<br>
<br>
tts.addTone("u", 400.0, 450.0, 0.0);<br>
tts.addTone("r", 440.0, 480.0, 0.0);<br>
<br>
var RESET = "v=2000;>=0;+=0;";<br>
var UK_RING = RESET + "L=2;u(400,200);u(400,2200)";<br>
var US_RING = RESET + "r(2000,4000)";<br>
<br>
while(session.ready()) {<br>
console_log("making UK ring\n");<br>
for (x = 0 ; x < 2 ; x++) {<br>
tts.generate(UK_RING);<br>
}<br>
}<br>
<br>
A slight bastardisation of the teletone JS example.<br>
<br>
I would expected the new channel that is created via a api originate to<br>
be completely seperate from the JS I create it in. (thats why I use api<br>
instead of creating a new session, although I should probably try that<br>
as well).<br>
<br>
I use some CoreDB stuff to keep tabs on the uuid for the originated call<br>
so that I can uuid_kill it in the on_answer_script but as mentioned...<br>
the on_answer only executes after I uuid_kill the originated channel in<br>
the cli...<br>
<br>
Thanks again guys,<br>
Specially since it seems you two are always the ones that get back to<br>
me.<br>
<div><div></div><div class="Wj3C7c"><br>
On Tue, Feb 03, 2009 at 09:22:21AM +0200, Sias Mey wrote:<br>
> Actually loopback does work.<br>
> however as I said it generates a pair of extra channels.<br>
><br>
> Hmmm I was trying to generate and extra call to a JS script that<br>
> generated a teletone ring in an on_ring_execute for the second call<br>
> however it seems to stop execution of the call itself. Event though I<br>
> use api commands to originate and then transfer it into the conference<br>
> so that I have direct access to its uuid.<br>
><br>
> I think changeing the moh might be a bit simpler however and elimite<br>
> some CoreDB stuff I was doing to keep track of the calls ring generating<br>
> call (what a sentance).<br>
><br>
> On Mon, Feb 02, 2009 at 08:01:25AM -0600, Anthony Minessale wrote:<br>
> > you could set the conference moh sound to be tone_stream::// with the<br>
> > teletone spec for ring sound and it use ignore_early_media=true in your<br>
> > originates so the first caller would hear ringback until the 2nd one<br>
> > arrived.<br>
> ><br>
> > On Mon, Feb 2, 2009 at 4:29 AM, Brian West <[1]<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>><br>
> > wrote:<br>
> ><br>
> > Loopback will not work in that case either. If the far end plays<br>
> > ringback inband you should hear that if you use the conference dial<br>
> > api call.<br>
> > /b<br>
> ><br>
> > On Feb 2, 2009, at 4:24 AM, Sias Mey wrote:<br>
> > > Aaah ok.<br>
> > ><br>
> > > Thanks for clearing that up.<br>
> > ><br>
> > > So using loopback is still the only real workable sollution for me,<br>
> > > since that generates ringback from and alternative endpoint and<br>
> > > plays it<br>
> > > into the conference.<br>
> > ><br>
> > > I might play with some javascript that streams ring into the channel<br>
> > > eventually but for now the string comparisons at least get me the<br>
> > > right<br>
> > > uuid.<br>
> > ><br>
> > > Thank you again,<br>
> > > Sias<br>
> ><br>
> > _______________________________________________<br>
> > Freeswitch-users mailing list<br>
> > [2]<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
> > [3]<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> > UNSUBSCRIBE:[4]<a href="http://lists.freeswitch.org/mailman/options/freeswitch-u" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-u</a><br>
> > sers<br>
> > [5]<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> ><br>
> > --<br>
> > Anthony Minessale II<br>
> > FreeSWITCH [6]<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
> > ClueCon [7]<a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
> > AIM: anthm<br>
> > [8]<a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
> > GTALK/JABBER/[9]<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
> > IRC: [10]<a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
> > FreeSWITCH Developer Conference<br>
> > [11]<a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
> > [12]<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
> > [13]<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
> > pstn:213-799-1400<br>
> ><br>
> > References<br>
> ><br>
> > 1. mailto:<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a><br>
> > 2. mailto:<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
> > 3. <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> > 4. <a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> > 5. <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
> > 6. <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
> > 7. <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
> > 8. mailto:<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a><br>
> > 9. mailto:<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">PAYPAL%3Aanthony.minessale@gmail.com</a><br>
> > 10. <a href="http://irc.freenode.net/" target="_blank">http://irc.freenode.net/</a><br>
> > 11. mailto:<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@conference.freeswitch.org</a><br>
> > 12. <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">http://iax:guest@conference.freeswitch.org/888</a><br>
> > 13. mailto:<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a><br>
><br>
> > _______________________________________________<br>
> > Freeswitch-users mailing list<br>
> > <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
> > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
> _______________________________________________<br>
> Freeswitch-users mailing list<br>
> <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>