Приветствую!Помогите пожалуйста со TCL скриптом, который используется для авторизации звонков через Radius. Есть CCO-логин - просто не могу найти его на циске.
Спасибо!
>Приветствую!
>
>Помогите пожалуйста со TCL скриптом, который используется для авторизации звонков через Radius.
>Есть CCO-логин - просто не могу найти его на циске.
>
>Спасибо!
#
# Script version 1.0.1
#
proc do_authenticate {} {
global state
global pin
global account
global prefix
global param
set event [authenticate $account $pin "" info]if {($event == "authenticated")} {
set state get_dest
return 0
} else {
set event [playPrompt param info tech_fail.au call_us_later.au]
set state end
return 0
}
}proc do_get_dest {} {
global prefix
global state
global destination
global pin
global accountset prompt(interrupt) true
set prompt(abortKey) *
set prompt(terminationKey) #
set prompt(dialPlanTerm) true
set prompt(maxDigits) 3set mesg(interrupt) true
set mesg(abortKey) *
set mesg(terminationKey) #
set mesg(playComplete) trueset event [authorize $account $pin "" [ani] info]
set num [getVariable aaa h323-credit-amount info]
set event [playPrompt prompt info [set prefix]_welcome.au]
if {$event == "collect success"} {
set state place_call
set destination $info(digits)
return 0
}if {$event == "collect aborted"} {
set state end
return 0
}if {$event == "collect timeout" || $event == "collect fail"} {
set event [playPrompt mesg info invalid_dest.au]
set state end
return 0
}set state end
return 0
}proc do_place_call {} {
global state
global destinationset callInfo(destinationNum) $destination
set event [placeCall $destination callInfo info]if {$event == "active"} {
set state active_no_timer
return 0
}if {$event == "fail"} {
set state end
return 0
}set state end
return 0
}proc do_active_no_timer {} {
global stateset event [waitEvent]
while {$event == "digit"} {
set event [waitEvent]
}
set state end
return 0
}#-------------------------------------------------
# main
#acceptCall
set account 4
set pin 30501set prefix ru
set state authenticateset param(interrupt) true
set param(abortKey) *
set param(terminationKey) #
set param(playComplete) truewhile {$state != "end"} {
if {$state == "authenticate"} {
do_authenticate
} elseif {$state == "get_dest"} {
do_get_dest
} elseif {$state == "active_no_timer"} {
do_active_no_timer
} elseif {$state == "place_call"} {
do_place_call
} else {
break
}
}