freePBX-Callback
Created by: ibsjdcoy,Last modification on 29 Aug 2006 [16:40 UTC]by MuppetMaster
Call back
This downloadable FreePBX plug-in allows you to setup a callback destination that calls a user back and provides access to an application. An example of this would be a caller that dials your system, disconnects, is called back and then provided a DISA application to make a phone call.
Issues
Some issues have been encountered with this plugin:
1. Callbacks frequently fail, as it appears Asterisk disconnects before the associated callback PHP script (located in /var/lib/asterisk/bin) may complete the callback transaction.
2. If one uses the 'CLI' callback capability, then you may encounter issues with being able to actually dial people back. The reason for this is that the telco only provides a 10-digit CLI, and if your provider requires you to add a '1' there is no way to do this without hacking the plug-in. Further, if your own dialplan requires an access code like '9' you also encounter this problem.
3. There is no way to provide a number of retries, retry time or wait times for an answer. This app will try once, and if it fails, will not try again.
Alternative Solution
A replacement script, written in Ruby, has been created to replace the /var/lib/asterisk/bin/callback PHP script provided with the callback plugin. The Ruby script takes a different approach to providing the callback capability, while still supported the HTML form provided with the plug-in with FreePBX. The enhancements are:
- Provides the ability to set the access code to prepend to the recognized CLI number for a callback
- Uses call files instead of the Manager API
- Allows one to set the number of retries, the retry wait time and the wait time for a caller to pickup an attempt
To use the script below do the following:
(Note: This script requires that Ruby 1.8.x be installed on your Asterisk/FreePBX system)
1. Move /var/lib/asterisk/bin/callback to /var/lib/asterisk/bin/callback.original (to back it up)
2. Download the attached script and copy to /var/lib/asterisk/bin/callback and then do a 'chmod +x /var/lib/asterisk/bin/callback'
3. Add these options to the end of your configuration file at /etc/amportal.conf:
CALLBACK_PREFIX=91
CALLBACK_CLI=Callback
CALLBACK_RETRY=1
CALLBACK_INTERVAL=10
CALLBACK_WAIT=30
The script may be downloaded here:
http://www.aussievoip.com.au/storage/users/279/279/images/177/callback.rb