Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

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.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

The Notifo OpenVBX Plugin

No description
by

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://about.me/andrewwatson
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
Services

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

to=andrewwatson
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(
"to"=>"username",
"title"=>"Word of the Day",
"msg"=>"chuffed: delighted; pleased; satisfied.",
"uri"=>"http://dictionary.com"
);

$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) {
PluginData::set("notifo_username_$user_id",$_REQUEST['username']);
} 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