title: Use IfMachine in TwiML when using <Dial>
body: <p>Is there a way to use the <code>Dial</code> verb in conjunction with the <code>IfMachine</code> parameter?  I don't see anything on the dial verb page (<a href="https://www.twilio.com/docs/api/twiml/dial" rel="noreferrer">https://www.twilio.com/docs/api/twiml/dial</a>) which indicates the <code>IfMachine</code> parameter can be used or whether it will be passed to the resulting Action parameter.</p>
  
  <p>I found this post <a href="https://stackoverflow.com/questions/17834089/detecting-if-an-answering-service-picks-up">Detecting if an answering service picks up</a>, and the answer says "put the IfMachine parameter in your TwiML", but I don't see any examples of the <code>IfMachine</code> parameter being used in TwiML.  I've only seen examples of it being used with the REST API.</p>
  
  <p>I'm trying to have my application redirect a call, then if that redirected call was picked up by an answering machine to then send a text message.  Ideally the incoming call TwiML would look something like:</p>
  
  <pre><code>&lt;Response&gt;
    &lt;Dial action="/sendSmsIfMachine.cshtml" method="POST" ifMachine="Continue"&gt;
      555-5555
    &lt;/Dial&gt;
  &lt;/Response&gt;
  </code></pre>
  
  <p>Then my sendSmsIfMachine page would have something like:</p>
  
  <pre><code>@{
     Response.ContentType = "text/xml";
     if(Response["AnsweredBy"] == "machine")
     {
        var twimlResponse = new TwilioResponse();
        twimlResponse.Message("You got a voicemail", new { to = "555-5556" });
        Response.Write(twimlResponse.ToString();
     }
   }
  </code></pre>
  
  <p>When I tried this, the resulting request made to sendSmsIfMachine.cshtml did not include the AnsweredBy parameter according to to the Twilio log.</p>