Hi all,
I a newbie in TCL scripting, and has some problem on using the CLI command (PING) in TCL ...
Here is the story:
A TCL script has been added in a dial-peer,
When there is an incoming call pass through this dial-peer, it would trigger the application server to do something via the TCL
Now, I'm going to add a PING action (CLI command) before reaching the APP server, in order to ensure the APP server is reachable on the network.
I have tried in 2 methods,
Method #1:
use the set $ping_result [exec "ping 10.10.10.124 repeat 2"] in tclsh, which works fine.
But when I put into the TCL file, it returns
TCL script failure errorInfo:
Result: invalid command name "exec" while executing "exec "ping 10.10.10.124 repeat2" " invoked from within "act_Setup"
Method #2
then I tried to use cli_open, cli_exec, and it seems require the
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
but when i tried to make an inbound call for testing, it returns
CALL_CONTROL-6-APP_NOT_FOUND: Application caller in dial-peer 9999 not found. Handing callid 3857 to the alternate app.
if I removed the namspace import ::cisco::eem::* and namespace import ::cisco::lib::*
the inbound call can be made, but it seems the TCL has skipped the cli_open, cli_exec
Anybody know what's the problem in here?
Thanks in advance
Sam