write() returned error

Home » Asterisk Users » write() returned error
Asterisk Users 4 Comments

On Fri, 11 Mar 2011, satish patel wrote:

> We upgrade asterisk from 1.2.x to 1.8.2.3 and my one of agi script
> doesn’t working We have allpage.agi script for paging system on all
> polycom 501 but after upgrade it broke. Any idea what is this error ?

> [Mar 11 15:40:46] ERROR[3140]: utils.c:1130 ast_carefulwrite: write()
> returned error: Broken pipe

Without source code, I’d guess you are violation the AGI protocol.

What language are you using?

which AGI library are you using?

Can you reduce your source code to a simple application that reliably reproduces
the error.

Can you post the source to the simplified application?

4 thoughts on - write() returned error

  • Thanks for reply Steve,

    I am not in office so i can’t post script right now but will so once
    reach home.

    By the way that script working great in asterisk 1.2 my production
    machine. But now I’m testing on 1.8.x and having issue which I
    mentioned before.

    This script is perl script and it going to grab all active sip
    extension and using manager to call all poycom phone via Ring Anwer
    sipheader. If you want to take a look at script I have following URL
    where someone already doing discusion. My script is pretty similer but
    I am grabbing all active extension via asterisk CLI commands not
    statically hardcoded.

    http://www.freepbx.org/forum/freepbx/tips-and-tricks/delayed-paging

  • Un-top-posting…

    If you are referring to the allpage.agi script posted about 40% down the
    page…

    It is not an AGI. Note that it does not use any AGI library and that it
    does not read the AGI environment from STDIN — which violates the AGI
    protocol.

    The allpage script connects to Asterisk via TCP using the AMI protocol.

    In your dialplan, if you change ‘agi(allpage.agi)’ to
    ‘system(allpage.agi)’ does it behave as you expect?

    Can you execute the script from a shell command line?

  • AH!! Boy I didn’t notice that it’s not AGI.

    But In 1.2 it’s working with AGI apps.

    When i am running it on bash it excute successfully and ringing phone
    but no auto answer working.

    Let me try with system applications and I will let you know.

    Thanks for helping me with this.

  • Hey Steve,

    I got following error when i change AGI to System

    ubuntu-test*CLI>
    == Using SIP RTP CoS mark 5