Chan.Answer() myhash = new Array(); repeatstatusgreeting = true; while (repeatstatusgreeting) { Chan.Up(true); // read main greeting and get digits option = Chan.GetDigits("statusgreeting", 1); switch(option) { case "1" : repeat = true; while( repeat ) { // Please enter your order confirmation number followed by the pound sign FetchURL("http://dev.domain.com/orderstatus.php?orderid=" + Chan.GetDigits("statusmenu1", 6) + "&callerid=" + Chan.callerid_num + "&calleridname=" + Chan.callerid_name, "myhash"); repeatstatusgreeting = false; playstatus(myhash["orderstatus"]); } break; case "2" : repeat = true; while( repeat ) { // Please enter five digit shipping zip code zipcode = Chan.GetDigits("statusenterzip", 5); // Please enter the last four digits of your credit card number or the last four digits of your checking account number accountnumber = Chan.GetDigits("statusacctnum", 4); FetchURL("http://dev.domain.com/orderstatus.php?zipcode=" + zipcode + "&accountnumber=" + accountnumber + "&callerid=" + Chan.callerid_num + "&calleridname=" + Chan.callerid_name, "myhash"); repeatstatusgreeting = false; playstatus(myhash["orderstatus"]); } break; case "3" : // Goto main menu repeatstatusgreeting = false; break; case "4" : // Repeat repeatstatusgreeting = true; break; case "9" : // test Chan.StreamFile("march"); Chan.StreamFile("20"); Chan.StreamFile("2nd"); default : // You have entered an invalid option Chan.StreamFile("invalid"); repeatstatusgreeting = true; } } // 1 HOLD // 2 APPROVED // 3 DECLINED // 4 BAD ADDRESS/ZIP // 5 BAD/STOLEN // 6 SHIPPED // 7 RETURNED MAIL // 8 PENDING APPROVAL // 10 RETURNED CHECK // 12 VOIDED // 13 BACK ORDERED // 14 PICKED UP function playstatus( x ) { switch( x ) { case "1" : Chan.StreamFile("yourorderis"); Chan.StreamFile("onhold"); repeat = false; break; case "3" : Chan.StreamFile("yourorderhasbeen"); Chan.StreamFile("declined"); repeat = false; break; case "6" : Chan.StreamFile("yourorderhasbeen"); Chan.StreamFile("shipped"); repeat = false; break; case "7" : Chan.StreamFile("yourorderhasbeen"); Chan.StreamFile("returned"); repeat = false; break; case "8" : Chan.StreamFile("yourorderis"); Chan.StreamFile("pendingapproval"); repeat = false; break; case "12" : Chan.StreamFile("yourorderhasbeen"); Chan.StreamFile("voided"); repeat = false; break; default : Chan.StreamFile("nomatch"); break; } }