cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
586
Views
0
Helpful
2
Replies

TCL script to play an IVR

Kulasekararaja
Level 1
Level 1

Hi Folks,

 

Looking for an assistance here for a requirement to play an announcement on Cisco SIP VG when a particular number is dialed by an IP Phone on CUCM.

 

IP Phone (Dials 707070) >> CUCM >> SIP VG >> IVRPlay (120 Seconds length recording) >> Play it repeatedly till either caller hangs up or timer expired to disconnect the call.

 

I was told i can utilize TCL script for it (Suggest me if any other easy solution, not sure if Native call queuing can help) and here is my script below and dial-peer configuration as well.. I am totally new to TCL and created this script based on google search. Request you to check and please let me know if the script looks fine or am i missing anything.

 

====

# TCL script exclusively used for Water dam support announcement

proc init_configs { } {
global welcomePrompt

if [infotag get cfg_avpair_exists welcome-prompt] {
setwelcomePrompt [string trim [infotag get cfg_avpair welwome-prompt]]
} else {
set welcomePrompt flash:MYIVR.AU
}
}

# Procedure to play audio file on incoming dial peer

proc act_Media { } {
global dest
global welcomePrompt

set dest [infotag get leg_dnis]

leg setupack leg_incoming
leg proceeding leg_incoming
leg connect leg_incoming
media play leg_incoming $welcomePrompt
}

# Procedure to disconnect the call
proc act_Cleanup { } {
puts ">>> Tcl: act_Cleanup <<<"
call close
}

init_configs
set fsm(any_state,ev_disconnected) "act_Cleanup same_state"
set fsm(CALL_INIT,ev_setup_indication) "act_Media PLAYPROMPT"
set fsm(PLAYPROMPT,ev_media_done) "act_Setup PLACECALL"
set fsm(PLACECALL,ev_disconnected) "act_Cleanup CALLDISCONNECT"
set fsm(CALLDISCONNECT,ev_disconnected) "act_Cleanup same_state"
set fsm(CALLDISCONNECT,ev_media_done) "act_Cleanup same_state"
set fsm(CALLDISCONNECT,ev_disconnect_done) "act_Cleanup same_state"

fsm define fsm CALL_INIT

===

 

==

service MYIVR flash:MYIVR.tcl

==

 

==

dial-peer voice 707070 voip
service MYIVR
destination-pattern 707070
codec g711ulaw

==

2 Replies 2

What is the use of this IVR,Unity can also play the IVR using call handler.If you can provide more information regarding your requirement, we might be able to suggest a better solutions.

 

 



Response Signature


Kulasekararaja
Level 1
Level 1

Hi Nithin,

 

I appreciate your reply.

 

Unfortunately my customer is not willing to deploy CUC only for this one call handler, so we decided to look for an alternate solution.

 

Not sure if Native call queuing can help me with this requirement.?

 

Thanks,