VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
birgit at westhawk.co.uk Guest
|
Posted: Tue Oct 14, 2008 12:22 pm Post subject: [Freeswitch-users] Managing a conference in JS |
|
|
Hi all,
I'm trying to manage a conference call in js. I found an example on the
FS wiki:
http://wiki.freeswitch.org/wiki/Examples_confcall_js
I know that using
session.execute("conference", route + "@default");
I can drop a existing (originated) call into a conference.
Reading http://wiki.freeswitch.org/wiki/Mod_conference, I see that it's
possible to create a conference and controls things from within the
conference.
How could I do that in JS?
In other words:
Is it possible to do in one JS script:
- create an empty conference
- dial someone from that conference (and drop them in)
- dial another person from that same conference (and drop them in)
- dial a third person ...
- dial a Nth person ...
- wait until all (or all but one) hang up and drop the conference
Cheers, Birgit
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
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 |
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Tue Oct 14, 2008 12:54 pm Post subject: [Freeswitch-users] Managing a conference in JS |
|
|
On Oct 14, 2008, at 1:13 PM, Birgit Arkesteijn wrote:
Quote: | Hi all,
I'm trying to manage a conference call in js. I found an example on
the
FS wiki:
http://wiki.freeswitch.org/wiki/Examples_confcall_js
I know that using
session.execute("conference", route + "@default");
I can drop a existing (originated) call into a conference.
Reading http://wiki.freeswitch.org/wiki/Mod_conference, I see that
it's
possible to create a conference and controls things from within the
conference.
How could I do that in JS?
In other words:
Is it possible to do in one JS script:
- create an empty conference
|
Conferences are completely dynamic, there is no need to create them.
Quote: | - dial someone from that conference (and drop them in)
|
Use apiExecute, for the first member you should use originate, not
conference dial
Quote: | - dial another person from that same conference (and drop them in)
|
apiExecute conference dial fsapi command
Quote: | - dial a third person ...
- dial a Nth person ...
- wait until all (or all but one) hang up and drop the conference
|
Conferences are completely dynamic, there is no need to destroy them.
_______________________________________________
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 |
|
Back to top |
|
|
birgit at westhawk.co.uk Guest
|
Posted: Wed Oct 15, 2008 5:25 am Post subject: [Freeswitch-users] Managing a conference in JS |
|
|
Hi Mike,
Thanks for your answer.
I take it that apiExecute, translates to session.execute();?
I've tried, but so far I cannot manage to do the below all in the same
script: The call to session.excute("conference", ...) doesn't return
until the session hangs up. Therefore I don't know how to bridge,
transfer or dial the next person into the conference.
I found 'bgapi', but I don't know how to incorporate this into a js script.
Quick snippet of what I've done.
Script "conference1.js":
var cSession = new
Session("{ignore_early_media=true,call_timeout=5}sofia/gateway/westhawk/0662");
while (cSession.ready()) {
console_log("info", "put cSession in conf");
cSession.execute("conference", "522@default");
console_log("info", "after put cSession in conf");
}
(end of script)
On the console, I run the script as:
Quote: | jsrun conference1.js.
|
I only get the second 'console_log' until hangup.
Cheers, Birgit
On 14/10/08 18:38, Michael Jerris wrote:
Quote: | On Oct 14, 2008, at 1:13 PM, Birgit Arkesteijn wrote:
Quote: | Hi all,
I'm trying to manage a conference call in js. I found an example on
the
FS wiki:
http://wiki.freeswitch.org/wiki/Examples_confcall_js
I know that using
session.execute("conference", route + "@default");
I can drop a existing (originated) call into a conference.
Reading http://wiki.freeswitch.org/wiki/Mod_conference, I see that
it's
possible to create a conference and controls things from within the
conference.
How could I do that in JS?
In other words:
Is it possible to do in one JS script:
- create an empty conference
|
Conferences are completely dynamic, there is no need to create them.
Quote: | - dial someone from that conference (and drop them in)
|
Use apiExecute, for the first member you should use originate, not
conference dial
Quote: | - dial another person from that same conference (and drop them in)
|
apiExecute conference dial fsapi command
Quote: | - dial a third person ...
- dial a Nth person ...
- wait until all (or all but one) hang up and drop the conference
|
Conferences are completely dynamic, there is no need to destroy them.
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
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 |
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Wed Oct 15, 2008 7:00 am Post subject: [Freeswitch-users] Managing a conference in JS |
|
|
On Oct 15, 2008, at 6:03 AM, Birgit Arkesteijn <birgit@westhawk.co.uk>
wrote:
Quote: | Hi Mike,
Thanks for your answer.
I take it that apiExecute, translates to session.execute();?
|
Nope, it's just apiExecute. Search on the wiki for more info.
Mike
Quote: |
I've tried, but so far I cannot manage to do the below all in the same
script: The call to session.excute("conference", ...) doesn't return
until the session hangs up. Therefore I don't know how to bridge,
transfer or dial the next person into the conference.
I found 'bgapi', but I don't know how to incorporate this into a js
script.
Quick snippet of what I've done.
Script "conference1.js":
var cSession = new
Session("{ignore_early_media=true,call_timeout=5}sofia/gateway/
westhawk/0662");
while (cSession.ready()) {
console_log("info", "put cSession in conf");
cSession.execute("conference", "522@default");
console_log("info", "after put cSession in conf");
}
(end of script)
On the console, I run the script as:
Quote: | jsrun conference1.js.
|
I only get the second 'console_log' until hangup.
Cheers, Birgit
On 14/10/08 18:38, Michael Jerris wrote:
Quote: | On Oct 14, 2008, at 1:13 PM, Birgit Arkesteijn wrote:
Quote: | Hi all,
I'm trying to manage a conference call in js. I found an example on
the
FS wiki:
http://wiki.freeswitch.org/wiki/Examples_confcall_js
I know that using
session.execute("conference", route + "@default");
I can drop a existing (originated) call into a conference.
Reading http://wiki.freeswitch.org/wiki/Mod_conference, I see that
it's
possible to create a conference and controls things from within the
conference.
How could I do that in JS?
In other words:
Is it possible to do in one JS script:
- create an empty conference
|
Conferences are completely dynamic, there is no need to create them.
Quote: | - dial someone from that conference (and drop them in)
|
Use apiExecute, for the first member you should use originate, not
conference dial
Quote: | - dial another person from that same conference (and drop them in)
|
apiExecute conference dial fsapi command
Quote: | - dial a third person ...
- dial a Nth person ...
- wait until all (or all but one) hang up and drop the conference
|
Conferences are completely dynamic, there is no need to destroy them.
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
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 |
|
Back to top |
|
|
birgit at westhawk.co.uk Guest
|
Posted: Wed Oct 15, 2008 10:23 am Post subject: [Freeswitch-users] Managing a conference in JS |
|
|
Hi Mike,
Thanks again for your answer.
I found the page:
http://wiki.freeswitch.org/wiki/ApiExecute
Sorry to be such a pain, but could you help me out a bit more, please.
I'm struggling to drop my first originated my call into a conference.
var cSession = new
Session("{ignore_early_media=true,call_timeout=5}sofia/gateway/westhawk/0662");
Now how do I drop this session into a new conference, using apiExecute?
None of the mod_conference api calls that an uuid parameter of a call
that is not already inside the conference.
I can only make it work with
cSession.execute("conference", "25@default");
but that doesn't return.
Cheers, Birgit
On 15/10/08 12:53, Michael Jerris wrote:
Quote: |
On Oct 15, 2008, at 6:03 AM, Birgit Arkesteijn <birgit@westhawk.co.uk>
wrote:
Quote: | Hi Mike,
Thanks for your answer.
I take it that apiExecute, translates to session.execute();?
|
Nope, it's just apiExecute. Search on the wiki for more info.
Mike
Quote: |
On 14/10/08 18:38, Michael Jerris wrote:
Quote: | On Oct 14, 2008, at 1:13 PM, Birgit Arkesteijn wrote:
Quote: | Hi all,
I'm trying to manage a conference call in js. I found an example on
the
FS wiki:
http://wiki.freeswitch.org/wiki/Examples_confcall_js
I know that using
session.execute("conference", route + "@default");
I can drop a existing (originated) call into a conference.
Reading http://wiki.freeswitch.org/wiki/Mod_conference, I see that
it's
possible to create a conference and controls things from within the
conference.
How could I do that in JS?
In other words:
Is it possible to do in one JS script:
- create an empty conference
| Conferences are completely dynamic, there is no need to create them.
Quote: | - dial someone from that conference (and drop them in)
| Use apiExecute, for the first member you should use originate, not
conference dial
Quote: | - dial another person from that same conference (and drop them in)
| apiExecute conference dial fsapi command
Quote: | - dial a third person ...
- dial a Nth person ...
- wait until all (or all but one) hang up and drop the conference
| Conferences are completely dynamic, there is no need to destroy them.
|
|
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
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 |
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Wed Oct 15, 2008 10:47 am Post subject: [Freeswitch-users] Managing a conference in JS |
|
|
For the first call, if all you need to do is send it into conference,
you can just use the originate api command with apiExecute.
Mike
On Oct 15, 2008, at 10:12 AM, Birgit Arkesteijn wrote:
Quote: | Hi Mike,
Thanks again for your answer.
I found the page:
http://wiki.freeswitch.org/wiki/ApiExecute
Sorry to be such a pain, but could you help me out a bit more, please.
I'm struggling to drop my first originated my call into a conference.
var cSession = new
Session("{ignore_early_media=true,call_timeout=5}sofia/gateway/
westhawk/0662");
Now how do I drop this session into a new conference, using
apiExecute?
None of the mod_conference api calls that an uuid parameter of a call
that is not already inside the conference.
I can only make it work with
cSession.execute("conference", "25@default");
but that doesn't return.
Cheers, Birgit
|
_______________________________________________
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 |
|
Back to top |
|
|
birgit at westhawk.co.uk Guest
|
Posted: Wed Oct 15, 2008 11:50 am Post subject: [Freeswitch-users] Managing a conference in JS |
|
|
Hi Mike,
var res = apiExecute("originate", "sofia/gateway/westhawk/0662
'&conference(25@default)'");
console_log("info", "after apiExecute: " + res);
Well, that worked, thanks!
However, is there a way to create a session first, and then bridge,
transfer or whatever to a conference?
Using a session object gives me the chance to use setHangupHook(). I
need to do some db admin when the first user hangs up.
Also we might introduce TAD, so I need a time window between the call
being answered and pushing it into the conference, so I can make sure it
is a real person.
I tried extending the new Session command below with a 'conference'
command, but that returned an error:
var cSession = new
Session("{ignore_early_media=true,call_timeout=5}sofia/gateway/doneright/0662
'&conference(25@default)'");
"You must call the session.originate method before calling this method!
"
Cheers, Birgit
On 15/10/08 15:34, Michael Jerris wrote:
Quote: | For the first call, if all you need to do is send it into conference,
you can just use the originate api command with apiExecute.
Mike
On Oct 15, 2008, at 10:12 AM, Birgit Arkesteijn wrote:
Quote: | Hi Mike,
Thanks again for your answer.
I found the page:
http://wiki.freeswitch.org/wiki/ApiExecute
Sorry to be such a pain, but could you help me out a bit more, please.
I'm struggling to drop my first originated my call into a conference.
var cSession = new
Session("{ignore_early_media=true,call_timeout=5}sofia/gateway/
westhawk/0662");
Now how do I drop this session into a new conference, using
apiExecute?
None of the mod_conference api calls that an uuid parameter of a call
that is not already inside the conference.
I can only make it work with
cSession.execute("conference", "25@default");
but that doesn't return.
Cheers, Birgit
|
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|