Un-top-posting...

> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tilghman 
> Lesher

> What is clearly wrong with your script is that you're failing to 
> retrieve all of the setup information that is sent when the script first 
> starts up.  Each "response" that you're getting is actually setup 
> information, and you exit early, which is why the final response is not 
> able to be sent.

On Thu, 22 Oct 2009, Danny Nicholas wrote:

> If it was clear, I wouldn't be writing;  You are suggesting something like
> this?
>> sub setvar {
>>    my ($var, $val) = @_;
>>    print STDOUT "SET VARIABLE $var \"$val\" \r\n";
>>    my $rv=<STDIN>;
>>    while(<STDIN>) {
>>       m/200 result=0/ && last;
>>       }
>>    return;
>>    }

Your previous script violates the AGI protocol because it does not read 
the AGI environment before issuing an AGI request.

So, when you issue a request and read a response, you are reading a piece 
of the AGI environment, not the response to your request.

Then, when you exit, you haven't read all of the AGI environment or the 
responses to your requests so, you get a "reprimand."

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwa...@sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to