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