Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-09, 01:57 PM
tshif tshif is offline
Guru
 
Join Date: Jan 2008
Location: San Diego, Calif
Posts: 1,131
Simple Hotel Style Wake-Up Calls – THE MODULE
Simple Hotel Style Wake-Up Calls – THE MODULE
The Hotel Style Wake Up call function has proven to be of interest to many of us. Simpler than Ward’s Voice Reminders, the system emulates the wake-up calls you might get when staying at a hotel.

So far – in the previous thread about this topic – we learned several ways of manually deploying the existing scripts. From all feedback – those methods are working well for most folks. But, from the stand point of being easy to install and configure – well, some folks had issues.

When it comes right down to it – I just don’t prefer to make the PBX administrator drop into a command line or text file to make simple configuration changes. And I have always wanted to try my hand at making an actual FreePBX module……

I am pleased to release to general use today the Hotel Style Wake Up Calls Module for FreePBX. The module uses essentially the same scripts used in the manually installed version – but with some significant changes.

Ok - On with the Show.

Prerequisites – Pay Attention
    • If you currently run any version of the Wake-Up scripts (from agi-bin), such as those discussed in this article, the module version will not co-reside. You should REMOVE the wakeup scripts from previous versions from your platform before installing the module. Failure to do so will cause unanticipated behaviors (Read: The old scripts wont work, may be replaced, and the new module won’t work either. Not good).
    • The Wake Up Calls Module requires PHP version 5.x, which is installed by default (we are spolied!) on PBXIAF. FreePBX however CAN RUN under PHP 4.x, so if your not running on PBXIAF, check your distro and make sure you have an appropriate version of PHP.
Note: The module DOES support the ability for the operator to send wakeup calls to any telephone number – including PTSN numbers; just not dialing in from outside the system – since Authentication is not yet supported.
    • This module uses the mySql database to store and read its configuration values. If you are running your pbx under a database other than MySQL, this module will fail.
    • If you have changed the asterisk user password to the MySQL asterisk database, this module will fail. (It can be edited to work under these circumstances, but that is outside the scope of this article)
      (New Info 4/8/2009: This is no longer the case. the current module handles this situation without problems.)
Under the Hood
For those interested in the details, the typical version of the Wake-Up scripts use variables (set in the include script) to establish various details, such as Operator Mode config, and other similar configuration settings. Also, the two scripts used different methods and locations for storing their configuration variables – leaving the installer to configure things in three separate places.

In the module version, both of the work-horse scripts have been modified to gather their configurations from the same .inc script. The .inc script itself has been modified to gather most configuration details from the database, instead of fixed values found in the scripts. To round it all out, the module has a user interface that allows the most common configuration settings to be changed (and stored in the database) – without ever opening a text editor.

Installation and Configuration – Wake-Up Calls: THE MODULE
Works exactly like installing any other third party module.
  • Download the module. You can get if HERE. (In General, Select the newest build.)
  • In FreePBX, Module Admin, Upload the Module to your PBX.
  • In FreePBX, Module Admin, under Third Party Addon, Locate Wake Up Calls, and INSTALL.
  • In FreePBX, Under tools, Third Party Addon, Select Wake Up Calls.
You should be greeted by the Wake Up Calls user interface screen, shown below.




The module installer installs default values.

Operator Mode
When enabled, the operator mode allows those extensions listed as Operator Extensions to request a Wake Up Call for any telephone number, up to the length specified in the Extension length drop down box.
If you do not wish to support WakeUp calls to outside numbers, select the extension length which matches the extension length used on your PBX.
If you do plan on supporting outside telephone numbers, select 10 or 11 as the extension length – dependant upon how your PBX dialing is set up (to require a leading ‘1’ or not.)
If you enter a destination number that is less than your maximum extension length - you must end your input with the # key, or it wont process your input. (Thanks for pointing this out, HAT!)

General Conifguration
Ring Time determines how long the Wake Up Call will ring the destination number before giving up for that attempt.
Retry time is the wait period between retries.
Max Retries is the maximum number of times the system will attempt the wake up call, or snooze call back.
WakeUp Caller ID allows you to customize the Caller ID info displayed by the wake up service. By default, the phone number shows the default feature code assigned when you install the module. If you change the feature code – make sure to come here and change the caller id to reflect the new value.

Changing the Dail String (Feaure Code)
In keeping with the goal of not having to edit config files, the Wake-Up Module sets the feature code (or dial string) using the FreePBX Feature Codes Page. (In FreePBX, under Setup, Select Feature Codes).

In the WakeUp Calls section, find the Wake Up Calls item. All controls work as expected here. You may change the feature code to suit your needs, and even disable the Wake Up calls service.

Future Module Updates
The FreePBX module update process works as expected for this module. Should an update be released, simply upload it to your PBX in the same way as the original. The Module Admin will then recognize a pending upgrade, and offer you that choice. Upon Upgrade, your previously established configuration items are not disturbed.

This module is not in the FreePBX third party modules repository, and as of this writing, there is no help page for it available from the More Information link in the FreePBX Module Admin. This may be accomplished in future releases.

Roadmap to Future Module Updates
In the future, I hope to add support for authenticating outside callers, in order to restore all the functionality in the Outside the Box version previously mentioned,

Credits/Thanks
I would never have been able to start this module without Jeremy Coulter, who provided me with actual working copies of the scripts to begin with, and lots of encouragement. I have naturally left any and all credit/author lines in the original scripts that were present when I got them.

Also – my ego would have taken a lethal beating from all the failures along the way were it not for Joe Roper – who provided encouragement, advice, and shared his immense knowledge of the FreePBX environment freely along the way.

Last – certainly not least, Jerry Swordsteel in far away Sweden jumped in and spent a good 4-5 hours coding the PHP for the Module’s user interface screen, and data/string manipulation needs. Jeremy, Joe, Jerry – thanks for helping make this module possible!

As always – share your results – and let us know how the Wake Up Module works for you.

Until next time –

tshif

Last edited by tshif : 05-03-09 at 07:09 PM. Reason: Updated link the module version 1.2
Reply With Quote
  #2  
Old 02-18-09, 02:47 PM
NameOfTheDragon NameOfTheDragon is offline
Junior Member
 
Join Date: Dec 2008
Posts: 1
Great module.
Thanks for sharing this module with the community. I just uploaded it to my system and it worked first time, flawless installation, works perfectly. I really appreciate the time and effort you (and others) have put into this.

--Tim Long
Reply With Quote
  #3  
Old 02-18-09, 02:50 PM
tshif tshif is offline
Guru
 
Join Date: Jan 2008
Location: San Diego, Calif
Posts: 1,131
Originally Posted by NameOfTheDragon View Post
Thanks for sharing this module with the community. I just uploaded it to my system and it worked first time, flawless installation, works perfectly. I really appreciate the time and effort you (and others) have put into this.

--Tim Long
Tim -
Thanks for posting your results. Nothing is sweeter to me than the sound of your success!

I see that this is your first post to the forums here - Welcome to you! This is a great community - and it works best when everyone feels comfy jumping in and participating. Thanks for doing so here!

Tony
Reply With Quote
  #4  
Old 02-18-09, 03:25 PM
Fortel Fortel is offline
Guru
 
Join Date: Oct 2007
Location: Northern California
Posts: 83
Wake Up Call module = excellent!
This worked as advertised, and without a glitch. Thanks for making it so easy!

Peter
Reply With Quote
  #5  
Old 02-18-09, 06:38 PM
MGD4me MGD4me is online now
Guru
 
Join Date: Feb 2009
Posts: 109
Worked perfectly!

I had never 'uploaded' a module before, so I acquired a new skill while doing this.

This is a very simple way to add functionality without having to tinker with any code, unless of course you really feel the need to break it!

Thanks again.
Reply With Quote
  #6  
Old 02-18-09, 08:27 PM
mruge mruge is offline
Member
 
Join Date: Jan 2008
Location: Spokane, WA
Posts: 99
Great work Tony! Works like a champ.

Thank you for the hard work.
Reply With Quote
  #7  
Old 02-18-09, 09:25 PM
Hat Hat is offline
Guru
 
Join Date: Dec 2007
Posts: 84
First off, thanks for this module. It makes adding features a breeze (read: saves me from myself).

Just wanted to add this as I did not see it in your write up. I have the Operator Mode set to yes and enter in a number that is less than the set Extension Length my system will not accept the entry unless I add the # after the number (i.e. Extension Length is set to 11 digits and I enter 3 digits to call an internal extension. Without the # after the 3 digits, the initial prompt plays again. Then hangs up after the third try.) I tried this from my Grandstream GXP 2000 and analog phones on an ata. Both given operator status. This is just my experience.

Everything else just works. The upgrade (had the initial module) works. All the base functions work, too. Thanks once again.

Tom
Reply With Quote
  #8  
Old 02-18-09, 10:20 PM
mark-hc mark-hc is offline
Senior Member
 
Join Date: Dec 2008
Posts: 107
Awesome Tony! Works great.

Selectable celebrity voices next?

"GET AAHP YOU IDIOT!!!" -Arnold Swartz

This module is really cool.
Reply With Quote
  #9  
Old 02-18-09, 10:27 PM
tshif tshif is offline
Guru
 
Join Date: Jan 2008
Location: San Diego, Calif
Posts: 1,131
Hotel Style WakeUp Calls: The Module OUTSIDE THE BOX
As previously mentioned, the Wake Up Calls Module does not specifically support all of the "Outside the Box" functionality. But that doesn't mean you can't easily add that support.

The Module does support long enough extensions (10 and 11 digit) to work with outside numbers, and does have the required Caller ID recognition abilities to work with outside numbers.

What the module does NOT do is create a dial plan with the AUTHENTICATE function included - which is highly desirable if your going to expose Wake Up Calls to a public Dial in number, or IVR.

So - if your a die-hard external user attached to your "Out of the Box" functionality - heres an easy way to get it back using the Wake Up Call module.

Step 1. Install the module. Set the maximum extension length to 10 or 11 digits (to match your PBX dial out rules). If you want an outside number, such as your cell phone to be considered an Operator Extension, add your cell phone telephone number (exactly the way it is delivered via Caller ID) to the operator extensions list.

Steps 2: Add this dial plan to extension_custom.conf:

[custom-wakeup-calls-pin]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Authenticate(1234567)
exten => s,4,AGI(wakeupphp)
exten => s,5,Hangup

Obviously, change line s,3 1234567 to be your own complex pin.

Step 3:
In FreePBX. create a custom destination with the following characteristics:
Custom Destinations: custom-wakeup-calls-pin,s,1
Description : Outside WakeUp Calls

Step 4:
In FreePBX. as per normal, create in inbound route for the DID you will use for dialing into WakeUp Calls.
Set Destination: Custom Destinations: Outside Wakeup Calls

Re Read Config (In FreePBX Config Editor)

In Step 4 you could just as easily make `Outside Wakeup Calls` a choice from an IVR - stealth or not-stealth.

Thats it. Your Hotel Style WakeUp Calls Module is now configured for 'Outside the Box" functionality.

Till next time -
tshif

Last edited by tshif : 06-19-09 at 08:25 PM. Reason: Changes to step 2 agi file name. This would be a showstopper.
Reply With Quote
  #10  
Old 02-18-09, 10:36 PM
mark-hc mark-hc is offline
Senior Member
 
Join Date: Dec 2008
Posts: 107
Tony,How do i properly uninstall the old module?

It is still listed under modules after I removed it.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:59 PM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2007-2008, Ward Mundy & Associates