VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
mattdfong at gmail.com Guest
|
Posted: Fri May 22, 2009 12:45 am Post subject: [Freeswitch-users] Best way to determine if a bridge was suc |
|
|
I'm using a lua script to control an IVR, and would like to know how I can tell if a
session:execute("bridge","sofia/gateway/blahblah");
was successful or not
it seems the response from session:execute is nil regardless if the bridge was successful or not
whats the best way? Thanks
--matt |
|
Back to top |
|
|
mattdfong at gmail.com Guest
|
Posted: Fri May 22, 2009 1:10 am Post subject: [Freeswitch-users] Best way to determine if a bridge was suc |
|
|
hrm...it's also seems to be that if my lua script looks like
session:execute("bridge", "sofia/gateway/XXX/0XXXXX")
session:execute("bridge", "sofia/gateway/XXXX/XXX")
if the first bridge fails, the session is immediately hungup, even if hangup_after_bridge is set to false...is this the intended behavior?
I'm not trying to setup failover--I know I can use | to setup a bridge failover, but would like to retain use of the lua ivr script should a bridge fail. If I want to redirect to a voicemail or recorded message, on bridge fail, how can I do this? Thanks again.
--matt
On Thu, May 21, 2009 at 10:44 PM, Matthew Fong <mattdfong@gmail.com (mattdfong@gmail.com)> wrote:
Quote: | I'm using a lua script to control an IVR, and would like to know how I can tell if a
session:execute("bridge","sofia/gateway/blahblah");
was successful or not
it seems the response from session:execute is nil regardless if the bridge was successful or not
whats the best way? Thanks
--matt
|
|
|
Back to top |
|
|
mattdfong at gmail.com Guest
|
Posted: Fri May 22, 2009 1:15 am Post subject: [Freeswitch-users] Best way to determine if a bridge was suc |
|
|
grr...continue_on_fail...ignore my ignorance
but it would still be nice getting a response back from the session:execute bridge
--matt
On Thu, May 21, 2009 at 11:09 PM, Matthew Fong <mattdfong@gmail.com (mattdfong@gmail.com)> wrote:
Quote: | hrm...it's also seems to be that if my lua script looks like
session:execute("bridge", "sofia/gateway/XXX/0XXXXX")
session:execute("bridge", "sofia/gateway/XXXX/XXX")
if the first bridge fails, the session is immediately hungup, even if hangup_after_bridge is set to false...is this the intended behavior?
I'm not trying to setup failover--I know I can use | to setup a bridge failover, but would like to retain use of the lua ivr script should a bridge fail. If I want to redirect to a voicemail or recorded message, on bridge fail, how can I do this? Thanks again.
--matt
On Thu, May 21, 2009 at 10:44 PM, Matthew Fong <mattdfong@gmail.com (mattdfong@gmail.com)> wrote:
Quote: | I'm using a lua script to control an IVR, and would like to know how I can tell if a
session:execute("bridge","sofia/gateway/blahblah");
was successful or not
it seems the response from session:execute is nil regardless if the bridge was successful or not
whats the best way? Thanks
--matt
|
|
|
|
Back to top |
|
|
dujinfang at gmail.com Guest
|
Posted: Fri May 22, 2009 1:32 am Post subject: [Freeswitch-users] Best way to determine if a bridge was suc |
|
|
would you like to try this?
bridge_hangup_cause = session:getVariable("bridge_hangup_cause") or session:getVariable("originate_disposition");
if (bridge_hangup_cause == "NORMAL_TEMPORARY_FAILURE" or bridge_hangup_cause == "NO_ROUTE_DESTINATION" or bridge_hangup_cause == "CALL_REJECTED") then
-- blah...
On May 22, 2009, at 2:14 PM, Matthew Fong wrote: Quote: | grr...continue_on_fail...ignore my ignorance
but it would still be nice getting a response back from the session:execute bridge
--matt
On Thu, May 21, 2009 at 11:09 PM, Matthew Fong <mattdfong@gmail.com (mattdfong@gmail.com)> wrote:
Quote: | hrm...it's also seems to be that if my lua script looks like
session:execute("bridge", "sofia/gateway/XXX/0XXXXX")
session:execute("bridge", "sofia/gateway/XXXX/XXX")
if the first bridge fails, the session is immediately hungup, even if hangup_after_bridge is set to false...is this the intended behavior?
I'm not trying to setup failover--I know I can use | to setup a bridge failover, but would like to retain use of the lua ivr script should a bridge fail. If I want to redirect to a voicemail or recorded message, on bridge fail, how can I do this? Thanks again.
--matt
On Thu, May 21, 2009 at 10:44 PM, Matthew Fong <mattdfong@gmail.com (mattdfong@gmail.com)> wrote:
Quote: | I'm using a lua script to control an IVR, and would like to know how I can tell if a
session:execute("bridge","sofia/gateway/blahblah");
was successful or not
it seems the response from session:execute is nil regardless if the bridge was successful or not
whats the best way? Thanks
--matt
|
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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
|