Hi, Ya bridge is in dialplan XML only. In that case how am I to trace the termination event and run a DB query? Is there a way to do? Thanks. Regards, Archana From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael Collins Sent: 20 February 2013 18:07 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] FW: Event pick If you bridge in the dialplan then your Lua script won't run until the bridge app has terminated. -MC On Wed, Feb 20, 2013 at 9:33 AM, Archana Venugopan <a.venugopan@mundio.com<mailto:a.venugopan@mundio.com>> wrote: Hi, I should define a obsession before going to obcause. But my outbound call is already initiated from my dialplan XML [<action application="bridge" data="sofia/external/0${msc_prefix}$1$2@10.30.3.27<mailto:2@10.30.3.27>"/>]. Am not sure how to give obsession in lua script as my outbound call is initiated from dialplan XML. Can you please guide me. Many thanks From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>] On Behalf Of Michael Collins Sent: 20 February 2013 17:12 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Event pick What value is in obCause when the originator cancels the call? Print the value in the else block and find out. -MC On Wed, Feb 20, 2013 at 4:37 AM, Archana Venugopan <a.venugopan@mundio.com<mailto:a.venugopan@mundio.com>> wrote: Hi, I need to capture this ORIGINATOR _CANCEL event in my lua script. >From google I found the below code. But we establish our calls from dialplan XML as like this, <action application="bridge" data="sofia/external/0${msc_prefix}$1$2@10.30.3.27<mailto:2@10.30.3.27>"/>. Since am not that well versed in lua script, I am not sure in the place of obsession below what should I pass. As far I understood the =sofia/external/0${msc_prefix}$1$2@10.30.3.27<mailto:sofia/external/0$%7bmsc_prefix%7d$1$2@10.30.3.27>, this is what I should put there but we already have this in our XML. Please suggest me on how should I proceed. Many thanks. -- Initiate an outbound call obSession = freeswitch.Session("sofia/192.168.0.4/1002<http://192.168.0.4/1002>") -- Check to see if the call was answered if obSession:ready() then -- Do something good here else -- This means the call was not answered ... Check for the reason local obCause = obSession:hangupCause() freeswitch.consoleLog("info", "obSession:hangupCause() = " .. obCause ) if ( obCause == "USER_BUSY" ) then -- SIP 486 -- For BUSY you may reschedule the call for later elseif ( obCause == "NO_ANSWER" ) then -- Call them back in an hour elseif ( obCause == "ORIGINATOR_CANCEL" ) then -- SIP 487 -- May need to check for network congestion or problems else -- Log these issues end end 2013-02-19 17:56:02.277173 [NOTICE] sofia.c:7082 Hangup sofia/internal/206@fsfailover.uk01.com<mailto:206@fsfailover.uk01.com> [CS_EXECUTE] [ORIGINATOR_CANCEL] Regards, Archana _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto: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 -- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto: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 -- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
You'll need a 3rd party program listening on the event socket to do this. -MC On Thu, Feb 21, 2013 at 4:13 AM, Archana Venugopan <a.venugopan@mundio.com>wrote:
Hi,****
** **
Ya bridge is in dialplan XML only. In that case how am I to trace the termination event and run a DB query? Is there a way to do?****
** **
Thanks.****
** **
Regards,****
Archana****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Michael Collins *Sent:* 20 February 2013 18:07 *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] FW: Event pick****
** **
If you bridge in the dialplan then your Lua script won't run until the bridge app has terminated. -MC****
On Wed, Feb 20, 2013 at 9:33 AM, Archana Venugopan <a.venugopan@mundio.com> wrote:****
Hi,****
****
I should define a obsession before going to obcause. But my outbound call is already initiated from my dialplan XML [<action application="bridge" data="sofia/external/0${msc_prefix}$1$2@10.30.3.27"/>].****
Am not sure how to give obsession in lua script as my outbound call is initiated from dialplan XML.****
Can you please guide me. Many thanks****
****
****
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Michael Collins *Sent:* 20 February 2013 17:12 *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Event pick****
****
What value is in obCause when the originator cancels the call? Print the value in the else block and find out. -MC****
On Wed, Feb 20, 2013 at 4:37 AM, Archana Venugopan <a.venugopan@mundio.com> wrote:****
Hi,****
I need to capture this ORIGINATOR _CANCEL event in my lua script. >From google I found the below code. But we establish our calls from dialplan XML as like this, <action application="bridge" data="sofia/external/0${msc_prefix}$1$2@10.30.3.27"/>.****
Since am not that well versed in lua script, I am not sure in the place of obsession below what should I pass. As far I understood the = sofia/external/0${msc_prefix}$1$2@10.30.3.27, this is what I should put there but we already have this in our XML.****
Please suggest me on how should I proceed. Many thanks.****
****
-- Initiate an outbound call****
****
obSession = freeswitch.Session("sofia/192.168.0.4/1002")****
****
-- Check to see if the call was answered****
****
if obSession:ready() then****
-- Do something good here****
****
else -- This means the call was not answered ... Check for the reason** **
****
local obCause = obSession:hangupCause()****
****
freeswitch.consoleLog("info", "obSession:hangupCause() = " .. obCause ) ****
****
if ( obCause == "USER_BUSY" ) then -- SIP 486****
-- For BUSY you may reschedule the call for later****
elseif ( obCause == "NO_ANSWER" ) then****
-- Call them back in an hour****
elseif ( obCause == "ORIGINATOR_CANCEL" ) then -- SIP 487****
-- May need to check for network congestion or problems****
else****
-- Log these issues****
end****
end****
****
****
****
****
2013-02-19 17:56:02.277173 [NOTICE] sofia.c:7082 Hangup sofia/internal/ 206@fsfailover.uk01.com [CS_EXECUTE] [ORIGINATOR_CANCEL]****
****
Regards,****
Archana****
****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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****
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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****
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
participants (2)
-
Archana Venugopan
-
Michael Collins