jeudi 28 mai 2015

twilio Lambda backend aws

are there a possibility to use Lambda like a backend to twilio. i can call twilio from lambda but i need to get infromation from mobile "presse 1 " i chode make a serveur 'serveur_backend' or just can i invoke other function lambda ,, (i know that we can not invoke lambda

exports.handler = function(event, context) {
  resp.say('bienvenue ', {
    voice:'alice',
    language:'fr-FR'
  });
  resp.say('helloo', {
    voice:'woman',
    language:'fr-FR'
  });
  .gather({
   method:"GET",
   finishOnKey:'*',
   action : 'serveur_backend',
   timeout: "10"
  }, function() {
   this.say('presse 1 to ****  ', {
   voice:'alice',
   language:'fr-FR'
  });

  var l = "<Response>"+S(resp.toString()).between('<Response>', '</Response>').s+"</Response>";
  var URL = "http://ift.tt/1zAtfLG"+encodeURIComponent(l);
  console.log(URL);
  client.calls.create({
    url:   URL,
    to: "+**********",
    from: "+*********"
//    timeout: "10"
//    callback
  }, 
  function(err, call) { console.log("appel lancé");
   process.stdout.write(call.sid);
    console.log(call.sid);
  context.done(null,  " have a nice day ");
  });




Aucun commentaire:

Enregistrer un commentaire