Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


The Notifo OpenVBX Plugin

No description

Andrew Watson

on 4 January 2011

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of The Notifo OpenVBX Plugin

The Secret History of the Notifo Plugin for OpenVBX by Twilio Featured Developer
Andrew Watson

http://bit.ly/NotifoVBX OVERVIEW

What Is Notifo
Notifo API
OpenVBX Plugin Basics
Plugin Code Examples Notifo IS mobile notifications
for everything

Simple Push platform
Multiple Device Support
Subscribers have power over message delivery Some Notifo Enabled

Github - commit hooks
Femtoo - content changes
Skribit - new suggestions
Pushly - Twitter Mentions Notifo API
Methods subscribe_user

POST https://api.notifo.com/v1/subscribe_user

username=andrewwatson send_notification

POST https://api.notifo.com/v1/send_notification

msg=Hello%20From%San%20Francisco OpenVBX Usage The NotifoSend Applet goes in OpenVBX Call Flow Plugins can contain both call flow applets and Pages displayed in the OpenVBX UI Plugin code can access a persistent data store using the PluginData API OpenVBX Plugin Concepts The AppletInstance API is used to set and retrieve data for each instance of an applet inside a call flow Notifo Service Config Verify admin status $ci = &get_instance();
$is_admin = $ci->session->userdata('is_admin');
if ($is_admin == 1) { ... } Verify Service Credentials $notifo = new Notifo_API($_GET['username'],$_GET['auth_token']);
$params = array(
"title"=>"Word of the Day",
"msg"=>"chuffed: delighted; pleased; satisfied.",

$response = json_decode($notifo->send_notification($params));
if ($response->response_code == 1102) { ... } Save Credentials PluginData::set("Notifo_Service_UserName", $_GET['username']);
PluginData::set("Notifo_Service_AuthToken", $_GET['auth_token']); Notifo User Config $ci = &get_instance();
$user_id = $ci->session->userdata('user_id');
$notifo_svc_username = PluginData::get("Notifo_Service_UserName", "");
$notifo_svc_password = PluginData::get("Notifo_Service_AuthToken", "");
$notifo = new Notifo_API($notifo_svc_username,$notifo_svc_password);

$result = json_decode($notifo->subscribe_user($_GET['username']));
if ($result->response_code == 2201) {
} Each OpenVBX user configures their own Notifo user ID Applet
Example Code ui.php twiml.php <h3>Who do you want to send the message to?</h3>
<?php echo AppletUI::UserGroupPicker('notifo-controller'); ?>
<h3>Next Action</h3>
<?php echo AppletUI::DropZone('nextAction'); ?> $user = AppletInstance::getUserGroupPickerValue('notifo-controller');
$user_id = $user->values["id"];
$variable = AppletInstance::getValue("variable","");
if ($variable == "callerid") {
$msg = sprintf("CallerID: %s",$_REQUEST['Caller']);
$params = array("to" => $notifo_recipient, "title" => $title,
"msg" => urlencode($msg), "url" => $url);
$resp = json_decode($notifo->send_notification($params));
$default = AppletInstance::getDropZoneUrl('nextAction');
$response->addRedirect($default); http://openvbx.org/ http://bit.ly/NotifoVBX MORE INFO or ask me!
Full transcript