[Local_Default_CallingRules] include = clean include = hotelba include = sla_stations include = reset_followme include = enable_followme_always include = disable_followme_always include = enable_followme_noanswer include = disable_followme_noanswer include = enable_followme_busy include = disable_followme_busy include = enable_dnd include = disable_dnd include = vmm include = en-force-to-outside include = dis-force-to-outside include = en-force-to-inside include = force-to-businesshours include = parkedcalls include = conferences include = ringgroups include = ivrs include = queues include = voicemailgroups include = pagegroups include = page_an_extension include = pickup_extension include = speeddial include = exten_dial_config include = extension-white-and-black-outbound include = inrouter_feature_dest include = emergency-number include = default [clean] exten = 777,1,NoOp(777) same = n,Goto(clean-action,play,1) [clean-action] exten = play,1,Background(roomstatus) same = n,WaitExten(4) same = n,Goto(h,1) exten = *00,1,Playback(room) exten = *00,n,SayDigits(${CALLERID(num)}) // exten = *00,n,UserEvent(DtmfEndString,Info:777${EXTEN}) exten = *00,n,Playback(uncleaned) //,设置为未清洁, exten = *00,n,Hangup() exten = *01,1,Playback(room) exten = *01,n,SayDigits(${CALLERID(num)}) exten = *01,n,UserEvent(DtmfEndString,Info:777${EXTEN}) exten = *01,n,Playback(cleaned) //,设置为已清洁, exten = *01,n,Hangup() exten = h,1,Hangup() exten = i,1,Goto(always-Hangup,h,1) [hotelba] exten = 778,1,NoOp(778) same = n,Background(product_id) same = n,Read(digito,,9,,,4) // 9位商品编号 same = n,Gotoif($[${LEN(${digito})}>0]?check,1) same = n,Background(product_id) same = n,Read(digito,,9,,,4) same = n,Gotoif($[${LEN(${digito})}>0]?check,1) same = n,Background(product_id) same = n,Read(digito,,9,,,4) same = n,Gotoif($[${LEN(${digito})}>0]?check,1) same = n,Goto(h,1) //三次没有输入商品编号,则挂断 exten = check,1,Macro(productlist,${digito},1) same = n,Goto(778,2) exten = h,1,Hangup() [macro-productlist] exten = s,1,Set(product_id=${ARG1}) same = n,Background(product_idc) same = n,SayDigits(${product_id}) same = n,Background(product_num) same = n,Read(digito,,2,,,4) //2位商品个数,超时4秒 same = n,Gotoif($[${LEN(${digito})}>0]?num,1) same = n,Background(product_num) same = n,Read(digito,,2,,,4) same = n,Gotoif($[${LEN(${digito})}>0]?num,1) same = n,Background(product_num) //两次没有输入数量就取消返回 exten = num,1,Set(product_num=${digito}) same = n,Background(product_numc) // 您输入的商品个数是,, same = n,SayDigits(${product_num}) // same = n,Goto(confirm,1) exten = confirm,1,Playback(confirm) same = n,Read(digito,,1,,,4) same = n,Gotoif($["${digito}"="*"]?778,1) //按*返回 same = n,Gotoif($[${digito}=1]?yes,1) //按1确认 same = n,Gotoif($[${digito}=9]?h,1) //按9挂掉 same = n,Background(vm-goodbye) same = n,Goto(h,1) exten = yes,1,UserEvent(DtmfEndString,Info: 778*${product_id}*${product_num}) //发出DTMF串 exten = yes,2,Background(success) //输入成功 exten = h,1,hangup()