There is a file format called tone_stream that I was trying to explain yesterday.<br><br>tone_stream://&lt;teletone spec&gt;<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>&nbsp;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.&nbsp; 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.&nbsp; That&#39;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">&lt;<a href="mailto:sias@cpdata.co.za">sias@cpdata.co.za</a>&gt;</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 &lt;number&gt; play &lt;audiofile&gt;<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(&quot;info&quot;,&quot;Making ringback channel for uuid : &quot;+ session.uuid<br>
+&quot;\n&quot;);<br>
var ringuuid = apiExecute(&quot;originate&quot;,&quot;loopback/ringback-conf=&quot;+ conf +&quot;-conf &amp;park()&quot;)<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>
&lt;extension name=&quot;ringback&quot;&gt;<br>
&lt;condition field=&quot;destination_number&quot; expression=&quot;^ringback-conf=(.*)$&quot;&gt;<br>
&lt;action application=&quot;javascript&quot; data=&quot;ringback.js $1&quot;/&gt;<br>
&lt;/condition&gt;<br>
&lt;/extension&gt;<br>
<br>
and ringback.js is<br>
<br>
use(&quot;TeleTone&quot;);<br>
session.answer();<br>
var tts = new TeleTone(session);<br>
<br>
tts.addTone(&quot;u&quot;, 400.0, 450.0, 0.0);<br>
tts.addTone(&quot;r&quot;, 440.0, 480.0, 0.0);<br>
<br>
var RESET = &quot;v=2000;&gt;=0;+=0;&quot;;<br>
var UK_RING = RESET + &quot;L=2;u(400,200);u(400,2200)&quot;;<br>
var US_RING = RESET + &quot;r(2000,4000)&quot;;<br>
<br>
while(session.ready()) {<br>
 &nbsp;console_log(&quot;making UK ring\n&quot;);<br>
 &nbsp; &nbsp;for (x = 0 ; x &lt; 2 ; x++) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;tts.generate(UK_RING);<br>
 &nbsp; &nbsp;}<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>
&gt; Actually loopback does work.<br>
&gt; however as I said it generates a pair of extra channels.<br>
&gt;<br>
&gt; Hmmm I was trying to generate and extra call to a JS script that<br>
&gt; generated a teletone ring in an on_ring_execute for the second call<br>
&gt; however it seems to stop execution of the call itself. Event though I<br>
&gt; use api commands to originate and then transfer it into the conference<br>
&gt; so that I have direct access to its uuid.<br>
&gt;<br>
&gt; I think changeing the moh might be a bit simpler however and elimite<br>
&gt; some CoreDB stuff I was doing to keep track of the calls ring generating<br>
&gt; call (what a sentance).<br>
&gt;<br>
&gt; On Mon, Feb 02, 2009 at 08:01:25AM -0600, Anthony Minessale wrote:<br>
&gt; &gt; &nbsp; &nbsp;you could set the conference moh sound to be tone_stream::// with the<br>
&gt; &gt; &nbsp; &nbsp;teletone spec for ring sound and it use ignore_early_media=true in your<br>
&gt; &gt; &nbsp; &nbsp;originates so the first caller would hear ringback until the 2nd one<br>
&gt; &gt; &nbsp; &nbsp;arrived.<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp;On Mon, Feb 2, 2009 at 4:29 AM, Brian West &lt;[1]<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>&gt;<br>
&gt; &gt; &nbsp; &nbsp;wrote:<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp;Loopback will not work in that case either. &nbsp;If the far end plays<br>
&gt; &gt; &nbsp; &nbsp; &nbsp;ringback inband you should hear that if you use the conference dial<br>
&gt; &gt; &nbsp; &nbsp; &nbsp;api call.<br>
&gt; &gt; &nbsp; &nbsp; &nbsp;/b<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp;On Feb 2, 2009, at 4:24 AM, Sias Mey wrote:<br>
&gt; &gt; &nbsp; &nbsp;&gt; Aaah ok.<br>
&gt; &gt; &nbsp; &nbsp;&gt;<br>
&gt; &gt; &nbsp; &nbsp;&gt; Thanks for clearing that up.<br>
&gt; &gt; &nbsp; &nbsp;&gt;<br>
&gt; &gt; &nbsp; &nbsp;&gt; So using loopback is still the only real workable sollution for me,<br>
&gt; &gt; &nbsp; &nbsp;&gt; since that generates ringback from and alternative endpoint and<br>
&gt; &gt; &nbsp; &nbsp;&gt; plays it<br>
&gt; &gt; &nbsp; &nbsp;&gt; into the conference.<br>
&gt; &gt; &nbsp; &nbsp;&gt;<br>
&gt; &gt; &nbsp; &nbsp;&gt; I might play with some javascript that streams ring into the channel<br>
&gt; &gt; &nbsp; &nbsp;&gt; eventually but for now the string comparisons at least get me the<br>
&gt; &gt; &nbsp; &nbsp;&gt; right<br>
&gt; &gt; &nbsp; &nbsp;&gt; uuid.<br>
&gt; &gt; &nbsp; &nbsp;&gt;<br>
&gt; &gt; &nbsp; &nbsp;&gt; Thank you again,<br>
&gt; &gt; &nbsp; &nbsp;&gt; Sias<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp;_______________________________________________<br>
&gt; &gt; &nbsp; &nbsp;Freeswitch-users mailing list<br>
&gt; &gt; &nbsp; &nbsp;[2]<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; &gt; &nbsp; &nbsp;[3]<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; &gt; &nbsp; &nbsp;UNSUBSCRIBE:[4]<a href="http://lists.freeswitch.org/mailman/options/freeswitch-u" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-u</a><br>
&gt; &gt; &nbsp; &nbsp;sers<br>
&gt; &gt; &nbsp; &nbsp;[5]<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp;--<br>
&gt; &gt; &nbsp; &nbsp;Anthony Minessale II<br>
&gt; &gt; &nbsp; &nbsp;FreeSWITCH [6]<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
&gt; &gt; &nbsp; &nbsp;ClueCon [7]<a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
&gt; &gt; &nbsp; &nbsp;AIM: anthm<br>
&gt; &gt; &nbsp; &nbsp;[8]<a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
&gt; &gt; &nbsp; &nbsp;GTALK/JABBER/[9]<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
&gt; &gt; &nbsp; &nbsp;IRC: [10]<a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
&gt; &gt; &nbsp; &nbsp;FreeSWITCH Developer Conference<br>
&gt; &gt; &nbsp; &nbsp;[11]<a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
&gt; &gt; &nbsp; &nbsp;[12]<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
&gt; &gt; &nbsp; &nbsp;[13]<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
&gt; &gt; &nbsp; &nbsp;pstn:213-799-1400<br>
&gt; &gt;<br>
&gt; &gt; References<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp;1. mailto:<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a><br>
&gt; &gt; &nbsp; &nbsp;2. mailto:<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; &gt; &nbsp; &nbsp;3. <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; &gt; &nbsp; &nbsp;4. <a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; &gt; &nbsp; &nbsp;5. <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
&gt; &gt; &nbsp; &nbsp;6. <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
&gt; &gt; &nbsp; &nbsp;7. <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
&gt; &gt; &nbsp; &nbsp;8. mailto:<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a><br>
&gt; &gt; &nbsp; &nbsp;9. mailto:<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">PAYPAL%3Aanthony.minessale@gmail.com</a><br>
&gt; &gt; &nbsp; 10. <a href="http://irc.freenode.net/" target="_blank">http://irc.freenode.net/</a><br>
&gt; &gt; &nbsp; 11. mailto:<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@conference.freeswitch.org</a><br>
&gt; &gt; &nbsp; 12. <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">http://iax:guest@conference.freeswitch.org/888</a><br>
&gt; &gt; &nbsp; 13. mailto:<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a><br>
&gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Freeswitch-users mailing list<br>
&gt; &gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; &gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; &gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <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>