Callback Reference documentation

From voipsupport
Revision as of 14:50, 13 June 2016 by John (talk | contribs)
Jump to navigation Jump to search

Configuration file

These configurations may be added to /etc/freepbx.conf. They should be written in exactly the same syntax, changing only the values on the right hand side.

$amp_conf['CALLBACK_PREFIX'] = '';
$amp_conf['CALLBACK_CLI'] = 'Callback';
$amp_conf['CALLBACK_WAIT'] = 30; 
$amp_conf['CALLBACK_RETRY'] = 2;
$amp_conf['CALLBACK_INTERVAL'] = 15;
$amp_conf['CALLBACK_ARCHIVE'] = 'No';
$amp_conf['CALLBACK_METHOD'] = 'api';
$amp_conf['CALLBACK_ALLOWED'] = '';

Configuration Reference


Specify a prefix to be used before the number to be called back. This can be used to direct the call through a specific trunk that uses a prefix in the dial plan to select it.


The callerid used for making the Callback. This can be specified in the form of Name <Number>


The time to wait before starting the callback


The number of times to try the callback before giving up.


The time in seconds to wait between retries


Whether to archive the call files in the Asterisk call file archive directory. This can be Yes or No. This has no effect if the CALLBACK_METHOD is set to api


If set to "api" will use the Asterisk Manager interface to make the call. This requires the Originate permission for the user connecting the AMI. If is not set to "api" then the file based callback method is used. By convention, the setting should be "file" in this case.


A comma separated list of callerid from which to accept the callback. If this list is not empty then the callback will not succeed unless the incoming callerid is within this list. Anonymous callerids are not accepted if CALLBACK_ALLOWED is non empty.

Instead of a list, the value may be set to a database url in this format:

mysql://username:[email protected]/database?query

Example query

mysql://username:[email protected]/database?select calleridnum from calleridlookup where calleridnum like concat('%',TRIM(LEADING '0' FROM '[NUMBER]')) and length('[NUMBER]') > 4