« Back to TCL-API

RE: TCL script to disconnect call after 10 secs

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,
I'm looking to create a simple TCL script which will automatically disconnected an outgoing call after 10secs. Can anybody point me in the right direction for this?
Thanks,
Brian
 

Hi,

You can set timer when the call is active and once the timer expires call a procedure that would destroy the connection and disconnect the leg using the following command

connection destroy {connectionID | info-tag}
leg disconnect {legID | info-tag} [-c cause_code] [-g <gtd_handle>] [-i <iec>]

Please go through the TCL IVR API programming guide from the following link to gain the basic knowledge for developing the scripts

http://www.cisco.com/en/US/docs/ios/voice/tcl/developer/guide/tclivrv2.html

At the end of the document you could see some sample scripts, make use of the procedures and FSM states as per your requirement and create a script.

Thanks,
Anusha

Hi,
That's helpful. I'm almost there, but I'm having trouble initialising the timer..
 
At this line ...
    #create a timer for 5 secs
    timer start named_timer 5 timer_1
 
 
I get the following error:
//-1//TCL :EE29697584000:/tcl_TimerStartObjCmd: timer start named_timer 5 timer_1
%SYS-3-MGDTIMER: Uninitialized timer, init with uninitialized master, timer = 38. -Process= "script background loader",
 
How do I initialse  named_timer?
 
Thanks,
Brian
 

Hi Brian,

you don't need to intialize the timer, The timer start command starts a timer for a specified number of seconds When the timer expires, the script receives an ev_named_timer event.
please send us your script and debugs by enabling below debugs to find the issue.

debug voip app

Thanks,
Raghavendra

Hi,
I've attached the script. I think my issue is finding the event that will trigger the procedure that will start the timer. I'm attempting to run this script on the outgoing dial peer.
 
I initially started the timer in the init{} procedure .. that's why I was getting the initialisation error ... I'm not getting this anymore.

Thanks,
Brian

Your script doesn't connect incoming leg
Please go to
http://developer.cisco.com/web/vgapi/docs
download
"How to test TCL IVR Scripts in Cisco Voice..."
You should find an sample script in it. Take a look how to do call setup.

Thanks !

Some basic stuff missing from that script. I've resolved my issue.
Thanks for the help

Brian

Brian,

Could you send me your script? I'm looking to do the same thing and don't have any script experience at all.

Thanks!

Hey Brian, can you send me your script too please, thank you so much for your help... my email is fallenangel.jm@gmail.com

Dear Brian ,,


Please can you send to me your script file . for testing Email hassan_alsaffi@hotmail.com .

Best Regards ,

Brian, can you send me the script, please.   melvin.silva@hotmail.com