Callback Issue


Not sure who’s issue this is, but we’ll begin by posting here. Using a freshly bumped to 2.6.0.beta2.0 upgrade the CALLBACK function has gone a stray.

[[email protected] bin]# ./callback

Checking for PEAR Console::Getopt…OK
Reading /etc/amportal.conf…OK
PHP Fatal error: Call to undefined function parse_asterisk_conf() in /var/www/html/admin/common/php-asmanager.php on line 33

This error prevents the CALLBACK operation from occurring. The inbound call to the “catching” part of CALLBACK in the dial plan works correctly. The outbound “pitching” part fails per above.

Fragment that follows is the top of the callback php script if it helps identify which script version i’m running.

[code]-----top of callback php-----
#!/usr/bin/php -q

<?php /* This Callback script takes 3 arguments: 1- number to dial 2- context.exten.priority to dump number into 3- time in seconds to sleep before calling back eg: callback 14032448089 ext-meetme.200.1 */ //Copyright (C) 2004 Coalescent Systems Inc. ([email protected]) //This file is part of FreePBX. // // FreePBX is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // FreePBX is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with FreePBX. If not, see . ?> <?php define("AMP_CONF", "/etc/amportal.conf"); //sleep(10); /**************************************************************/ // from ben-php dot net at efros dot com at if (version_compare(phpversion(),'4.3.0','<') || !defined("STDIN")) { define('STDIN',fopen("php://stdin","r")); define('STDOUT',fopen("php://stdout","r")); define('STDERR',fopen("php://stderr","r")); register_shutdown_function( create_function( '' , 'fclose(STDIN); fclose(STDOUT); fclose(STDERR); return true;' ) ); } -----[/code] Please let me know if I need to include other info, fragments, or files. /S

#3838 check the ticket in the next 10 minutes, should be fixed by then

Early quick testing of core CALLBACK functionality appears to be remedied over :slight_smile:

Parenthetically, CID behavior is a bit off, but that’s most likely the result of my earlier stripped down debugging attempts. Will put it all back to normal running state and test further.

But so far, most excellent!

Thanks very much.


Updated callback to and still get a failure.

Here is the error:
Checking for PEAR Console::Getopt…OK
Reading /etc/amportal.conf…OK
PHP Fatal error: Call to undefined function parse_asterisk_conf() in /var/www/html/admin/common/php-asmanager.php on line 33

Found the problem. I was not using the default script.

Restored the correct script and the callback worked.

One problem, which is why I changed the script in the first place is that it will cause asterisk to core dump if you use it with chan_mobile.
Do not know if it is worth logging a ticket?

it sounds like it is more likely a chan_mobile issue.

If you can provide data in the forum showing what the errors are or other information it would be a better start. If you know what the changes were elsewhere to keep chan_mobile happy that would also be of value but without any information of the sort it will probably be closed since I don’t know any developers who could reproduce it and have a look.

The problem with the default script is that is does not use the callback file and it seems that the cli option used by the default script is what causes the issue.

The script I was using uses the callback file method and works 100%

Cannot give an explanation as to why one method will work better then the other.

without log traces and other diagnostics the information is not going to help anyone see what is going on if there is an issue that can be addressed.