|Summary:||ASTERISK-02297: no EOF after AGI answer to command: "channel status"|
|Date Opened:||2004-08-30 17:26:35||Date Closed:||2011-06-07 14:10:15|
I am currently writing a PHP-script
There I found out that there must be a problem
with the command "channel status". The command
itself is okay, but the answer of asterisk to this command
does not deliver a further "\n" (if probably not displayed correctly:
in the quotes is a backslash followed by an n). But this is just
a small problem.
I don't know if it is standard to send a further BACKSLASH-N
but some answers of AGI-commands do and some not.
More problematic is this:
Having sent the command "channel status", asterisks also does not
deliver a proper EOF when all information is already delivered to AGI
which (the EOF) is -on the other hand- delivered correctly by other
commands such as "hangup" or "stream file".
I get: "200 result=6" followed by one BACKSLASH-N but then there comes no
EOF as with other answers to commands.
I use CVS-24082004.
|Comments:||By: Mark Spencer (markster) 2004-08-30 20:01:30|
Are you perhaps confusing the behavior of AGI with that of the manager interface? Asterisk does not send EOF on an AGI, or even additional \n's...
By: silke (silke) 2004-08-31 03:21:40
I call an AGI-Script on an incoming call in
This AGI-Script is currently only for developing
PHP-Core-Functions like hangup(), channel_status()
For comunication with asterisk AGI I use STDIN / STDOUT.
Controlling of incoming data is done by doing "selects" /
feof() on the STDIN.
The "read from STDIN" function is the same for all of the
Doing a "STREAM FILE $name \"\"\n" returns me from STDIN:
200 result=X endpos=y\n
EOF EOF EOF ...
Doing a "HANGUP\n" returns me from STDIN:
EOF EOF EOF ...
Doing a "CHANNEL STATUS\n" returns me from STDIN:
[NO FURTHER \n]
So there's maybe somewhere an inconsistency.
I use CVS-24082004 and PHP 4.3.7 in CLI mode.
By: Mark Spencer (markster) 2004-09-04 11:16:50
There are no EOF's in the stream. As far as I can tell everything is the same in terms of how many \n's are being produced in each case, just looking at the code.
By: Mark Spencer (markster) 2004-09-29 10:58:45
To the best of my knowledge this is not a bug, and I cannot duplicate the problem being described.