[asterisk-bugs] Asterisk error on hangup during dial in FastAGI application

Ludovic Boué lboue at afone.com
Mon Dec 1 08:38:22 CST 2014


Hello, 


I get an Asterisk 'Broken pipe' error on hangup during dial in FastAGI application. Can you explain to me what is happening and how to fix it ? I also reproduces this behavior when I hangup during dial with fastagi-test script. 


What steps will reproduce the problem? 
1. Execute a Dial in script handler 
2. Hangup the call 
3. Asterisk throws an error. 


What is the expected output? What do you see instead? 
Don´t throw an error 


<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << ANSWER 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=0 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << NOOP 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=0 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << STREAM FILE /home/partageasterisk/voice/interne/duodev/Demande_Code "0123456789#*" 
-- Playing '/home/partageasterisk/voice/interne/duodev/Demande_Code' (escape_digits=0123456789#*) (sample_offset 0) 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=0 endpos=14432 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << NOOP 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=0 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << WAIT FOR DIGIT 5000 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=54 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << NOOP 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=0 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << WAIT FOR DIGIT 5000 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=54 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << NOOP 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=0 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << WAIT FOR DIGIT 5000 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=54 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << NOOP 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=0 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << WAIT FOR DIGIT 5000 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=-1 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> HANGUP 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Rx << NOOP 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> 200 result=0 
-- <SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Script agi://10.0.23.144 completed, returning 4 
<SIP/STD1-BCT1-VIP-MGC-0000000e>AGI Tx >> HANGUP 
[Dec 1 14:56:12] ERROR[22991][C-0000000e]: utils.c:1250 ast_carefulwrite: write() returned error: Broken pipe 
== Spawn extension (public, 0170131189, 2) exited non-zero on 'SIP/STD1-BCT1-VIP-MGC-0000000e' 


Here is what I can see from my Python FastAGI application 
14:56:12:DEBUG:0272735462:{'code': '200', 'result': '-1'} 
14:56:12:DEBUG:0272735462:NOOP 
14:56:12:DEBUG:0272735462:HANGUP 


14:56:12:DEBUG:0272735462:HANGUP 
14:56:12:INFO:0272735462:HANGUP dispatcher 
14:56:12:DEBUG:0272735462:HANGUP duocode 




What version of the product are you using? On what operating system? 
CentOS 5.8 
Asterisk 13.0 
Python 2.7.3 


Regards, 


Ludovic BOUÉ 
lboue at afone.com 




Ludovic BOUÉ 
Ingénieur Réseaux & Télécoms 
Pôle Ingénierie 
Tél. 02 72 73 54 62 
lboue at afone.com 




AFONE - 11, place François Mitterrand - CS 11024 - 49055 ANGERS cedex 02 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-bugs/attachments/20141201/b4adc002/attachment.html>


More information about the asterisk-bugs mailing list