[asterisk-users] broken pipe in perl agi

Danny Nicholas danny at debsinc.com
Thu Jun 4 13:24:47 CDT 2009


Hi gang, 

             Since I'm getting no joy from device_Status or SIPPEER in
1.4.26-rc1, I thought I would do an AGI to read my hints and check for line
in use that way.  The AGI works fine from a prompt, but returns the dreaded
"utils.c:966 ast_carefulwrite: write() returned error: Broken pipe" when I
try to run it from the dialplan.  Here is my dialplan snippet;

 

[macro-stdexten]

exten => s,1,Set(__DYNAMIC_FEATURES=${FEATURES})

exten => s,n,GotoIf($[${FOLLOWME_${ARG1}} = 1]?5:3)

exten => s,n,Noop(dial $ARG1 after checking sippeer)

exten => s,n,Set(LINESTAT=Idle)

exten => s,n,AGI(hintcheck.agi|${ARG1})

exten => s,n,Wait(3)

exten => s,n,Verbose(status is ${LINESTAT})

exten => s,n,Gotoif($["${LINESTAT}" != "Idle"]?inuse)

exten => s,n,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})

exten => s,n,Goto(s-${DIALSTATUS},1)

exten => s,n,Macro(stdexten-followme,${ARG1},${ARG2})

exten => s,n,Background(vm-goodbye)

exten => s,n,Hangup

exten => s,n(inuse),Voicemail(${ARG1})

exten => s,n,Followme(${ARG1},${FOLLOWMEOPTIONS})

exten => s,n,Voicemail(${ARG1},u)

exten => s-NOANSWER,1,Voicemail(${ARG1},u)

exten => s-NOANSWER,2,Goto(default,s,1)

exten => s-BUSY,1,Voicemail(${ARG1},b)

exten => s-BUSY,2,Goto(default,s,1)

exten => _s-.,1,Goto(s-NOANSWER,1)

exten => a,1,VoicemailMain(${ARG1})

 

Any ideas?  

 

TIA

 

Danny Nicholas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090604/ecb19432/attachment.htm 


More information about the asterisk-users mailing list