VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
dome at tel.co.th Guest
|
Posted: Sat Jun 27, 2009 1:49 am Post subject: [Freeswitch-users] How to cancel session in Javascript |
|
|
Dear All,
I try
s = new Session("sofia/external/xxx@xxx.xxx.xxx.xxx);
if (s.ready()){
s.setVariable("nibble_rate", "2.5");
s.setVariable("nibble_account", "0838833133");
s.execute("nibblebill", "heartbeat 5");
bridge(session,s);
};
my question is
1. How to cancel create s session (by dtmf ) like a * in bridge app
2. when i hangup before s session ready is posible to cancel ?
Best Regards.
Dome C.
_______________________________________________
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 |
|
|
msc at freeswitch.org Guest
|
Posted: Mon Jun 29, 2009 12:49 pm Post subject: [Freeswitch-users] How to cancel session in Javascript |
|
|
What kind of application are you building? Usually you want to use the dialplan to initiate the call and then let the js do the logical heavy lifting.
-MC
On Fri, Jun 26, 2009 at 11:45 PM, Dome Charoenyost <dome@tel.co.th (dome@tel.co.th)> wrote:
|
|
Back to top |
|
|
dome at tel.co.th Guest
|
Posted: Tue Jun 30, 2009 1:08 am Post subject: [Freeswitch-users] How to cancel session in Javascript |
|
|
2009/6/30 Michael Collins <msc@freeswitch.org>:
Quote: | What kind of application are you building? Usually you want to use the
dialplan to initiate the call and then let the js do the logical heavy
lifting.
| I'm use js for callback solution.
Dome C.
_______________________________________________
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 |
|
|
msc at freeswitch.org Guest
|
Posted: Tue Jun 30, 2009 1:20 am Post subject: [Freeswitch-users] How to cancel session in Javascript |
|
|
can you post your script and dialplan? Let's take a look.
-MC
On Mon, Jun 29, 2009 at 11:07 PM, Dome Charoenyost <dome@tel.co.th (dome@tel.co.th)> wrote:
|
|
Back to top |
|
|
dome at tel.co.th Guest
|
Posted: Tue Jun 30, 2009 2:02 am Post subject: [Freeswitch-users] How to cancel session in Javascript |
|
|
2009/6/30 Michael Collins <msc@freeswitch.org>:
Quote: | can you post your script and dialplan? Let's take a look.
-MC
| dialstr[i] is array like a sofia/external/1111@xxx.xxx.xxx.xxx
dial_option =
"{absolute_codec_string='GSM,G729',ignore_early_media=false,originate_timeout=20,origination_caller_id=xxxxx}
for (var i = 1; i <= 3; i++){
if (session.ready()){
session.execute("set", "hangup_after_bridge=false");
result = session.setAutoHangup(false);
s1 = new Session(dial_option+dialstr[i]);
}
if (s1.ready()){
s1.setVariable("nibble_rate", "2.5");
s1.execute("set", "hangup_after_bridge=false");
s1.setVariable("nibble_account", acaller);
s1.setVariable("provider_id", dialprovider_id[i]);
s1.setVariable("provider", dialprovider[i]);
s1.setVariable("service_charge", dialservice_charge[i]);
s1.execute("set", "destination_number="+number);
s1.execute("nibblebill", "heartbeat 5");
bridge(session,s1);
console_log("notice", "Disconnect cause: " + s1.cause + "
Code:"+s1.causecode+"\n");
};
if (s1.causecode==16 || s1.causecode==0){
i =10;
};
};
_______________________________________________
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 Jun 30, 2009 11:08 am Post subject: [Freeswitch-users] How to cancel session in Javascript |
|
|
the bridge app already does all this for you doesn't it (along with
bind_meta) ?
Mike
On Jun 27, 2009, at 2:45 AM, Dome Charoenyost wrote:
Quote: | Dear All,
I try
s = new Session("sofia/external/xxx@xxx.xxx.xxx.xxx);
if (s.ready()){
s.setVariable("nibble_rate", "2.5");
s.setVariable("nibble_account", "0838833133");
s.execute("nibblebill", "heartbeat 5");
bridge(session,s);
};
my question is
1. How to cancel create s session (by dtmf ) like a * in bridge app
2. when i hangup before s session ready is posible to cancel ?
Best Regards.
Dome C.
|
_______________________________________________
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 |
|
|
msc at freeswitch.org Guest
|
Posted: Tue Jun 30, 2009 11:54 am Post subject: [Freeswitch-users] How to cancel session in Javascript |
|
|
On Tue, Jun 30, 2009 at 9:03 AM, Michael Jerris <mike@jerris.com (mike@jerris.com)> wrote:
Quote: | the bridge app already does all this for you doesn't it (along with
bind_meta) ?
Mike
|
In other words, everything you want is available in the dialplan with no overheard from launching a JS.
-MC |
|
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
|