Umm thank you...apparently AMI::Asterisk sucks because that code did
everything i needed in one try. thanks again!

On Mon, May 16, 2011 at 3:58 PM, Alex Balashov <abalas...@evaristesys.com>wrote:

> On 05/16/2011 03:48 PM, vip killa wrote:
>
>  yes, it's originating the call and never responding.
>>
>
> This sounds to me like a possible problem with the Asterisk::AMI module,
> although I am unsure what the problem is, since I am not familiar with its
> internal architecture and have never used it.
>
> To debug, try initiating the AMI connection and issuing the Originate
> statement raw:
>
>   use IO::Socket;
>
>   ...
>
>   my $mgr_sock = IO::Socket::INET->new(
>                     'PeerAddr' => '127.0.0.1',
>                     'PeerPort' => 5038,
>                     'Type' => SOCK_STREAM,
>                     'Protocol' => 'TCP',
>                     'Timeout' => 5);
>
>   print $mgr_sock
>     "Action: login\r\n" .
>     "Username: XXXXXXXXXX\r\n" .
>     "Secret: XXXXXXXXXX\r\n" .
>     "\r\n";
>
>   sleep(1);
>
>   ...
>
>   print $mgr_sock
>     "Action: Originate\r\n" .
>     "Channel: Local/$row[2]\@outbound\r\n" .
>     "Context: page\r\n" .
>     "CallerID: $row[1]\r\n" .
>     "Exten: $row[1]\r\n" .
>     "Priority: 1\r\n" .
>     "Async: 1\r\n" .
>     "\r\n";
>
>   while(defined($mgr_sock) && $_ = <$mgr_sock>) {
>           print;
>   }
>
>   sleep(1);
>
>   close $mgr_sock;
>
>
> --
> Alex Balashov - Principal
> Evariste Systems LLC
> 260 Peachtree Street NW
> Suite 2200
> Atlanta, GA 30303
> Tel: +1-678-954-0670
> Fax: +1-404-961-1892
> Web: http://www.evaristesys.com/
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>              http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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

Reply via email to