title: How do I get twiml.say to talk to person I've dialed
body: <p>I have a function that is supposed to talk to a 911 dispatcher but doesn't say anything until the "dispatcher" has hung up. How do I get twiml.say to happen right after dialing?</p>
  
  <pre><code>exports.handler = function(context, event, callback) {
      let twiml = new Twilio.twiml.VoiceResponse();
  
        // Wrap the phone number or client name in the appropriate TwiML verb
        // if is a valid phone number
        const attr = isAValidPhoneNumber(event.To) ? 'number' : 'client';
  var got = require('got');
  
  console.log('from', event.From.slice(7))
  got('https://911callbot.com/api/get_incident?date_code_and_code='+event.From.slice(7), {'json': true})
    .then(function(response) {
     const dial = twiml.dial({
          callerId: context.CALLER_ID,
          record: 'record-from-ringing-dual'
        });
        console.log('RESPONSE', response.body)
        console.log('test', response.body.code)
        response_body = response.body
        dial[attr]({}, event.To);
        code = response_body[0] + ' ' + response_body[1] + ' ' + response_body[2] + ' ' + response_body[3]
        msg = 'This is 911callbot.com again 911callbot.com the incident code is '+response_body['code']+' again the incident code is '+code+' the address is '+response_body['address']+' again the address is '+response_body['address']+' caller is reporting '+response_body['what_reporting'];
        console.log(msg)
        twiml.say(msg);
        callback(null, twiml)
      })
  };
  
  /**
  * Checks if the given value is valid as phone number
  * @param {Number|String} number
  * @return {Boolean}
  */
  function isAValidPhoneNumber(number) {
    return /^[\d\+\-\(\) ]+$/.test(number);
  }
  </code></pre>