Artem Stepanoff
2005-May-17 06:00 UTC
[Asterisk-Users] Problem with getting the value of variable DIALSTATUS in AGI script
Hello. ???? ????????? ?????? ?? ?????, ??????? ??????, ??? ????????, ?????? ?? ???????????? ?????, ? ????? ???????? +?????????? ? ??????? ??????. I wrote a small perl script, that just calls to the specified number and then receives the information about +the status of the call. This script is below: #!/usr/bin/perl use Asterisk::AGI; $AGI = new Asterisk::AGI; my %input = $AGI->ReadParse(); open (TEST,">>/home/kesha/ast_test"); $AGI->exec("DIAL OH323/232313124\@ip.address.of.the.gateway"); $status=$AGI->get_variable("DIALSTATUS"); print TEST $status; close (TEST); When I call to the specified upper number, I am successfully connecting with the subscriber and have a conversation with him. When the person, who is talking to me, hangs up a receiver the value of $status variable is ANSWER, but when I do this - I receive $status='noresponse'. -- -------------------------------------------------------------- Artem Stepanoff | System Administrator | KESH-RIPE ISP "National Bureau of Information" | KESH-UANIC --------------------------------------------------------------