The Callback module allows you to setup a destination that calls a user back and provides them access to an application. An example of this would be a caller that dials your system, disconnects, and is called back and then provided a DISA
dial-tone to make a phone call.
Add Callback
- Callback Description: This is the name/description of the callback
- Callback Number: This is the number to be called
- Delay Before Callback: Optionally, you can enter an amount of time that the system should wait before placing the call
Known Issues
Some issues have been encountered with this plugin:
- 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. - 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. - 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
- Printer-friendly version
- Login or register to post comments



It is not working properly
It is not working properly in my Asterisk free PBX. Can anyone guide me ???
Where is the attached script?
I am wondering where is the attached script?
"2. Download the attached script and copy to
/var/lib/asterisk/bin/callback and then do a"
The script has been moved and now available at GitHub
http://github.com/jsgoecke/freepbx_callback/wikis/home
One thing, it now uses the Asterisk CLI as opposed to call files. Otherwise it works the same.
Doesn't work. I have added
Doesn't work. I have added the new callback and added what was asked into amportal.conf but it never triggers a call. Maybe once the Ruby script is set, the system should not use the Callback module. Anyhow, this is a piss off with no documentation....
very beginner question
i am trying to customize callback
i need to enter something into
[callback-custom]
exten => 1,1,Noop(callback-custom - test.)
exten => 1,n,Noop(callback-custom - starting)
...
i would know what should i use insted of 1 as extension
[callback-custom]
exten => x,1,Noop(callback-custom - test.)
exten => x,n,Noop(callback-custom - starting)
what should i put replacing 'x' ?
maumar, while you are on
maumar, while you are on topic as it's about callback. Please don't post questions in the documentation section unless it is to clarify the documentation or to add a correction or addition as the only time they get looked at is when somebody goes in to read it.
The proper place to ask this is in the forums section where many people look.
Thanks.
sorry
sorry
Drop in replacement for callback script (php)
I've made some updates to the freepbx callback php script so that it uses asterisk call files. I also added the variables that are used in the ruby script above.
the script is at:
http://www.gufonero.com/asterisk/callback.html
John, The asterisk 1.6.x
John,
The asterisk 1.6.x branch has changed several things from previous versions. So since you are using asterisk 1.6 (not noted in your posting above here, but stated on your website link) the code you provided and logged in the bug tracker will address the change for 1.6 but in quickly reviewing the code does not seem to have the proper logic to detect previous asterisk versions and handle those older format issues.
So those looking to use this please note: for versions previous to 1.6.0.6 you might find that it does not work.
John, Thanks for generating the code for asterisk 1.6 that does work I'm sure it will get addressed shortly due to your code submission.
Change in asterisk 1.6
Hi, if there is a list of changes to the call file syntax I'll take a look at making the solution backwards compatible.
Your note about changes in 1.6 spurred me to look at the manager changes. I think the reason for the original freepbx script not working is related to the need for "originate" privilege in manager.conf.
John
"""I've made some updates to
hey john.fawcett,
the link is not working??
http://www.gufonero.com/asterisk/callback.html"""
link is not working
Looks ok from here now.
Thanks john.. How do I
Thanks john..
How do I install this to my Trixbox, I already installed ruby1.8 but I read the link and it's not really clear in the installation is sais:
Download
callback-0.1.tgz
GPG signature for callback-0.1.tgz
John Fawcett public key
Installation
* cd /tmp (or some other directory)
* download the files
*
* (optionally) verify the files, for example: gpg --verify callback-0.1.tgz.sig
* tar -xvzf callback-0.1.tgz
* cd callback.0.1
* cp callback /srv/www/htdocs/admin/modules/callback/bin/callback (or wherever it is on your system)
* chown asterisk:asterisk /srv/www/htdocs/admin/modules/callback/bin/callback
* chmod 770 /srv/www/htdocs/admin/modules/callback/bin/callback
* add the variables indicated above to /etc/amportal.conf
Re: How do I
to use the php script you need to copy it over the existing freepbx callback script. That should be wherever you're freepbx is installed in the subdirectory modules/callback/bin. After copying it over the existing script you should check that it has the right file permissions and owner/group to be executed by freepbx.
Also add the variables that are mentioned at the link to /etc/amportal.conf if you want to modify defaults.
John
PS: you mentioned ruby. The script doesn't use ruby, but there is another one that is written in ruby (see earlier in the thread - not sure if you were looking for that script instead of the php one I posted about).
My problem is I'm running my
My problem is I'm running my Pbx on trixbox and there isn't a subdirectory modules/callback/bin to change all theses files??
how do you change these files using trixbox?
Restrict callback to certain numbers
Hi guys. I have installed the PHP callback, callback-0.1.tgz, as per above. Its working fine.
Does anyone know how to restrict the callback so that it only calls back numbers which are in a predefined list? We want to use this so our employees can use this but only their mobile numbers should be allowed to get a call back.
Is there a way to set this up so that all inbound calls go to the callback but only those in the list above get hungup and called back, the rest of the calls should just proceed to a normal inbound call pattern without being effected.
Thanks
Restrict callback to certain numbers
I'm not aware of any way to do what you're asking in freepbx. It would however be a useful feature, can you input it as a feature request?
If this would be implemented in freepbx, I think it would be good to be able to specify a list of phone numbers directly in the GUI. There is currently a field where a single number can be input, but it does not work exactly as you're requesting, that number is called back regardless of the incoming CLI.
Additionally, I believe it would be useful not to have to maintain a manual list, but to be able do do a database lookup (like callerid lookup sources) along the lines of: select calleridname from calleridlookup where calleridnum like '%[NUMBER]' and allow_callback='y' and length('[NUMBER]') > 4
By the way it, as a workaround it would be reasonably easy to hack the script to do the check on the number that freepbx passes it, though that would not be as neat as being able to specify from the GUI. It wouldn't be possible to do the second part (i.e. an alternative destination for numbers not matching).
Restrict callback to certain numbers
I've posted a new version of the script (0.2) that will allow a workaround for restricting callback to certain numbers.
http://www.gufonero.com/asterisk/callback.html
Restrict callback to certain numbers
Hi John,
I have tested the new script and the CALLBACK_ALLOWED= is working perfectly.
Do I still need to add this as a feature request for FreePBX or will your work here get included in the FreePBX callback module?
Thanks for your help
anything in here has a
anything in here has a half-life of probably a few days.
If you have a new request, please submit a feature request ticket providing all details and any patches that may have been developed. Those are looked at when we are working on releases.
If you look back over the last couple of weeks, you will find dozens of inclusions that have been sitting in tickets, which means, if it doesn't see any action right away it does not mean it is getting ignored, things come in cycles.
anything in here has a
I've added a couple of feature requests to the tracker:
- limiting callback to a defined list of numbers or numbers read from an external source
- dialing out with a prefix (e.g. to select a trunk)
Those seem to be the most useful things in the replacement callback script. If anyone has other things they would like to see adopted, then as per the post above the tracker is the place to put them.
The replacement callback script I have is quite frankly a hack, since it reads these things from amportal.conf whereas they should be defined at GUI. To do it properly in freepbx would need some insight and discussion and I don't believe the script should be appied directly as a patch in the freepbx core.
Still not resolved?
Hi,
I used callback a while back quite often. After a reinstall I did not need it anymore up untill now just to find out it is not working anymore (for me).
Do I really need a workaround to get this quite old feature of freepbx to work?
Just checking if I overlooked something obvious...
it works fine but make sure
it works fine but make sure your manager.conf connection has been updated to have all the proper permissions, the key being the originate permission:
if it is an old system that has been upgraded over time, originate was added as a requirement into Asterisk at one point which is what the callback script needs since it uses the manager to kick off the call.
manager.conf has all
manager.conf has all mentioned permissions.
I will direct my problems to the forum, this doesnt seem to be the right place.
Please help me solve this problem here: http://www.freepbx.org/forum/freepbx/users/callback-not-triggering-callb...