[Home]

Summary:ASTERISK-13232: Asterisk stops processing the dialplan after a While() in h extension
Reporter:fede (fede)Labels:
Date Opened:2008-12-16 15:07:04.000-0600Date Closed:2011-06-07 14:03:00
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_while
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When my server tries to execute some commands after a hangup() of a channel it stops processing the dialplan when it runs on a While(), present after few other commands, and exits with a "Spawn extension (...) exited non-zero on (...)". Other commands are executed correctly.
See the log and the dialplan extract for more precise informations. Thanks

****** ADDITIONAL INFORMATION ******

Log:

   -- Executing [2091@local:1] Answer("SIP/1000-0825f758", "") in new stack
   -- Executing [2091@local:2] GotoIf("SIP/1000-0825f758", "0?:lbl_local_1") in new stack
   -- Goto (local,2091,4)
   -- Executing [2091@local:4] Dial("SIP/1000-0825f758", "SIP/1000&SIP/1001&SIP/1002&SIP/1003&SIP/1005,18,gm()t") in new stack
 == Using SIP RTP CoS mark 5
   -- Called 1000
 == Using SIP RTP CoS mark 5
   -- Called 1001
 == Using SIP RTP CoS mark 5
   -- Called 1002
 == Using SIP RTP CoS mark 5
   -- Called 1003
 == Using SIP RTP CoS mark 5
[Dec 16 23:01:33] WARNING[2419]: app_dial.c:1450 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown)
   -- Started music on hold, class 'default', on SIP/1000-0825f758
   -- SIP/1002-08261750 is ringing
   -- SIP/1003-08265738 is ringing
   -- SIP/1000-082167e8 is ringing
   -- SIP/1001-08272140 is ringing
   -- Stopped music on hold on SIP/1000-0825f758
 == Spawn extension (local, 2091, 4) exited non-zero on 'SIP/1000-0825f758'
   -- Executing [h@local:1] Set("SIP/1000-0825f758", "TOBUFFER=16/12/2008-23:01:40           >IN<          ") in new stack
   -- Executing [h@local:2] While("SIP/1000-0825f758", "1") in new stack
 == Spawn extension (local, h, 2) exited non-zero on 'SIP/1000-0825f758'


Dialplan extract:

[local]

exten => 2091,1,Answer()

exten => 2091,n,GotoIf($["${CALLERID(num)}" = "pstn"]?:lbl_local_1)
exten => 2091,n,Macro(print-in,${CALLERID(num)},${DIALSTATUS},${CDR(duration)})


exten => 2091,n(lbl_local_1),Dial(SIP/1000&SIP/1001&SIP/1002&SIP/1003&SIP/1005,18,gm()t)
exten => 2091,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?lbl_local_2:)
exten => 2091,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?lbl_local_2:)
exten => 2091,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?lbl_local_2:)
exten => 2091,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?lbl_local_2:)
exten => 2091,n,GotoIf($["${DIALSTATUS}" = "CANCEL"]?lbl_local_2:)
exten => 2091,n,Hangup()


exten => 2091,n(lbl_local_2),Set(TIMEOUT(response)=10)
exten => 2091,n,Set(TIMEOUT(digit)=5)
exten => 2091,n,Background(/var/lib/asterisk/sounds/pers/opzione_segreteria,,,scelta)
exten => 2091,n,WaitExten(5,m())
exten => 2091,n,Dial(SIP/1004,7,rg)
exten => 2091,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?lbl_local_3:)
exten => 2091,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?lbl_local_3:)
exten => 2091,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?lbl_local_3:)
exten => 2091,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?lbl_local_3:)
exten => 2091,n,GotoIf($["${DIALSTATUS}" = "CANCEL"]?lbl_local_3:)
;exten => 2091,n,Macro(print-in,${CALLERID(num)},${DIALSTATUS},${CDR(duration)})
exten => 2091,n,Hangup()




exten => h,1,Set(TOBUFFER=${STRFTIME(${EPOCH},,%d/%m/%Y-%H:%M:%S)}           >IN<          ${ARG1})
exten => h,n,While($[${LEN(${TOBUFFER})}<60])
exten => h,n,Set(TOBUFFER=${TOBUFFER} )
exten => h,n,EndWhile()
exten => h,n,NoOp(${LEN(${TOBUFFER})})
exten => h,n,TrySystem(echo -ne "${TOBUFFER}sec:${ARG3} ${ARG2}\n" > /dev/lp0)
Comments:By: Tilghman Lesher (tilghman) 2008-12-16 15:41:42.000-0600

This is already fixed in the latest RC of 1.6.0.  Please try the latest release candidate before reporting problems.