''' 语音流程 '''
eventtype=["振铃","接通","按键","语音结束","语音超时","己方挂机","对方挂机","其他事件","转接失败","闪断","定时器"]
''' Info.IvrResult = -1 '''
try:
    atprint(eventtype[Info.EventType] + ",分机号=" + Info.Ext + "; 外线号码=" + Info.OutCode + "; 电话=" + Info.Tel)
except:
    atprint("收到其他事件="+str(Info.EventType))
''' ///////////////////////////////////////////////////// ''' 
if Info.EventType == 0:
    '''电话响铃代码写在这下面'''
    atprint("")
    SetDnd(Info.chindex,0)
    SendTone(Info.chindex,4)
    Play(Info.chindex, "setok")    
elif Info.EventType == 3:
    '''语音结束写在这下面'''
    atprint("")
    SendTone(Info.chindex,3)
else:
    atprint("")
