need help on command : media play

Version 1
    This document was generated from CDN thread

    Created by: haloha haloha on 23-05-2012 05:38:27 AM
    hi
    i got error when trying to use media play command
     
    let me describe the brief step of error:
    1. call incomming router(IVR tcl script)
    2. Router ask for account number + pin number
    3. Router send access-request to Radius server
    4. Radius server send back access-accept with value information
    5. Router ask caller for destination number, and caller input destination nnumber(phone number)
    6. Router send access-request to Radius server and got access-accept with value information(the account has only 50s left to connect call)
    7. Router connects caller and destination number successfully - the call connected
    8. when timer reach = 50s, the IVR tcl play media(announcement) the call is disconnected - i get error in this step
     
    and this is the proc act_LastActiveTimer:
    proc act_LastActiveTimer { } {
    global param1
    global destination
    global ani
    puts "\nprocedure act_LastActiveTimer"
    puts "\nvalue of param1 = $param1"
    puts "\nvalue of destination number = $destination"
    puts "\nvalue of calling number = $ani"
    connection destroy con_all
    media play leg_incoming _disconnect.au
    }
     
    and this is the log of debug voice application script:
    *May 23 14:32:21: //-1//TCL :EE697CCA90000:/tcl_PutsObjCmd: procedure INIT
    *May 23 14:32:21:
    *May 23 14:32:21: //-1//TCL :EE697CCA90000:/tcl_PutsObjCmd: procedure act_ConfigVars
    *May 23 14:32:21:
    *May 23 14:32:21: //334//TCL :/tcl_PutsObjCmd: procedure act_Setup
    *May 23 14:32:21:
    *May 23 14:32:21: //334//TCL :/tcl_PutsObjCmd: procedure act_perCallVars
    *May 23 14:32:21:
    *May 23 14:32:21: //334//TCL :/tcl_PutsObjCmd: 0873002222
    *May 23 14:32:21:
    *May 23 14:32:21: //334//TCL :/tcl_PutsObjCmd:
    TotalLanguages=2
    *May 23 14:32:21:
    *May 23 14:32:25: //334//TCL :/tcl_PutsObjCmd: procedure act_LangSelect
    *May 23 14:32:25:
    *May 23 14:32:25: //334//TCL :/tcl_PutsObjCmd:
    tinh trang=cd_005
    *May 23 14:32:25:
    *May 23 14:32:25: //334//TCL :/tcl_PutsObjCmd:
    Select Lang successfull and go to the procedure act_GetCard
    *May 23 14:32:25:
    *May 23 14:32:25: //334//TCL :/tcl_PutsObjCmd: procedure act_GetCard
    *May 23 14:32:25:
    *May 23 14:32:25: //334//TCL :/tcl_PutsObjCmd:
    the length of account=8
    *May 23 14:32:25:
    *May 23 14:32:25: //334//TCL :/tcl_PutsObjCmd:
    the length of pin=4
    *May 23 14:32:25:
    *May 23 14:32:25: //334//TCL :/tcl_PutsObjCmd:
    the length of card=12
    *May 23 14:32:25:
    *May 23 14:32:25: //334//TCL :/tcl_PutsObjCmd:
    Count = 0
    *May 23 14:32:25:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd: procedure act_GotCardNumber
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    status=cd_005
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    digit collects successfull cd_005
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    number was enter = 123456789123
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    length of number = 12, length of account = 8, length of pin = 4
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    the value of account = 12345678
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    the value of pin = 9123
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    procedure act_FirstAuthorize
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    aaa authorize Status=ao_000
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    please enter the destination number
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    procedure act_GetDest
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd:
    total money = 11550
    *May 23 14:32:32:
    *May 23 14:32:32: //334//TCL :/tcl_PutsObjCmd: param1 Max Digit = 12
    *May 23 14:32:32:
    *May 23 14:32:46: //334//TCL :/tcl_PutsObjCmd:
    procedure act_GotDest
    *May 23 14:32:46:
    *May 23 14:32:46: //334//TCL :/tcl_PutsObjCmd:
    event status = cd_004
    *May 23 14:32:46:
    *May 23 14:32:46: //334//TCL :/tcl_PutsObjCmd:
    digit collection successfull
    *May 23 14:32:46:
    *May 23 14:32:46: //334//TCL :/tcl_PutsObjCmd:
    destination number = 001234567
    *May 23 14:32:46:
    *May 23 14:32:46: //334//TCL :/tcl_PutsObjCmd:
    procedure act_SecondAuthorized
    *May 23 14:32:46:
    *May 23 14:32:46: //334//TCL :/tcl_PutsObjCmd:
    account number = 12345678
    *May 23 14:32:46:
    *May 23 14:32:46: //334//TCL :/tcl_PutsObjCmd:
    h323 return code = 0
    *May 23 14:32:46:
    *May 23 14:32:46: //334//TCL :/tcl_PutsObjCmd:
    aaa authorize Status=ao_000
    *May 23 14:32:46:
    *May 23 14:32:46: //334//TCL :/tcl_PutsObjCmd:
    total time of a call = 50
    *May 23 14:32:46:
    *May 23 14:32:48: //334//TCL :/tcl_PutsObjCmd:
    procedure act_CallSetup
    *May 23 14:32:48:
    *May 23 14:32:48: //334//TCL :/tcl_PutsObjCmd:
    acount info = 12345678
    *May 23 14:32:48:
    *May 23 14:32:48: //334//TCL :/tcl_PutsObjCmd:
    destination info = 001234567
    *May 23 14:32:48:
    *May 23 14:32:55: //334//TCL :/tcl_PutsObjCmd: procedure act_SetupDone
    *May 23 14:32:55:
    *May 23 14:32:55: //334//TCL :/tcl_PutsObjCmd:
    total time to make call = 50 with time > warntime and warntime value = 30
    *May 23 14:32:55:
    *May 23 14:33:05: //334//TCL :/tcl_PutsObjCmd:
    procedure act_LongPound
    *May 23 14:33:05:
    *May 23 14:33:15: //334//TCL :/tcl_PutsObjCmd:
    procedure act__ActiveTimer
    *May 23 14:33:15:
    *May 23 14:33:15: //334//TCL :/tcl_PutsObjCmd:
    Incomming = 334
    *May 23 14:33:15:
    *May 23 14:33:15: //334//TCL :/tcl_PutsObjCmd:
    Outgoing = 337
    *May 23 14:33:15:
    *May 23 14:33:15: //334//TCL :/tcl_PutsObjCmd:
    procedure act_CallWarnDestroy
    *May 23 14:33:15:
    *May 23 14:33:17: //334//TCL :/tcl_PutsObjCmd:
    procedure act_CallWarnMedia
    *May 23 14:33:17:
    *May 23 14:33:27: //334//TCL :/tcl_PutsObjCmd:
    procedure act_LongPound
    *May 23 14:33:27:
    *May 23 14:33:41: //334//TCL :/tcl_PutsObjCmd:
    procedure act_LastActiveTimer
    *May 23 14:33:41:
    *May 23 14:33:41: //334//AFW_:/AFW_FSM_Drive: Tcl_Eval to drive FSM inside Tcl modulespace. code=1 code=ERROR
    *May 23 14:33:41: TCL script failure
    Result:
    Leg[334] is in Conferenced state
    *May 23 14:33:41: TCL script failure errorInfo:
    Leg[334] is in Conferenced state
    while executing
    "media play leg_incoming _disconnected.au"
    (procedure "act_LastActiveTimer" line 4)
    invoked from within
    "act_LastActiveTimer"
     

    Subject: RE: need help on command : media play
    Replied by: Raghavendra Gutty Veeranagappa on 23-05-2012 06:17:09 AM
    hi,

    you should  play media after ev_destroy_done event occured as shown below.

    proc act_ConnectionDestroy { } {
        connection destroy con_all
    }

    proc act_PlayDisconnect { } {
         media play leg_incoming _disconnect.au
    }

    set fsm(PLAYDISCONNECT,ev_destroy_done)      "act_PlayDisconnect   CALLDISCONNECTPLAY"

    Thanks,
    Raghavendra

    Subject: RE: need help on command : media play
    Replied by: haloha haloha on 23-05-2012 06:44:07 AM
    hi Raghavendra

    it work like a charm

    but one question, the command you use in 2 proc are the same as my :
    proc act_LastActiveTimer { } {
    global param1
    global destination
    global ani
    puts "\nprocedure act_LastActiveTimer"
    puts "\nvalue of param1 = $param1"
    puts "\nvalue of destination number = $destination"
    puts "\nvalue of calling number = $ani"
    connection destroy con_all
    media play leg_incoming _disconnect.au
    }

    why my proc doesnt work

    is there the flag to make as RESOLVE

    Thank you

    Subject: RE: need help on command : media play
    Replied by: haloha haloha on 23-05-2012 06:44:07 AM
    hi Raghavendra

    it work like a charm

    but one question, the command you use in 2 proc are the same as my :
    proc act_LastActiveTimer { } {
    global param1
    global destination
    global ani
    puts "\nprocedure act_LastActiveTimer"
    puts "\nvalue of param1 = $param1"
    puts "\nvalue of destination number = $destination"
    puts "\nvalue of calling number = $ani"
    connection destroy con_all
    media play leg_incoming _disconnect.au
    }

    why my proc doesnt work

    is there the flag to make as RESOLVE

    Thank you

    Subject: RE: need help on command : media play
    Replied by: Raghavendra Gutty Veeranagappa on 23-05-2012 06:58:28 AM
    hi,

    media play command should be called after receving the ev_destroy_event, but you are calling after connection destroy command.

    you can mark it as an answer to move to resloved state.

    Thanks,
    Raghavendra