Advertisement
Guest User

Untitled

a guest
May 24th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1.  
  2. // Is there a session active
  3. if (currentcall) {
  4. log("TROPO_EU_TESTERS, incoming call");
  5. if (currentcall.network === "VOICE") {
  6. log("TROPO_EU_TESTERS, incoming call, network:VOICE");
  7. say("Thanks for joining Tropo Europe Testers service.");
  8. wait(1000);
  9. say("We welcome your responses via SMS for now");
  10. hangup();
  11. return;
  12. }
  13. if (currentcall.network === "SMS") {
  14. log("TROPO_EU_TESTERS, incoming call, network:SMS");
  15. say("Thanks for joining Tropo Europe Testers service.");
  16. wait(1000);
  17. say("We welcome your responses via SMS for now");
  18. hangup();
  19. return;
  20. }
  21. log("TROPO_EU_TESTERS, incoming call, network:UNKNOWN");
  22. say("Sorry we cannot process your message");
  23. hangup();
  24. }
  25.  
  26. // No call active, a new session will be started
  27. else {
  28. log("TROPO_EU_TESTERS, no current session, outgoing call");
  29. // Start an SMS session
  30. call(testernumber, { network:"SMS" });
  31.  
  32. // say("Hi Tropo Europe Tester, this SMS with trackID: " + trackID + " was delivered via: " + country + ". Please check the sender number is " + troponumber + ". If yes, respond and include your trackID. For example: received " + trackID + ". If no, send an SMS to XXXX");
  33. var trackID = 12345;
  34. say("Hi Tropo Europe Tester, sms [trackID:" + trackID + "] was delivered from: Canada, please respond CORRECT or WRONG to " + troponumber + " if the sender number is " + troponumber + ". Thanks for your contribution to Tropo Europe.");
  35.  
  36. hangup();
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement