<span lang="EN-AU">
<p dir="ltr" align="left">Hi Guys,</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">I created a very very basic announcement TCL script.</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">All it has to is accept a call, play a prompt, hang up.</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">Im going to look into changing it, so I read the announcement file from a parameter in the service config on the router.</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">But apart from that, could someone give it a once over, and tell me if it should be "safe" to deploy?</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">Is there anything I should do from the script perspective to improve it?</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">Cheers,</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">Tim</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left"> </p><font size="2" face="Courier New"><font size="2" face="Courier New">
<p dir="ltr" align="left"># playAnnouncement-1-0-0.tcl</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left"># Initialisation</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">proc init { } {</p>
<p dir="ltr" align="left">global param</p>
<p dir="ltr" align="left">global callInfo</p>
<p dir="ltr" align="left">global legConnected</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">set param(interruptPrompt) true</p>
<p dir="ltr" align="left">set param(abortKey) *</p>
<p dir="ltr" align="left">set param(terminationKey) #</p>
<p dir="ltr" align="left">set legConnected false </p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">}</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left"># SET FSM</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">set fsm(any_state,ev_disconnected) "act_Cleanup same_state"</p>
<p dir="ltr" align="left">set fsm(CALL_INIT,ev_setup_indication) "act_Setup GETDEST"</p>
<p dir="ltr" align="left">set fsm(GETDEST,ev_collectdigits_done) "act_GotDest CONNECT"</p>
<p dir="ltr" align="left">set fsm(CONNECT,ev_media_done) "act_OutboundCall CONNECTED"</p>
<p dir="ltr" align="left">set fsm(CONNECTED,ev_setup_done) "act_SendDigit same_state"</p>
<p dir="ltr" align="left">set fsm(CONNECTED,ev_media_done) "act_SendDigit same_state"</p>
<p dir="ltr" align="left">set fsm(FINISHED,ev_media_done) "act_Cleanup same_state" </p>
<p dir="ltr" align="left">fsm define fsm CALL_INIT</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">proc act_Setup { } {</p>
<p dir="ltr" align="left">global prompt</p>
<p dir="ltr" align="left">set prompt "flash:announcement.au"</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">leg setupack leg_incoming</p>
<p dir="ltr" align="left">leg proceeding leg_incoming</p>
<p dir="ltr" align="left">leg connect leg_incoming</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">media play leg_incoming $prompt</p>
<p dir="ltr" align="left"></p>
<p dir="ltr" align="left">fsm setstate FINISHED</p>
<p dir="ltr" align="left">}</p>
<p dir="ltr" align="left"></p></font></font><font size="3" face="Calibri"><font size="3" face="Calibri">
<p dir="ltr" align="left"> </p></font></font></span>