Callback Reference documentation

From voipsupport
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

CALLBACK_PREFIX

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.

CALLBACK CLI

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

CALLBACK_WAIT

The time to wait before starting the callback

CALLBACK_RETRY

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

CALLBACK_INTERVAL

The time in seconds to wait between retries

CALLBACK_ARCHIVE

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

CALLBACK_METHOD

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.

CALLBACK_ALLOWED

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