CME TCL script for outbound call

Version 1

    Subject: RE: CME TCL script for outbound call
    Replied by: Karthikeyan Damodaran on 24-08-2012 05:36:35 PM
    Use any server for authentication ?

     
    We dont use any server to authenticate. It should suppose to take username as PIN number.
     
    Currently it is saying "enter your pin"
     
     
    Kindly find the debug message:
     
    debug voice ivr ?
    % Unrecognized command
    AAUSMELVG01#debug voice ivr
    Warning: This command has been replaced by 'debug voip application '

    Default vxml debugging is on
    Default application debugging is on

    AAUSMELVG01#
    Aug 24 21:24:23.481: //-1//SERV:/AFW_Service_CCInterface: Received Event 26 for service Default modulehandle NULL
    Aug 24 21:24:23.481: //-1//SERV:/AFW_Service_GetExecEnv: Script Name = Default
    Aug 24 21:24:23.481: //-1//SERV:/AFW_Service_GetExecEnv: Using Cached ExecEnv
    Aug 24 21:24:23.481: //-1//AFW_:EE141D000C000:/AFW_ExecEnv_SetRoot: Execenv = 0x141D000C
    Aug 24 21:24:23.481: //-1//AFW_:/AFW_M_TclModule_NewDup: 
    Aug 24 21:24:23.481: //-1//AFW_:HN5F586D74:/AFW_M_TclModule_Free: 
    Aug 24 21:24:23.481: //-1//AFW_:HN5F586D74:/AFW_M_Module_GetHandle: Module handle: TclModule_1FF1BE8_0_1599630708MOD[TclModule_1FF1BE8_0_1599630708]    ( )
    Aug 24 21:24:23.481: //-1//AFW_:/AFW_Process_Lock: pProcess(0x189DBE18)=1
    Aug 24 21:24:23.481: //-1//AFW_:LP:EE141D000C000:HN5F591DEC:/AFW_M_Object_SetExecEnv: ObjCount: 1, CmdPending 0
    Aug 24 21:24:23.481: //-1//AFW_:EE141D000C000:/AFW_ExecEnv_RestoreDataBackup: Restore DataArea from Script
    Aug 24 21:24:23.481: //-1//AFW_:EE141D000C000:/AFW_ExecEnv_RestoreDataBackup: Restore TokenTable from Script
    Aug 24 21:24:23.481: //-1//AFW_:EE141D000C000:/AFW_ExecEnv_Initiate: Execenv = 0x141D000C
    Aug 24 21:24:23.481: //-1//AFW_:EE141D000C000:/AFW_ExecEnv_SetCallCorID:
    Aug 24 21:24:23.481:  CallCorID is h; gmh a
    e7;k>H
    Aug 24 21:24:23.481: //-1//AFW_:/AFW_Leg_New: 
    Aug 24 21:24:23.481: //1082//AFW_:/AFW_M_Leg_SetExecEnv: 
    Aug 24 21:24:23.481: //-1//AFW_:EE141D000C000:/AFW_ExecEnv_IncrPendingCmd:  PendingCmdCount: 1
    Aug 24 21:24:23.481: //-1//AFW_:LP:EE141D000C000:LG1082:/AFW_M_Object_SetExecEnv: ObjCount: 2, CmdPending 1
    Aug 24 21:24:23.481: //1082//AFW_:/AFW_Object_AddListener: adding Module TclModule as listener
    Aug 24 21:24:23.481: //1082//AFW_:/AFW_M_Leg_GetHandle: Leg handle: LEG_1082
    Aug 24 21:24:23.481: //-1//AFW_:EE141D000C000:/AFW_ExecEnv_AssignCall: Execenv = 0x141D000C, Leg = 1082, Peer_Tag = 20078
    Aug 24 21:24:23.481: //1082//AFW_:/AFW_ExecEnv_SetCallCorID:
    Aug 24 21:24:23.481:  CallCorID is h; gmh a
    e7;k>H
    Aug 24 21:24:23.481: //-1//AFW_:/AFW_Event_New: Event ID: ev_any_event
    Aug 24 21:24:23.481: //1082//AFW_:/AFW_Process_GetCcqEvent: Received
    Aug 24 21:24:23.481: //-1//AFW_:/AFW_Process_GetCcqEvent:   Event[CC_EV_CALL_SETUP_IND(34)] {
    Aug 24 21:24:23.481: //-1//AFW_:/AFW_Process_GetCcqEvent:     EXECENV[0x141D000C]
    Aug 24 21:24:23.485: //-1//AFW_:/AFW_Process_GetCcqEvent:     LEG[1082][LEG_INIT(0)][Cause(0)]
    Aug 24 21:24:23.485: //-1//AFW_:/AFW_Process_GetCcqEvent:   }
    Aug 24 21:24:23.485: //1082//SSIN:/AFW_SS_MapEvent: 
    Aug 24 21:24:23.485: //1082//AFW_:/AFW_Leg_GetTypeDetail: voice intf type = 26
    Aug 24 21:24:23.485: //-1//SSIN:/AFW_SS_Telephony_MapEvent: 
    Aug 24 21:24:23.485: //-1//AFW_:/AFW_Util_SaveRawMsg: 
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Leg_UpdateStats: Updating stats for ID 271 type 0
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/incrementIncomingDialPeerCallStats: Incrementing call-stat to [-18] for dial-peer [20078]
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Object_WalkListeners: 
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_M_Object_ShowListeners: START
    Aug 24 21:24:23.485: //-1//AFW_:/AFW_M_Object_ShowListeners:  
    Aug 24 21:24:23.485: //1082//AFW_:/AFW_M_Module_GetHandle: Module handle: TclModule_1FF25F8_0_1599675884MOD[TclModule_1FF25F8_0_1599675884]  (
    Aug 24 21:24:23.485: //-1//AFW_:/AFW_M_Object_ShowListeners:     LEG[1082][LEG_INCINIT(1)][Cause(0)]
    Aug 24 21:24:23.485: //-1//AFW_:/AFW_M_Object_ShowListeners:   )
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_M_Object_ShowListeners: END
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Object_WalkListeners: Entering Module : TclModule
    Aug 24 21:24:23.485: //1082//AFW_:/AFW_ExecEnv_SetModuleScope: TclModule_1FF25F8_0_1599675884 ---> TclModule_1FF25F8_0_1599675884
    Aug 24 21:24:23.485: //1082//AFW_:/AFW_M_TclModule_Action: 
    Aug 24 21:24:23.485: //1082//AFW_:/AFW_TclModule_DefaultEvHandling: 
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Leg_CheckIncomingCallBlock: 
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Leg_SettlementValidateCall: target=, tokenp=0x0
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Leg_IncomingTranslate: 
    Aug 24 21:24:23.485: //-1//AFW_:/AFW_Leg_IncomingTranslate: Tag(20078) calling[86133964] redirect[] called[]
    Aug 24 21:24:23.485: //-1//AFW_:/C_ServiceSession_Event_Handler: 
    Aug 24 21:24:23.485: //-1//AFW_:/AFW_Session_New: 
    Aug 24 21:24:23.485: //-1//AFW_:/AFW_FSM_New: 
    Aug 24 21:24:23.485: //-1//AFW_:HN5F591DF0:/AFW_M_Session_SetExecEnv: 
    Aug 24 21:24:23.485: //-1//AFW_:LP:EE141D000C000:HN5F591DF0:/AFW_M_Object_SetExecEnv: ObjCount: 3, CmdPending 1
    Aug 24 21:24:23.485: //1082//AFW_:/AFW_Object_AddListener: adding Module TclModule as listener
    Aug 24 21:24:23.485: //1082//AFW_:/AFW_M_Module_GetHandle: Module handle: Session_135085E0_0_1599675888
    Aug 24 21:24:23.485: //1082//AFW_:/C_PackageSession_NewCall: Session module listened by TclModule_1FF25F8_0_1599675884
    Aug 24 21:24:23.485: //1082//AFW_:/AFW_ExecEnv_SetModuleScope: TclModule_1FF25F8_0_1599675884 ---> Session_135085E0_0_1599675888
    Aug 24 21:24:23.485: //1082//AFW_:/AFW_FSM_Drive: ACTION BEGIN: ------(S_OPEN[1],ev_setup_indication[34])---[C_Action]------
    Aug 24 21:24:23.485: //1082//AFW_:/Open_SetupIndication: Calling #(86133964), Calling Name (), Called #(), peer_tag(20078)
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Object_AddListener: adding Module Session as listener
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Leg_GetTypeDetail: voice intf type = 26
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Leg_GenerateTone:  ccTone 8 cptone 4
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Leg_GetCodec: 
    Aug 24 21:24:23.485: //1082/E8BB9EE78A87/AFW_:/AFW_Leg_GetCodec: Telephony leg. Default codec is assumed
    Aug 24 21:24:23.485: //1082//Digi:/C_DigitCollect_Start: Leg=1082, Dialplan=True, Diaplanterm=False, DigitReport=False, DigitConsume=False IgnoreInitialKey=False, IgnoreDTMFacceptINFO=True, Abortkey=

    Subject: RE: CME TCL script for outbound call
    Replied by: Karthikeyan Damodaran on 24-08-2012 07:22:47 PM
    Aug 24 23:18:54.215: //-1//SERV:/AFW_Service_CCInterface: Received Event 26 for service Default modulehandle NULL
    Aug 24 23:18:54.215: //-1//SERV:/AFW_Service_GetExecEnv: Script Name = Default
    Aug 24 23:18:54.215: //-1//SERV:/AFW_Service_GetExecEnv: Using Cached ExecEnv
    Aug 24 23:18:54.215: //-1//AFW_:EE01F95630000:/AFW_ExecEnv_SetRoot: Execenv = 0x1F95630
    Aug 24 23:18:54.215: //-1//AFW_:/AFW_M_TclModule_NewDup: 
    Aug 24 23:18:54.215: //-1//AFW_:HN0032CB70:/AFW_M_TclModule_Free: 
    Aug 24 23:18:54.215: //-1//AFW_:HN0032CB70:/AFW_M_Module_GetHandle: Module handle: TclModule_1F97BFC_0_3328880MOD[TclModule_1F97BFC_0_3328880] ( )
    Aug 24 23:18:54.215: //-1//AFW_:/AFW_Process_Lock: pProcess(0x188E6B4C)=1
    Aug 24 23:18:54.215: //-1//AFW_:LP:EE01F95630000:HN0035238C:/AFW_M_Object_SetExecEnv: ObjCount: 1, CmdPending 0
    Aug 24 23:18:54.215: //-1//AFW_:EE01F95630000:/AFW_ExecEnv_RestoreDataBackup: Restore DataArea from Script
    Aug 24 23:18:54.215: //-1//AFW_:EE01F95630000:/AFW_ExecEnv_RestoreDataBackup: Restore TokenTable from Script
    Aug 24 23:18:54.215: //-1//AFW_:EE01F95630000:/AFW_ExecEnv_Initiate: Execenv = 0x1F95630
    Aug 24 23:18:54.215: //-1//AFW_:EE01F95630000:/AFW_ExecEnv_SetCallCorID:
    Aug 24 23:18:54.215:  CallCorID is h Qhmx a



    Digit Collect Not Enabled.....


    I am giving Account number, but it keeps on saying Enter your PIN.....

    Subject: RE: CME TCL script for outbound call
    Replied by: Karthikeyan Damodaran on 24-08-2012 07:24:36 PM
    Enable=FALSE Consume=FALSE InterruptPrompt=TRUE minDigits=0 maxDigits=20 DialPlanTerm=FALSE hotword=0
    Aug 24 23:19:08.591: //-1//AFW_:LP:EE01F95718000:HN00355BB4:/AFW_M_Object_SetExecEnv: ObjCount: 4, CmdPending 1
    Aug 24 23:19:08.591: //23//AFW_:/AFW_Object_AddListener: adding Module TclModule as listener
    Aug 24 23:19:08.591: //23//AFW_:/AFW_M_Module_GetHandle: Module handle: DigitCollect_189355C4_0_3496884
    Aug 24 23:19:08.591: //23/E801D1E8801A/AFW_:/AFW_Object_AddListener: adding Module DigitCollect as listener
    Aug 24 23:19:08.591: //23/E801D1E8801A/Digi:/DigitCollectStart_UpdateStats: 
    Aug 24 23:19:08.591: //23//Digi:/DigitCollect_MLPPTuning: 
    Aug 24 23:19:08.591: //23//Digi:/DigitCollect_MLPPTuning: Precednece Digit Collect not enabled
    Aug 24 23:19:08.591: //23/E801D1E8801A/AFW_:/AFW_Leg_TypeAheadGet: no chars in buffer.


    Digit Collect Not Enabled.....


    I am giving Account number, but it keeps on saying Enter your PIN.....

    Subject: RE: CME TCL script for outbound call
    Replied by: Karthikeyan Damodaran on 24-08-2012 07:31:21 PM
    AAUSMELVG01#    debug voip application digitcollect
    voip application digit collect debugging is on
    AAUSMELVG01#
    Aug 24 23:29:01.187: //41//Digi:/C_DigitCollect_Start: Leg=41, Dialplan=True, Diaplanterm=False, DigitReport=False, DigitConsume=False IgnoreInitialKey=False, IgnoreDTMFacceptINFO=True, Abortkey=, Terminationkey=#, Numpatterns=0, Maxdigits=0, Mindigits=0, Interruptprompt=False, InterTimeout=-1000, Initialtimeout=-1000, Mask=0 Hotword=0
    Aug 24 23:29:01.187: //-1//Digi:/AFW_DigitCollect_New: 
    Aug 24 23:29:01.187: //-1//Digi:HN003E6688:/AFW_DigitCollect_New: DialPlan=TRUE AbortKey= TermKey=# NumPatts=0
                  Enable=FALSE Consume=FALSE InterruptPrompt=FALSE minDigits=0 maxDigits=0 DialPlanTerm=FALSE hotword=0
    Aug 24 23:29:01.187: //41/51CB00AF8032/Digi:/DigitCollectStart_UpdateStats: 
    Aug 24 23:29:01.187: //41//Digi:/DigitCollect_MLPPTuning: 
    Aug 24 23:29:01.187: //41//Digi:/DigitCollect_MLPPTuning: Precednece Digit Collect not enabled
    Aug 24 23:29:01.187: //41//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:01.187: //41//Digi:/act_DCRunning_RDone: id=41 Enable succeeded.enable=0 matchDialplan=1 numPatterns=0matchDialplanTerm=0
    Aug 24 23:29:02.111: //41//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:02.111: //41//Digi:/act_DCRunning_Digit: : pLeg 41 Digit 3 Tone Mode 0
    Aug 24 23:29:02.111: //41//Digi:/DigitCollect_TreatDigit: 
    Aug 24 23:29:02.111: //41//Digi:/DigitCollect_DialPlanMatch: pattern offset=0, digits=3
    Aug 24 23:29:02.111: //41//Digi:/DigitCollect_DialPlanMatch: src carrier id:, tgt carrier id:
    Aug 24 23:29:02.111: //41//Digi:/DigitCollect_DialPlanMatch: Match single infotype
    Aug 24 23:29:02.311: //41//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:02.311: //41//Digi:/act_DCRunning_Digit: : pLeg 41 Digit 9 Tone Mode 0
    Aug 24 23:29:02.311: //41//Digi:/DigitCollect_TreatDigit: 
    Aug 24 23:29:02.311: //41//Digi:/DigitCollect_DialPlanMatch: pattern offset=0, digits=39
    Aug 24 23:29:02.311: //41//Digi:/DigitCollect_DialPlanMatch: src carrier id:, tgt carrier id:
    Aug 24 23:29:02.311: //41//Digi:/DigitCollect_DialPlanMatch: Match single infotype
    Aug 24 23:29:02.511: //41//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:02.511: //41//Digi:/act_DCRunning_Digit: : pLeg 41 Digit 0 Tone Mode 0
    Aug 24 23:29:02.511: //41//Digi:/DigitCollect_TreatDigit: 
    Aug 24 23:29:02.511: //41//Digi:/DigitCollect_DialPlanMatch: pattern offset=0, digits=390
    Aug 24 23:29:02.511: //41//Digi:/DigitCollect_DialPlanMatch: src carrier id:, tgt carrier id:
    Aug 24 23:29:02.511: //41//Digi:/DigitCollect_DialPlanMatch: Match single infotype
    Aug 24 23:29:02.711: //41//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:02.711: //41//Digi:/act_DCRunning_Digit: : pLeg 41 Digit 2 Tone Mode 0
    Aug 24 23:29:02.711: //41//Digi:/DigitCollect_TreatDigit: 
    Aug 24 23:29:02.711: //41//Digi:/DigitCollect_DialPlanMatch: pattern offset=0, digits=3902
    Aug 24 23:29:02.711: //41//Digi:/DigitCollect_DialPlanMatch: src carrier id:, tgt carrier id:
    Aug 24 23:29:02.711: //41//Digi:/DigitCollect_DialPlanMatch: Match single infotype
    Aug 24 23:29:02.711: //41//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:02.711: //41//Digi:/act_DCRunning_RDone: id=41 Reporting disabled.
    Aug 24 23:29:02.711: //-1//Digi:/DigitCollect_Complete: DC_MATCHED_DIALPLAN. Digits=3902
    Aug 24 23:29:02.711: //41//Digi:/AFW_M_DigitCollect_EventPreProcess: 
    Aug 24 23:29:02.711: //41//Digi:/DigitCollectEnd_UpdateStats: 
    Aug 24 23:29:02.715: //43//Digi:/tcl_LegDigitCollectObjCmd: collectdigits leg_incoming param
    Aug 24 23:29:02.715: //43//Digi:/C_DigitCollect_Start: Leg=43, Dialplan=False, Diaplanterm=False, DigitReport=False, DigitConsume=False IgnoreInitialKey=False, IgnoreDTMFacceptINFO=False, Abortkey=*, Terminationkey=#, Numpatterns=0, Maxdigits=20, Mindigits=0, Interruptprompt=True, InterTimeout=-1000, Initialtimeout=10000, Mask=0 Hotword=0
    Aug 24 23:29:02.715: //-1//Digi:/AFW_DigitCollect_New: 
    Aug 24 23:29:02.715: //-1//Digi:HN003E6C80:/AFW_DigitCollect_New: DialPlan=FALSE AbortKey=* TermKey=# NumPatts=0
                  Enable=FALSE Consume=FALSE InterruptPrompt=TRUE minDigits=0 maxDigits=20 DialPlanTerm=FALSE hotword=0
    Aug 24 23:29:02.715: //43/51CB00AF8032/Digi:/DigitCollectStart_UpdateStats: 
    Aug 24 23:29:02.715: //43//Digi:/DigitCollect_MLPPTuning: 
    Aug 24 23:29:02.715: //43//Digi:/DigitCollect_MLPPTuning: Precednece Digit Collect not enabled
    Aug 24 23:29:02.715: //43//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:02.715: //43//Digi:/act_DCRunning_RDone: id=43 Enable succeeded.enable=0 matchDialplan=0 numPatterns=0matchDialplanTerm=0
    Aug 24 23:29:12.715: //43//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:15.723: //43//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:15.723: //43//Digi:/act_DCRunning_Digit: : pLeg 43 Digit T Tone Mode -1
    Aug 24 23:29:15.723: //43//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:15.723: //43//Digi:/act_DCRunning_RDone: id=43 Reporting disabled.
    Aug 24 23:29:15.723: //-1//Digi:/DigitCollect_Complete: DC_TIMEOUT. Digits=
    Aug 24 23:29:15.723: //43//Digi:/AFW_M_DigitCollect_EventPreProcess: 
    Aug 24 23:29:15.723: //43//Digi:/DigitCollectEnd_UpdateStats: 
    Aug 24 23:29:15.723: //43//Digi:/tcl_LegDigitCollectObjCmd: collectdigits leg_incoming param
    Aug 24 23:29:15.723: //43//Digi:/C_DigitCollect_Start: Leg=43, Dialplan=False, Diaplanterm=False, DigitReport=False, DigitConsume=False IgnoreInitialKey=False, IgnoreDTMFacceptINFO=False, Abortkey=*, Terminationkey=#, Numpatterns=0, Maxdigits=20, Mindigits=0, Interruptprompt=True, InterTimeout=-1000, Initialtimeout=10000, Mask=0 Hotword=0
    Aug 24 23:29:15.723: //-1//Digi:/AFW_DigitCollect_New: 
    Aug 24 23:29:15.723: //-1//Digi:HN003E9F50:/AFW_DigitCollect_New: DialPlan=FALSE AbortKey=* TermKey=# NumPatts=0
                  Enable=FALSE Consume=FALSE InterruptPrompt=TRUE minDigits=0 maxDigits=20 DialPlanTerm=FALSE hotword=0
    Aug 24 23:29:15.723: //43/51CB00AF8032/Digi:/DigitCollectStart_UpdateStats: 
    Aug 24 23:29:15.723: //43//Digi:/DigitCollect_MLPPTuning: 
    Aug 24 23:29:15.723: //43//Digi:/DigitCollect_MLPPTuning: Precednece Digit Collect not enabled
    Aug 24 23:29:15.723: //43//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:15.723: //43//Digi:/act_DCRunning_RDone: id=43 Enable succeeded.enable=0 matchDialplan=0 numPatterns=0matchDialplanTerm=0
    Aug 24 23:29:17.331: //43//Digi:/AFW_M_DigitCollect_Action: 
    Aug 24 23:29:17.331: //43//Digi:/act_DCRunning_Disconnected: 
    Aug 24 23:29:17.331: //-1//Digi:/DigitCollect_Complete: DC_DISCONNECTED. Digits=
    Aug 24 23:29:17.331: //43//Digi:/AFW_M_DigitCollect_EventPreProcess: 
    Aug 24 23:29:17.331: //43//Digi:/DigitCollectEnd_UpdateStats:
    This document was generated from CDN thread

    Created by: Karthikeyan Damodaran on 24-08-2012 05:20:35 PM
    user from outside call specific number in CME, then CME asks a password or pin, after user enter the password, he would be able to make a outbound call through CME. In this case, our employee can make a outbound call to international, and our company is getting charged not employee.
     
    PIN should be 2784872 .
     
    Below is the TCL script which i get from forum...
     
    It keeps on asking for the PIN....
     
    #------------------------------------------------------------------
    #
    # This tcl script prompts user for account number and then
    # authenticates the account number. If authenticated, the call will
    # be connected. If not authenticated, call will be closed.
    #
    # The PIN the users enters becomes the "username" and the password
    # is set by the script and remains fixed (see "set pin 1234567" statement
    # below).
    #                     
    proc init { } {
        global param
        set param(initialDigitTimeout) 10
        set param(interruptPrompt) true
        set param(abortKey) *
        set param(terminationKey) #
    }
    proc act_Setup { } {
        global ani
        global dnis
        global beep
        global ctr
       
        set ctr 0
        set beep 0
        set ani [infotag get leg_ani]
        set dnis [infotag get leg_dnis]
        leg setupack leg_incoming
        leg proceeding leg_incoming
        leg connect leg_incoming
        act_GetAccount
    }
    proc act_GetAccount { } {
        global param
        media play leg_incoming flash:enter_account.au
        set param(maxDigits) 20
        leg collectdigits leg_incoming param
    }
    proc act_GotAccount { } {
        global account
        global counter
        global ani
        global ctr
        global pin
        incr ctr
        set pin 1234567
        set status [infotag get evt_status]
        if {$status == "cd_005"} {
     set account [infotag get evt_dcdigits]
     #Do authorize
     aaa authorize $account $pin  $ani "" leg_incoming
        } elseif {$status == "cd_001"} {
       
            #timeout
     set number [infotag get evt_dcdigits]
     set numberLen [ string length $number ]
     if { $numberLen == 0 } {
                if { $ctr <= 3 } {
                    act_GetAccount
                    fsm setstate same_state
                } else {
                    call close
                }
     } else {
        
         #Do authorize
         aaa authorize $account $pin $ani "" leg_incoming
            }
        } elseif {$status == "cd_002"} {
            #Aborted
            act_GetAccount
            fsm setstate same_state
        } elseif {($status == "cd_001") ||
                  ($status == "cd_007") || ($status == "cd_006")} {
       
            #timeout/fail(disconnected)/invalid_no
            act_GetAccount
            fsm setstate same_state
        }
    }
    proc act_Authorized { } {
        global account
        global dnis
        set dnis [infotag get leg_dnis]
        set status [infotag get evt_status]
        if {$status == "ao_000"} {
            # Out going call is authorized
            puts "\t\t\t\n*** $account is authorized to call $dnis !!!\n"
            set callInfo(accountNum) $account
            leg setup $dnis callInfo leg_incoming
        } else {
            # Not authorized prompt ???
            puts "\t\t\t\n*** Sorry,$account not authorized to call $dnis !!!\n"
     call close
        } 
    }
     
    proc act_CallSetupDone { } {
        global beep
        set status [infotag get evt_status]
        if { $status != "ls_000"} {
     
     call close
        }
    }

    proc act_Cleanup { } {
        set evt_name [infotag get evt_event]
        call close
    }
    init
    #----------------------------------
    #   State Machine
    #----------------------------------
    set fsm(any_state,ev_disconnected)         "act_Cleanup       same_state"
     
    set fsm(CALL_INIT,ev_setup_indication)     "act_Setup         GETACCOUNT"
     
    set fsm(AUTHENTICATE,ev_authorize_done)    "act_Authorized    PLACECALL"
    set fsm(GETACCOUNT,ev_collectdigits_done)  "act_GotAccount    AUTHENTICATE"
    set fsm(CALLACTIVE,ev_disconnected)        "act_Cleanup    CALLDISCONNECT"
    set fsm(CALLDISCONNECT,ev_disconnected)    "act_Cleanup    same_state"
    set fsm(CALLDISCONNECT,ev_media_done)      "act_Cleanup    same_state"
    set fsm(CALLDISCONNECT,ev_disconnect_done) "act_Cleanup    same_state"
    set fsm(CALLDISCONNECT,ev_leg_timer)       "act_Cleanup    same_state"
    fsm define fsm CALL_INIT
     
     
     
     

    Subject: RE: CME TCL script for outbound call
    Replied by: Yaw-Ming Chen on 24-08-2012 05:32:22 PM
    Use any server for authentication ?

    Subject: RE: CME TCL script for outbound call
    Replied by: Yaw-Ming Chen on 24-08-2012 05:49:53 PM
    When digit collect successful "aaa authorize" command is issued.


        if {$status == "cd_005"} {

    set account [infotag get evt_dcdigits]

    #Do authorize

    aaa authorize $account $pin  $ani "" leg_incoming

    pin is fixed "1234567" whatever you entered is "account" for this command.



    aaa authorize
    The aaa authorize command sends a RADIUS authentication or authorization request, and allows the
    Tcl IVR script to retrieve information that the RADIUS server includes in its response. The command
    can be used multiple times during a single call (for example, to do the authentication, then to do the
    authorization).


    Maybe I missed something here, can you please let me know why you think it will work without radius server ?

    Subject: RE: CME TCL script for outbound call
    Replied by: Yaw-Ming Chen on 25-08-2012 02:14:35 AM
    To debug Tcl script the most common commans are
    deb voip app tcl
    deb voip app script

    Subject: RE: CME TCL script for outbound call
    Replied by: Yaw-Ming Chen on 12-09-2012 02:09:44 PM
    Posted a script that can configured a password within service no need for RADIUS


    http://developer.cisco.com/documents/148607/0/password2call.tcl.zip?redirect=http%3a%2f%2fdeveloper.cisco.com%2fweb%2fvgapi%2fdocs%3fp_p_id%3ddoc_library_summary_portlet_WAR_doclibrarysummaryportlet_INSTANCE_tpiU%26p_p_lifecycle%3d0%26p_p_state%3dnormal%26p_p_mode%3dview%26p_p_col_id%3dcolumn-1%26p_p_col_count%3d2