Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Is there a session active
- if (currentcall) {
- log("TROPO_EU_TESTERS, incoming call");
- if (currentcall.network === "VOICE") {
- log("TROPO_EU_TESTERS, incoming call, network:VOICE");
- say("Thanks for joining Tropo Europe Testers service.");
- wait(1000);
- say("We welcome your responses via SMS for now");
- hangup();
- return;
- }
- if (currentcall.network === "SMS") {
- log("TROPO_EU_TESTERS, incoming call, network:SMS");
- say("Thanks for joining Tropo Europe Testers service.");
- wait(1000);
- say("We welcome your responses via SMS for now");
- hangup();
- return;
- }
- log("TROPO_EU_TESTERS, incoming call, network:UNKNOWN");
- say("Sorry we cannot process your message");
- hangup();
- }
- // No call active, a new session will be started
- else {
- log("TROPO_EU_TESTERS, no current session, outgoing call");
- // Start an SMS session
- call(testernumber, { network:"SMS" });
- // 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");
- var trackID = 12345;
- 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.");
- hangup();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement