Error "Channels not ready" when bridge call in Lua
Dear support, I have a Lua script that accepts inbound call, creates outbound call, and then bridges the 2 sessions. Its code is simply like this: -------------------- session:answer() session2 = freeswitch.Session(callstring) if (session2:ready()) then freeswitch.bridge(session, session2) end -------------------- However, when bridge() is called, the call immediately hangs up. The following is reported: 2011-12-13 18:08:00.674769 [ERR] switch_cpp.cpp:1247 Channels not ready 2011-12-13 18:08:00.674769 [DEBUG] switch_cpp.cpp:618 CoreSession::hangup By searching through the forum, I find a previous report of the same error with Lua script. However no solution is provided for that ticket. Please kind advise how to fix this problem. Thanks, D.Ma -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Error-Channels-not-ready-when-... Sent from the freeswitch-users mailing list archive at Nabble.com.
Hello! A have same problem about a three months ago. Fixed with upgrade to the latest git.
Dear support,
I have a Lua script that accepts inbound call, creates outbound call, and then bridges the 2 sessions. Its code is simply like this:
-------------------- session:answer() session2 = freeswitch.Session(callstring)
if (session2:ready()) then freeswitch.bridge(session, session2) end --------------------
However, when bridge() is called, the call immediately hangs up. The following is reported:
2011-12-13 18:08:00.674769 [ERR] switch_cpp.cpp:1247 Channels not ready 2011-12-13 18:08:00.674769 [DEBUG] switch_cpp.cpp:618 CoreSession::hangup
By searching through the forum, I find a previous report of the same error with Lua script. However no solution is provided for that ticket.
Please kind advise how to fix this problem.
Thanks, D.Ma
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Error-Channels-not-ready-when-... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ 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
-- Regards, Boris
Hi Boris, Thanks a lot for the information! I shall try to upgrade! Best regards, D.Ma -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Error-Channels-not-ready-when-... Sent from the freeswitch-users mailing list archive at Nabble.com.
Also, this isn't "support" - this is the freeswitch-users list. Support can be reached at: consulting@freeswitch.org. -MC On Tue, Dec 20, 2011 at 5:31 PM, dma <mays.david@gmail.com> wrote:
Hi Boris,
Thanks a lot for the information! I shall try to upgrade!
Best regards, D.Ma
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Error-Channels-not-ready-when-... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ 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
Hi Michael, Sorry for the confusion. The problem still occurring after upgrade the latest version of Feeswitch using git head. Simply, after bridge the 2 sessions (inbound and outboud), the error is "channels not ready" and the call hang up. 2011-12-13 18:08:00.674769 [ERR] switch_cpp.cpp:1247 Channels not ready 2011-12-13 18:08:00.674769 [DEBUG] switch_cpp.cpp:618 CoreSession::hangup The reason is the status of the channel for inbound call is NOT ready. Do you have any idea about the cause of this issue? Thanks, D.Ma -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Error-Channels-not-ready-when-... Sent from the freeswitch-users mailing list archive at Nabble.com.
Hi Guys, Any idea on this problem? Regards, D.Ma -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Error-Channels-not-ready-when-... Sent from the freeswitch-users mailing list archive at Nabble.com.
Sometimes it happened for me when session2 was not yet ready, and I fixed this by adding a small workaround: "session:sleep(500);" Please see below, and reply back if it works for you. -------------------- session:answer() session2 = freeswitch.Session(callstring) *session:sleep(500);* if (session2:ready()) then freeswitch.bridge(session, session2) end -------------------- 2011/12/28 dma <mays.david@gmail.com>
Hi Guys,
Any idea on this problem?
Regards, D.Ma
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Error-Channels-not-ready-when-... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ 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
Hello! Try to add ignore_early_media=true to the originate string.
Hi Michael,
Sorry for the confusion.
The problem still occurring after upgrade the latest version of Feeswitch using git head.
Simply, after bridge the 2 sessions (inbound and outboud), the error is "channels not ready" and the call hang up.
2011-12-13 18:08:00.674769 [ERR] switch_cpp.cpp:1247 Channels not ready 2011-12-13 18:08:00.674769 [DEBUG] switch_cpp.cpp:618 CoreSession::hangup
The reason is the status of the channel for inbound call is NOT ready. Do you have any idea about the cause of this issue?
Thanks, D.Ma
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Error-Channels-not-ready-when-... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ 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
-- Regards, Boris
Hi, Can you please pastebin the FS console debug logs for this script, just want to know whats going on in the Console when the script is executed. Just wanted to see that the session you are trying to create really is creating or there is some error in there!? Also sleep() is a nice way to wait for sometime if freeswitch is taking time to create a new session object. -- Regards, Sammy On Thu, Dec 29, 2011 at 10:51 AM, Boris Kovalenko <boris@tagnet.ru> wrote:
Hello!
Try to add ignore_early_media=true to the originate string.
Hi Michael,
Sorry for the confusion.
The problem still occurring after upgrade the latest version of Feeswitch using git head.
Simply, after bridge the 2 sessions (inbound and outboud), the error is "channels not ready" and the call hang up.
2011-12-13 18:08:00.674769 [ERR] switch_cpp.cpp:1247 Channels not ready 2011-12-13 18:08:00.674769 [DEBUG] switch_cpp.cpp:618 CoreSession::hangup
The reason is the status of the channel for inbound call is NOT ready. Do you have any idea about the cause of this issue?
Thanks, D.Ma
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Error-Channels-not-ready-when-... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ 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
-- Regards, Boris
_________________________________________________________________________ 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
participants (5)
-
Boris Kovalenko
-
dma
-
Michael Collins
-
Sammy Govind
-
Vitalie Colosov