Jump to content
Калькуляторы

TCL IVR: Запись и воспроизведение записи

Cisco AS 5400.

IOS: 12.4-20.T3

При звонке на определенный номер включается приветствие и производится запись голоса абонента.

По окончании записи, запись должна проиграться абоненту.

Основные куски скрипта:

proc act_Setup { } {

puts "\n DEBUGGING: Start act_Setup"
        init_perCallVars

        set ani [infotag get leg_ani]
        set dnis [infotag get leg_dnis]

        if { $dnis == "0555005211" } {
                puts "\n DEBUGGING: Welcome Play"
                leg setupack leg_incoming
                leg proceeding leg_incoming
                leg connect leg_incoming
                media play leg_incoming flash:welcome.au
                fsm setstate RECORD
        }
        aaa authenticate $ani $dnis
puts "\n DEBUGGING: Stop act_Setup"

}

.....

proc act_Record { } {
        global param
        global filename

        set filename [infotag get leg_guid]
        puts "\n DEBUGGING: Filename for record - $filename"
        media record leg_incoming -p codec=5 -p maxDuration=15000 -m %b flash:$filename
        fsm setstate RECORD_PLAY
}

proc act_RecordPlay {} {
        global param
        global filename

        puts "\n DEBUGGING: Play Record"
        puts "\n DEBUGGING: Filename for play - $filename"
        media play leg_incoming flash:$filename
        fsm setstate CALLACTIVE
}

....

    set fsm(CALL_INIT,ev_setup_indication) "act_Setup AUTHENTICATE"
    set fsm(RECORD,ev_media_done) "act_Record RECORD_PLAY"
    set fsm(RECORD_PLAY,ev_recorder) "act_RecordPlay CALLACTIVE"

 

sh log:

  DEBUGGING: Start act_Setup
*Jul 9 01:53:09.265:
*Jul 9 01:53:09.265: //42//TCL :/tcl_PutsObjCmd:
  DEBUGGING: Welcome Play
*Jul 9 01:53:09.265:
*Jul 9 01:53:09.265: //42//TCL :/tcl_PutsObjCmd:
  DEBUGGING: Stop act_Setup
*Jul 9 01:53:09.265:
*Jul 9 01:53:12.769: //42//TCL :/tcl_PutsObjCmd:
  DEBUGGING: Filename for record - 5BAAA23E.0005E000.9560AC14.C81613C4
*Jul 9 01:53:12.769:
*Jul 9 01:53:45.005: error flushing recorded ms_sid = 0
*Jul 9 01:53:46.025: //42//TCL :/tcl_PutsObjCmd:
  DEBUGGING: Play Record
*Jul 9 01:53:46.025:
*Jul 9 01:53:46.025: //42//TCL :/tcl_PutsObjCmd:
  DEBUGGING: Filename for play - 5BAAA23E.0005E000.9560AC14.C81613C4
*Jul 9 01:53:46.025:

1. Напрягает ошибка:

"*Jul 9 01:53:45.005: error flushing recorded ms_sid = 0"

2. И судя по логу запись начинает проигрываться не через 15 секунд как выставленно в maxDuration - а через 33 секунды.

3. Проверил, запись голоса производится полные 32 секунды - говорил в трубку все время, пока не началось проигрывание моей записи.

Хотя maxDuration=15000.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this