Coder Social home page Coder Social logo

Comments (7)

that0n3guy avatar that0n3guy commented on September 28, 2024

I did some messing and here is the twiml.php patch:
*** twiml.php 2010-06-28 20:18:18.000000000 -0500
--- twimledit.php 2010-06-30 14:02:49.000000000 -0500
***************
*** 25,30 ****
--- 25,32 ----
$dial_whom_user_or_group = AppletInstance::getUserGroupPickerValue('dial-whom-user-or-group');
$dial_whom_number = AppletInstance::getValue('dial-whom-number');

  + $dial_timeout_number = AppletInstance::getValue('dial-timeout-number');
  + $dial_callerId = AppletInstance::getValue('dial-callerId');

$no_answer_action = AppletInstance::getValue('no-answer-action', 'hangup');
$no_answer_group_voicemail = AppletInstance::getAudioSpeechPickerValue('no-answer-group-voicemail');
  ***************
  *** 104,109 ****
  --- 106,115 ----
      }
}

  + if($dial_callerId == 'called'){
  +     $dial_callerId = isset($_REQUEST['Called'])? $_REQUEST['Called'] : null;
  +     }
  + 
// This loop exists only so that we can quickly make state transitions by
// setting a new DIAL_ACTION and jumping to the top of the loop.

  ***************
  *** 120,126 ****
              {
                  // There are still more numbers left to try

  !                 $dial = $response->addDial(array('action' => current_url()));

                  if ($dial_whom_selector === 'user-or-group')
                  {
  --- 126,139 ----
              {
                  // There are still more numbers left to try

  !                 $dial = $response->addDial(
  !                 array(
  !                     'action' => current_url(), 
  !                     'callerId' => $dial_callerId,
  !                     'timeout' => $dial_timeout_number,
  !                     )
  !                     );
  !     

                  if ($dial_whom_selector === 'user-or-group')
                  {
  ***************
  *** 183,188 ****
  --- 196,202 ----
                  {
                      $response->append(AudioSpeechPickerWidget::getVerbForValue($voicemail, new Say("Please leave a message.")));
                      $response->addRecord(array(
  +                                                'transcribe' => true,
                                            'transcribeCallback' => site_url('twiml/transcribe'),
                                            ));
                      $state[DIAL_ACTION] = DIAL_STATE_RECORDING;

from openvbx.

that0n3guy avatar that0n3guy commented on September 28, 2024

and here is my ui.php patch:

*** ui.php 2010-06-28 20:18:18.000000000 -0500
--- uiedit.php 2010-06-30 14:02:49.000000000 -0500
***************
*** 21,27 ****
--- 21,29 ----
}

    $dial_whom_selector = AppletInstance::getValue('dial-whom-selector', 'user-or-group');
+   $dial_attributes_selector = AppletInstance::getValue('dial-attributes-selector', 'attributes-none');    
    $no_answer_action = AppletInstance::getValue('no-answer-action', 'voicemail');
+   

  ?>
  <div class="vbx-applet dial-applet">
***************
*** 51,56 ****
--- 53,80 ----
            </tr>
        </table>
    </div>
+   
+       <h2>Dial Attributes</h2>
+   <div class="radio-table">
+       <table>
+           <tr class="radio-table-row last">
+ 
+               <td class="content-cell">
+                   <h4>Exta Attributes</h4>
+               <div class="vbx-input-container input">
+                           <input type="text" class="medium" name="dial-timeout-number" value="<?php echo AppletInstance::getValue('dial-timeout-number', '30') ?>"/>
+                           <p>The number in seconds you want to wait till you to go "no answer"</p>
+                       </div>
+                       <div class="vbx-input-container input">
+                           <input type="text" class="medium" name="dial-callerId" value="<?php echo AppletInstance::getValue('dial-callerId', '') ?>"/>
+                           <p>If you want the callerId on to show up as a verified twilio "out" number, enter the number here.  Leave blank otherwise. Example: 8775551236</p>
+                           <p><strong>If you just want to use the "called" number type 'called' in above (without quotes).</strong></p>
+                       </div>
+               </td>
+           </tr>
+       </table>
+   </div>
+   

    <br />
    <h2>If nobody answers...</h2>

from openvbx.

that0n3guy avatar that0n3guy commented on September 28, 2024

Something similar to this should be added to core.

from openvbx.

that0n3guy avatar that0n3guy commented on September 28, 2024

oh.. please note I havent tested the "timeout" attribute yet.

edit: seems to work... more testing will go on.

from openvbx.

thevinci avatar thevinci commented on September 28, 2024

cool! ill check it out.

from openvbx.

keyboardface avatar keyboardface commented on September 28, 2024

Thanks - this is exactly what I needed. I modified the applet files and posted them here:

http://www.keyboardface.com/archives/2010/11/21/openvbx-applet-for-adding-timeout-and-callerid-to-dial-applet/

from openvbx.

that0n3guy avatar that0n3guy commented on September 28, 2024

I've noticed you cant use the undocumented attribute "record" with this. It give a blank screen for the twiml

from openvbx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.