[Asterisk-Dev] Buggy stuff with AGI
Moises Silva
moises.silva at gmail.com
Sat Apr 16 09:02:48 MST 2005
Hi everybody. I decided to put this message in the dev list, since i
guess most users wont have a clue of the internal functioning of AGI.
So i guess here may be you can figure out what is happening.
I have installed Asterisk 1.0.7, and i use AGI to route the calls to
its destiny. Everything seems work fine, but exists a little detail
that is annoying and buggy. When i restart my GNU/Linux Server, the
first call that i try to do never receive the agi_channel variable
correctly, always join 2 or 3 variables (agi_request, agi_channel and
some times agi_language). After that first call, all the other calls
go perfect. I have this code to catch the vars:
private function LoadEnvironmentVariables()
{
do
{
$string = $this->ReadStdin();
$colon_start = strpos($string, ':');
$variable_name = substr($string, 0, $colon_start);
$variable_name = trim($variable_name);
$variable_value = substr($string, $colon_start + 1);
$variable_value = trim($variable_value);
$this->environment_variables[$variable_name] = $variable_value;
} while ( $string != "\n" );
$this->BugFix(); //fixing a bug that i get with asterisk 1.0.7
return true;
}
The method BugFix is just a workaround solution that i did to separate
the joined variables and get the first call working.
Hopefully somebody can point me in the right direction, because im
lost here, i google around for a while without find something related.
Thanks in advance.
-- Moy
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
More information about the asterisk-dev
mailing list