Dear all,

I want to make call through socket i have set code given below:

#!/usr/bin/perl -w

use IO::Socket::INET;


sub asterisk_command ()
        {
        #  my $command=$_[0];
        my
$ami=IO::Socket::INET->new(PeerAddr=>'127.0.0.1',PeerPort=>5038,Proto=>'tcp')
or die "failed to connect to AMI!";
        print $ami "Action: Login\r\nUsername: lite\r\nSecret:
4003\r\n\r\nAction: Logoff\r\n\r\n";
        }
&asterisk_command("Channel: DAHDI/27/7702009896\r\nExten: s\r\nContext:
outbound\r\nCallerID: 20048645\r\nPriority: 1\r\nMaxRetries: 2\r\n");

Whenever i execute that code i'm get following error

[Oct 10 15:13:23] ERROR[856]: utils.c:1175 ast_careful_fwrite: fwrite()
returned error: Broken pipe
[Oct 10 15:13:23] ERROR[856]: utils.c:1175 ast_careful_fwrite: fwrite()
returned error: Broken pipe
[Oct 10 15:13:23] ERROR[856]: utils.c:1175 ast_careful_fwrite: fwrite()
returned error: Broken pipe
[Oct 10 15:13:23] ERROR[856]: utils.c:1175 ast_careful_fwrite: fwrite()
returned error: Broken pipe


asterisk verison :-  1.6.2.7
CentOS release 5.3
kernel version :- 2.6.18-128.el5
-- 
_____________________________________________________________________
-- 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