<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Testo fumetto Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.StileMessaggioDiPostaElettronica17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.TestofumettoCarattere
        {mso-style-name:"Testo fumetto Carattere";
        mso-style-priority:99;
        mso-style-link:"Testo fumetto";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=IT link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>I need a simple outbound tcl script.<o:p></o:p></p>
<p class=MsoNormal>It must block the calls if the clid it does not belong to an
Array of given clid.<o:p></o:p></p>
<p class=MsoNormal>I have tried this simple script, but when it executes “leg
setup $dnis callInfo leg_incoming”,<o:p></o:p></p>
<p class=MsoNormal>it goes in loop, as it comes executed continuously.<o:p></o:p></p>
<p class=MsoNormal>Why???<o:p></o:p></p>
<p class=MsoNormal>Thnaks<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>proc init { } {<o:p></o:p></p>
<p class=MsoNormal>puts "\Outbound.tcl Debug: In init process."<o:p></o:p></p>
<p class=MsoNormal>}<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>proc do_setup { } {<o:p></o:p></p>
<p class=MsoNormal> global dnis<o:p></o:p></p>
<p class=MsoNormal> set dnis [infotag get evt_handoff dnis]<o:p></o:p></p>
<p class=MsoNormal> fsm setstate PLACING_CALL <o:p></o:p></p>
<p class=MsoNormal> puts "\Outbound.tcl Debug: In do_setup process.
Dnis=$dnis"<o:p></o:p></p>
<p class=MsoNormal> leg setup $dnis callInfo leg_incoming<o:p></o:p></p>
<p class=MsoNormal>}<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>proc do_cleanup { } {<o:p></o:p></p>
<p class=MsoNormal> puts "\Outbound.tcl Debug: In do_cleanup
process." <o:p></o:p></p>
<p class=MsoNormal> call close<o:p></o:p></p>
<p class=MsoNormal> puts "\nEB Debug: Clean and close call"<o:p></o:p></p>
<p class=MsoNormal>}<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>init<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>#----------------------------------<o:p></o:p></p>
<p class=MsoNormal># State Machine<o:p></o:p></p>
<p class=MsoNormal>#----------------------------------<o:p></o:p></p>
<p class=MsoNormal>#<o:p></o:p></p>
<p class=MsoNormal> set fsm(CALL_INIT,ev_handoff)
"do_setup,PLACING_CALL"<o:p></o:p></p>
<p class=MsoNormal> set fsm(any_state,ev_any_event)
"do_cleanup,CLEAN_UP"<o:p></o:p></p>
<p class=MsoNormal> fsm define fsm CALL_INIT<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#003333'>Cordiali
saluti</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>
<p class=MsoNormal><b><span style='font-size:12.0pt;font-family:"Times New Roman","serif";
color:#003333'>Mauro Celli</span></b><span style='font-size:12.0pt;font-family:
"Times New Roman","serif";color:#003333'> (work in progress...)<o:p></o:p></span></p>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:#003333'>Site:</span></b><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:#003333'> <a href="http://www.2000net.it/"><span style='color:blue'>www.2000net.it</span></a><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:#003333'>13011 Borgosesia (VC) Italy<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:#003333'>Via XXV Aprile,41<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:#003333'>Tel. 0163.209111<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:#003333'>Fax. 0163 .209301<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Times New Roman","serif";
color:#003333'>Supporto tecnico: 0163 .209561<o:p></o:p></span></p>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Times New Roman","serif";color:#003333'>Email:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Times New Roman","serif";color:#003333'> <a
href="mailto:mauro.celli@2000net.it"><span style='color:blue'>mauro.celli@2000net.it</span></a></span><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
color:#003333'><br>
</span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br>
</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><img
border=0 width=83 height=71 id="Immagine_x0020_1"
src="cid:image001.gif@01CADAED.D8FF1320"
alt="cid:image001.gif@01CA32BF.F85A72E0"></span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>