Simple Hotel Style Wake-Up Calls – THE MODULE

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
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.



wakeup.jpg

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 a moderator:

NameOfTheDragon

New Member
Joined
Dec 8, 2008
Messages
1
Reaction score
0
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
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
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
 

Fortel

Guru
Joined
Oct 19, 2007
Messages
122
Reaction score
4
Wake Up Call module = excellent!

This worked as advertised, and without a glitch. Thanks for making it so easy!

Peter
 

MGD4me

Guru
Joined
Feb 3, 2009
Messages
505
Reaction score
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.
 

mruge

Guru
Joined
Jan 28, 2008
Messages
121
Reaction score
0
Great work Tony! Works like a champ. :thumbsup:

Thank you for the hard work.
 

Hat

Guru
Joined
Dec 18, 2007
Messages
88
Reaction score
0
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
 

mark-hc

Member
Joined
Dec 12, 2008
Messages
110
Reaction score
0
Awesome Tony! Works great.

Selectable celebrity voices next?

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

This module is really cool.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
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
 

mark-hc

Member
Joined
Dec 12, 2008
Messages
110
Reaction score
0
Tony,How do i properly uninstall the old module?

It is still listed under modules after I removed it.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Get Aahp You Idiot!!!

Awesome Tony! Works great.

Selectable celebrity voices next?

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

This module is really cool.

:smilielol5: "GET AAHP YOU IDIOT!!!"

Actually - it would be possible to do that. The script sure supports it with a little change here and there.

So - you do a wicked Arnold impersonation in print - Wanna start simulating? Heheheh.

Thanks for the kinds words. I'm really glad folks are finding it useful.

Tony
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Tony,How do i properly uninstall the old module?

It is still listed under modules after I removed it.

Hmm - good question.

The Module is designed to Replace and Update Itself from the beta version I release a little while ago. Your the first person for whom it hasn't done that.

If your upgrading the previous beta module, you shouldn't have to remove it. When you upgrade to version 1.01 of the module (or whatever is current when you do this) FreePBX modules page should recognize an upgrade in progress as soon as you upload it.

If you "uninstall" a module, freePBX removes if from the features page, but does not remove the install files, nor the listing from the Modules page.

Get back to me with a little more info - I'll try and be more helpful.

tshif
 

mark-hc

Member
Joined
Dec 12, 2008
Messages
110
Reaction score
0
Well, I didn't realize it would upgrade from the old one. I uploaded the new module and upgraded it. everything is working great! Thanks!
 

titodj

Member
Joined
Oct 22, 2007
Messages
120
Reaction score
7
Will this Module co-exist with the Reminders system?

Thanks...
 

normdancy

New Member
Joined
Feb 4, 2009
Messages
10
Reaction score
0
Thank you. I installed it and it works. I appreciate your efforts.
 

titodj

Member
Joined
Oct 22, 2007
Messages
120
Reaction score
7
Thanks... (working perfect)
One question, once the WUCall has been scheduled, is there a way to cancel it?
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Call back from the same number (or using the same number in operator mode), the system will ask if you wish to cancel the call.
 

vcallaway

Guru
Joined
May 6, 2008
Messages
170
Reaction score
2
Probably should mention that you need to edit wake.inc for the mysql password. Could not figure out why I could not enter a phone number for a wake up call.

I of course went DUH! it uses mysql!
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Mark;
Well I sorta did mention it, in a roundabout sort of way:
* 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).

But since I didn't mention exactly how - congrats on finding the place to edit it. Did you edit the files in the module subdir or the files it places in agi-bin?
-tshif


 

Members online

Forum statistics

Threads
25,809
Messages
167,750
Members
19,239
Latest member
cajeptha
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top