[asterisk-users] utils.c: fwrite() returned error: Broken pipe how to solve it ???

akhilesh chand omakhileshchand at gmail.com
Thu Oct 10 04:59:58 CDT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20131010/4bfb7dc1/attachment.html>


More information about the asterisk-users mailing list