Page 1 of 1

found reason for "write() returned error: Broken pipe"

PostPosted: Fri Aug 10, 2012 9:35 am
by marmu
Hi Guys,

this is one of the errors I asked about a while ago. You told me I can ignore that. Now we found the reason for this error message. To sum it up:
You have to read the STDIN everytime after you send a command to asterisk via AGI. For example in /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi. This is "a diff" between our current version and the old one:
Code: Select all
diff /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi.2012.08.10 /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
293a294
>       $result = <STDIN>;
304a306
>       $result = <STDIN>;
1075c1077,1078
<                               checkresult($result);
---
>                       $result = <STDIN>;
>                       checkresult($result);
1077c1080,1081
<                               checkresult($result);
---
>                       $result = <STDIN>;
>                       checkresult($result);
1079c1083,1084
<                               checkresult($result);
---
>                       $result = <STDIN>;
>                       checkresult($result);
1158c1163,1164
<                               checkresult($result);
---
>                       $result = <STDIN>;
>                       checkresult($result);
1160c1166,1167
<                               checkresult($result);
---
>                       $result = <STDIN>;
>                       checkresult($result);
1162c1169,1170
<                               checkresult($result);


If you want to get rid of this, now you know how :)

Now I am again looking at the error "unexpected control subclass '-1'. I will create a new topic for that. All the best!

Cheers,
Marcus

Re: found reason for "write() returned error: Broken pipe"

PostPosted: Sat Aug 11, 2012 12:29 pm
by williamconley
Wow. Cool. Post that in the Vicidial Issue Tracker for Matt! (and specify the version / build it is a diff against)

Re: found reason for "write() returned error: Broken pipe"

PostPosted: Mon Aug 13, 2012 7:23 am
by mcargile
Yep. Already caught that and have it worked into the asterisk 1.8 patches. Just waiting on Matt to get to a point he can assist me with getting the agent interface side of things worked out and plenty of testing done. Should fix it for 1.4 as well.