diff --git a/sites/all/modules/voipdrupal/modules/voipcall/voipscript.inc b/sites/all/modules/voipdrupal/modules/voipcall/voipscript.inc
index 91dd6f6..2f4671d 100644
--- a/sites/all/modules/voipdrupal/modules/voipcall/voipscript.inc
+++ b/sites/all/modules/voipdrupal/modules/voipcall/voipscript.inc
@@ -362,12 +362,13 @@ class VoipScript {
    *   If the call was successful, the variable dial_duration gets set with the
    *   number of seconds that the call lasted for.
    */
-  function addDial($number='', $timeout=30, $hangup_on_star=false, $time_limit=3600, $caller_id=''){
+  function addDial($number='', $timeout=30, $hangup_on_star=false, $time_limit=3600, $caller_id='', $answer_gosub = NULL){
     $params['number'] = $number;
     $params['timeout'] = $timeout;
     $params['hangup_on_star'] = $hangup_on_star;
     $params['time_limit'] = $time_limit;
     $params['caller_id'] = $caller_id;
+    $params['answer_gosub'] = $answer_gosub;
     $this->commands[] = new VoipCommand('VoipCmdDial', $params);
   }
   
diff --git a/sites/all/modules/voipdrupal/modules/voiptwilio/includes/voiptwilio.inc b/sites/all/modules/voipdrupal/modules/voiptwilio/includes/voiptwilio.inc
index 8c8e7ba..c969cf0 100755
--- a/sites/all/modules/voipdrupal/modules/voiptwilio/includes/voiptwilio.inc
+++ b/sites/all/modules/voipdrupal/modules/voiptwilio/includes/voiptwilio.inc
@@ -25,6 +25,7 @@ foreach (array('twilio.php') as $file) {
  *   - process_inbound_text, to handle incoming text
  *   - process_outbound_calls, to handle the response to outgoing call requests
  *   - process_dial, to handle the response to the "dial" script command
+ *   - process_dial_answer, to handle the answering of the "dial" script command
  *   - process_get_input, to handle responses to "get input" script commands
  *   - process_hangup, to handle call termination
  *   - process_record, process_record_mp3 and process_empty_recording, to handle
@@ -287,6 +288,9 @@ watchdog('voiptwilio', $msg, $vars, WATCHDOG_INFO);
       case 'process_dial':
         $call = _voiptwilio_process_dial_response($call, $_REQUEST);
         break;
+      case 'process_dial_answer':
+        $call = _voiptwilio_process_dial_answer($call, $_REQUEST);
+        break;
       case 'process_get_input':
         $script = $call->getScript();
         $input = ($_REQUEST['Digits'] == 'no_input')
@@ -479,6 +483,9 @@ watchdog('voiptwilio', $msg, array(), WATCHDOG_INFO);
             $menu_path = 'voip/twilio/callhandler';
             $cid = $call->getCid();
             $response_url = $menu_path . '/process_dial/' . $cid ;
+            if ($answer_gosub = $cmd->getParam('answer_gosub', false)) {
+              $answer_url = url($menu_path . '/process_dial_answer/' . $cid . '/' . $answer_gosub, array('absolute' => TRUE));
+            }
             $action = url($response_url, array('absolute' => TRUE));
             $method = 'POST';
           
@@ -496,7 +503,7 @@ watchdog('voiptwilio', $msg, array(), WATCHDOG_INFO);
                             . '" timeLimit="' . $time_limit
                             . '" callerId="' . $caller_id
                             . '" >';
-            $response .= '<Number>' . $number . '</Number>';
+            $response .= '<Number'. ($answer_url ? (' url="'. $answer_url .'"') : NULL) .'>' . $number . '</Number>';
             $response .= '</Dial>';
           }
           
@@ -1010,6 +1017,19 @@ function _voiptwilio_process_dial_response($call, $request){
   return $call;
 }
 
+
+/**
+ * Process the answering of a "dial" script command
+ */ 
+function _voiptwilio_process_dial_answer($call, $request){
+  $call = new VoipCall();
+  $script = new VoipScript('voip_process_dial_answer');
+  $script->addGosub(arg(5));
+  $call->setScript($script);
+  return $call;
+}
+
+
 /**
  * Process the response to a 'send text' script command
  */
