Running an expect script from freeswitch
Hi, I am running an expect script that is executedn from a call lua session. The problem is that the responses come very slowly when run from within freeswitch. It takes maybe 5 seconds to get each response to the expect script. I am starting the expect script from lua_mod with os.execute. I have also tried session:execute. The behaviour is the same in both cases. When running the expect script within a normal shell, it executes immediately without any delays. What could be causing the very slow responses to the expect script inside freeswitch ? Mike
Did you try the below one? api = freeswitch.API(); api:execute("system", " YOUR SYSTEM COMMAND "); Thanks, Bala On Thu, Apr 19, 2012 at 1:10 PM, Mikael Nordman <oh2aun@gmail.com> wrote:
Hi,
I am running an expect script that is executedn from a call lua session.
The problem is that the responses come very slowly when run from within freeswitch.
It takes maybe 5 seconds to get each response to the expect script.
I am starting the expect script from lua_mod with os.execute.
I have also tried session:execute.
The behaviour is the same in both cases.
When running the expect script within a normal shell, it executes immediately without any delays.
What could be causing the very slow responses to the expect script inside freeswitch ?
Mike
_________________________________________________________________________ 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
Thanks Bala. It works. Can you explain why instantiating a new API makes expect and telnet connect to each other in the right manner ? Thanks again /Mike On Thu, Apr 19, 2012 at 4:35 PM, Balamurugan Mahendran <b2m@a-cti.com>wrote:
Did you try the below one?
api = freeswitch.API(); api:execute("system", " YOUR SYSTEM COMMAND ");
Thanks, Bala
On Thu, Apr 19, 2012 at 1:10 PM, Mikael Nordman <oh2aun@gmail.com> wrote:
Hi,
I am running an expect script that is executedn from a call lua session.
The problem is that the responses come very slowly when run from within freeswitch.
It takes maybe 5 seconds to get each response to the expect script.
I am starting the expect script from lua_mod with os.execute.
I have also tried session:execute.
The behaviour is the same in both cases.
When running the expect script within a normal shell, it executes immediately without any delays.
What could be causing the very slow responses to the expect script inside freeswitch ?
Mike
_________________________________________________________________________ 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
_________________________________________________________________________ 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 (2)
-
Balamurugan Mahendran
-
Mikael Nordman