We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is a patch to allow you to pick if your transfering to sms flow or call flow...
From 448f0a8bd0e546349d16a77fd399842e7d5bd53d Mon Sep 17 00:00:00 2001 From: Peter <[email protected]> Date: Fri, 20 Aug 2010 10:45:27 -0500 Subject: [PATCH] added the ability to transfer to sms flows --- applets/transfer/twiml.php | 18 ++++++++++++++++-- applets/transfer/ui.php | 9 +++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/applets/transfer/twiml.php b/applets/transfer/twiml.php index 948b57f..1f56460 100644 --- a/applets/transfer/twiml.php +++ b/applets/transfer/twiml.php @@ -2,9 +2,10 @@ $response = new Response(); $redirect_type_selector = AppletInstance::getValue('redirect-type-selector'); - +$flowtype = AppletInstance::getValue('flowtype'); if ($redirect_type_selector == "flow") { +if ($flowtype == "call") { $gotoflow_raw = AppletInstance::getValue('gotoflow'); $gotoflow_url = site_url("/twiml/applet/voice/" . $gotoflow_raw . "/start"); @@ -13,6 +14,19 @@ if ($redirect_type_selector == "flow") $response->Respond(); exit; } +else if ($flowtype == "sms") +{ + $gotoflow_raw = AppletInstance::getValue('gotoflow'); + $gotoflow_url = site_url("/twiml/applet/sms/" . $gotoflow_raw . "/start"); + + $response = new Response(); + $response->addRedirect($gotoflow_url); + $response->Respond(); + exit; +} + +} + else if ($redirect_type_selector == "url") { @@ -26,4 +40,4 @@ else if ($redirect_type_selector == "url") else { trigger_error("Unexpected redirect-type-selector value of '$redirect_type_selector'"); -} \ No newline at end of file +} diff --git a/applets/transfer/ui.php b/applets/transfer/ui.php index 38ba8fa..dd02a50 100644 --- a/applets/transfer/ui.php +++ b/applets/transfer/ui.php @@ -1,7 +1,7 @@ <?php $gotoflow = AppletInstance::getValue('gotoflow'); $redirect_type_selector = AppletInstance::getValue('redirect-type-selector', 'flow'); - +$flowtype = AppletInstance::getValue('flowtype', 'call'); ?> <div class="vbx-applet subflow-applet"> <h2>Transfer</h2> @@ -26,7 +26,10 @@ $redirect_type_selector = AppletInstance::getValue('redirect-type-selector', 'fl <input type="radio" name="redirect-type-selector" value="flow" <?php echo ($redirect_type_selector === 'flow') ? 'checked="checked"' : '' ?> /> </td> <td class="content-cell"> - <div style="float: left;"><h4>Redirect to a call flow</h4></div> + <div style="float: left;"><h4>Redirect to a call or SMS flow</h4> + Call Flow: <input type="radio" name="flowtype" value="call" <?php echo ($flowtype === 'call') ? 'checked="checked"' : '' ?> /> + SMS Flow: <input type="radio" name="flowtype" value="sms" <?php echo ($flowtype === 'sms') ? 'checked="checked"' : '' ?> /> + </div> <div style="float: right;"> <select name="gotoflow" class="medium"> @@ -34,8 +37,6 @@ $redirect_type_selector = AppletInstance::getValue('redirect-type-selector', 'fl <option value="<?php echo $flow->values['id']; ?>" <?php echo ($gotoflow == $flow->values['id'])? 'selected="selected"' : '' ?>><?php echo $flow->values['name'];?></option> <?php endforeach; ?> </select> - - </div> </td> </tr> -- 1.5.4.3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here is a patch to allow you to pick if your transfering to sms flow or call flow...
The text was updated successfully, but these errors were encountered: