Hi i am Lisandro from Argentina i junior and is my first time working on a tcl.. someone give a script that works as autoattendant its has 2 levels.. I modified and add some function and works great.... so when it starts has
a prompt and you could enter a valid number to connect directly or just the option that you heard in the prompt.. then in depending of the number of the option you chose you could enter in the second level where you here more options and its has a new collectdigit..
in the proc act_Setup { }
the script has this:
leg setupack leg_incoming
leg proceeding leg_incoming
set callingnumber [infotag get leg_ani]
if { [string len $callingnumber] == "3" || [string len $callingnumber] == "4" || [string len $callingnumber] == "5" || [string len $callingnumber] == "7"} {
leg connect leg_incoming
i really couldn't figure out what is this.. if someone could tell me how its works and what is it do i would really appreciate that...
the else of the if play the prompt and collect the digit..
I get my doubt on this because i want to add direct inward dial (did) on the script i have the code for this i got it from other tcl that:
if { [infotag get leg_isdid] } {
set dest [infotag get leg_dnis]
leg proceeding leg_incoming
leg setup $dest callInfo leg_incoming
fsm setstate PLACECALL
so i want to now is the infotag get leg_ will bother me or not or what does it do..
i post you the entire proc act_Setup
proc act_Setup { } {
global param
global source
global header
global a
global dest
global callingnumber
set a(0) "*110"
set a(1) "*111"
set a(21) "*112"
set a(22) "*113"
set a(23) "*114"
set a(31) "*115"
set a(32) "*116"
set a(33) "*117"
set a(4) "*118"
set a(9) "*119"
set a(10) "*120"
set a(11) "*121"
set a(12) "*122"
set a(13) "*123"
puts "\n entro primero aca"
set header "01"
leg setupack leg_incoming
leg proceeding leg_incoming
set callingnumber [infotag get leg_ani]
if { [string len $callingnumber] == "3" || [string len $callingnumber] == "4" || [string len $callingnumber] == "5" || [string len $callingnumber] == "7"} {
leg connect leg_incoming
}
puts "\n header:"
puts $header
media play leg_incoming "$source$header.au"
leg collectdigits leg_incoming param
}
could i just add :
if { [infotag get leg_isdid] } {
set dest [infotag get leg_dnis]
leg proceeding leg_incoming
leg setup $dest callInfo leg_incoming
fsm setstate PLACECALL
on the
proc act_Setup { } {
and it should work?
the fsm state:
set fsm(PLACECALL,ev_setup_done) "act_CallSetupDone, CALLACTIVE"
thanks..
a prompt and you could enter a valid number to connect directly or just the option that you heard in the prompt.. then in depending of the number of the option you chose you could enter in the second level where you here more options and its has a new collectdigit..
in the proc act_Setup { }
the script has this:
leg setupack leg_incoming
leg proceeding leg_incoming
set callingnumber [infotag get leg_ani]
if { [string len $callingnumber] == "3" || [string len $callingnumber] == "4" || [string len $callingnumber] == "5" || [string len $callingnumber] == "7"} {
leg connect leg_incoming
i really couldn't figure out what is this.. if someone could tell me how its works and what is it do i would really appreciate that...
the else of the if play the prompt and collect the digit..
I get my doubt on this because i want to add direct inward dial (did) on the script i have the code for this i got it from other tcl that:
if { [infotag get leg_isdid] } {
set dest [infotag get leg_dnis]
leg proceeding leg_incoming
leg setup $dest callInfo leg_incoming
fsm setstate PLACECALL
so i want to now is the infotag get leg_ will bother me or not or what does it do..
i post you the entire proc act_Setup
proc act_Setup { } {
global param
global source
global header
global a
global dest
global callingnumber
set a(0) "*110"
set a(1) "*111"
set a(21) "*112"
set a(22) "*113"
set a(23) "*114"
set a(31) "*115"
set a(32) "*116"
set a(33) "*117"
set a(4) "*118"
set a(9) "*119"
set a(10) "*120"
set a(11) "*121"
set a(12) "*122"
set a(13) "*123"
puts "\n entro primero aca"
set header "01"
leg setupack leg_incoming
leg proceeding leg_incoming
set callingnumber [infotag get leg_ani]
if { [string len $callingnumber] == "3" || [string len $callingnumber] == "4" || [string len $callingnumber] == "5" || [string len $callingnumber] == "7"} {
leg connect leg_incoming
}
puts "\n header:"
puts $header
media play leg_incoming "$source$header.au"
leg collectdigits leg_incoming param
}
could i just add :
if { [infotag get leg_isdid] } {
set dest [infotag get leg_dnis]
leg proceeding leg_incoming
leg setup $dest callInfo leg_incoming
fsm setstate PLACECALL
on the
proc act_Setup { } {
and it should work?
the fsm state:
set fsm(PLACECALL,ev_setup_done) "act_CallSetupDone, CALLACTIVE"
thanks..