cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
595
Views
0
Helpful
3
Replies

TCL Script

partheeban1
Level 1
Level 1

Hi All,

We have wrote a tcl script in which it going to play a prompt and will transfer to an extension.For us first half (Playing prompt)is working fine the second part(transfer) of the script is not working.could you please any one check where the script is correct or not.

Thanks

3 Replies 3

mstoychev
Level 1
Level 1

Hello,

do you understand the concept of event-> action in TCL version 2 ?

In your script you do not wait for media to stop playing ( ev_media_done) before doing "setup leg" to the extension.

I have a scrirpt doing exactly the same - you need to put " leg setup " in a separate procedure(act_CallSetup in my example) and modify the state machine to do something like this:

set fsm(PLAYMSG,ev_media_done) "act_CallSetup PLACECALL"

set fsm(PLACECALL,ev_setup_done) "act_CallSetupDone CALLACTIVE"

-----------------

I hope this helps. If you need something else, you can e-mail me.

P.S. BTW, I do not see why you set state to HANDOFF and wait for ev_returned event. You can just set it to CALLACTIVE and wait for ev_disconnected. Use one of the cisco demo applications as a base.

Hi Milen,

Thanks a lot for your comments.

I have modified the script as you told, now the prompt is playing and disconnects without placing a call to my internal phone number.Please check whether i need to change anything else in the script. awaiting for your reply.

Thanks

Parthee

partheebanr@gmail.com

Hello,

according to the state machine, your script hangs up immediately after the call to the internal extension is set up. The right thing to do when the call is set up is to go in state CALLACTIVE and wait for disconnect event. This way the call continues until any of the parties hangs up.

The extension should receive the call even now.But the call will be disconnected immediately after you pick up.

So you may have 2 problems:

1) Change some lines in the state machine like I told you in my previous post - this line is wrong :

set fsm(PLACECALL,ev_setup_done) "act_Cleanup CALLDISCONNECT"

change to:

set fsm(PLACECALL,ev_setup_done) "act_CallSetupDone CALLACTIVE"

set fsm(CALLACTIVE,ev_disconnected) "act_Cleanup CALLDISCONNECT"

where act_CallSetupDone

can be almost empty, just to wait until disconnected. Look in the attached script that does almost the same thing.

My script can be put on a incoming dial peer - it plays message and then connects the call to the destination.It will take its destination number automatically from the called number, but you can change this.

2) check why calls do not arrive to the extension.

You can always look in the Cisco example scripts for most of the applications you need - even more complicated. Just make sure you understand the states and events.

Regards,

Milen

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: