;POSSIBLE BUG IN PARSING
;THIS NESTED WHILE NEVER TERMINATES. AFTER I JUMP OUT WHEN THE RANDOM STRIKES IT NEVER GETS
;BACK TO THE NOOP THAT ASKS "WHY ARENT WE GETTING HERE)
[test]
exten => s,1,set(__COUNT=1)
exten => s,n,set(__ROWS=2)
exten => s,n,set(__MATEWEIGHT1=33)
exten => s,n,set(__MATEWEIGHT2=33)
exten => s,n,while($[${COUNT} <= ${ROWS}])
exten => s,n,set(__TRIES=1)
exten => s,n,noop(${TRIES} should be reset. WHY ARENT WE GETTING HERE}
exten => s,n,while(1)
exten => s,n,random(${MATEWEIGHT${COUNT}}:s,finalscore)
exten => s,n,noop(${MATEWEIGHT${COUNT}} is the probability
exten => s,n,set(__TRIES=$[${TRIES} + 1])
exten => s,n,wait(1)
exten => s,n,endwhile
exten => s,n(finalscore),set(__MATEWEIGHT${COUNT}=${TRIES})
exten => s,n,set(__COUNT=$[${COUNT}+1])
exten => s,n,endwhile
== Parsing '/etc/asterisk/sip_notify.conf': Found
-- Executing Goto("SIP/Brian-3d55", "test|s|1") in new stack
-- Goto (test,s,1)
-- Executing Set("SIP/Brian-3d55", "__COUNT=1") in new stack
-- Executing Set("SIP/Brian-3d55", "__ROWS=2") in new stack
-- Executing Set("SIP/Brian-3d55", "__MATEWEIGHT1=33") in new stack
-- Executing Set("SIP/Brian-3d55", "__MATEWEIGHT2=33") in new stack
-- Executing While("SIP/Brian-3d55", "1") in new stack
-- Executing Set("SIP/Brian-3d55", "__TRIES=1") in new stack
-- Executing NoOp("SIP/Brian-3d55", "1 should be reset. WHY ARENT WE GETTING HERE}") in new stack
-- Executing While("SIP/Brian-3d55", "1") in new stack
-- Executing Random("SIP/Brian-3d55", "33:s|finalscore") in new stack
-- Executing NoOp("SIP/Brian-3d55", "33 is the probability") in new stack
-- Executing Set("SIP/Brian-3d55", "__TRIES=2") in new stack
-- Executing Wait("SIP/Brian-3d55", "1") in new stack
-- Executing EndWhile("SIP/Brian-3d55", "") in new stack
-- Executing While("SIP/Brian-3d55", "1") in new stack
-- Executing Random("SIP/Brian-3d55", "33:s|finalscore") in new stack
-- Executing NoOp("SIP/Brian-3d55", "33 is the probability") in new stack
-- Executing Set("SIP/Brian-3d55", "__TRIES=3") in new stack
-- Executing Wait("SIP/Brian-3d55", "1") in new stack
-- Executing EndWhile("SIP/Brian-3d55", "") in new stack
-- Executing While("SIP/Brian-3d55", "1") in new stack
-- Executing Random("SIP/Brian-3d55", "33:s|finalscore") in new stack
-- Random branches to (test,s,14)
-- Executing Set("SIP/Brian-3d55", "__MATEWEIGHT1=3") in new stack
-- Executing Set("SIP/Brian-3d55", "__COUNT=2") in new stack
-- Executing EndWhile("SIP/Brian-3d55", "") in new stack
-- Executing While("SIP/Brian-3d55", "1") in new stack
-- Executing Random("SIP/Brian-3d55", "33:s|finalscore") in new stack
-- Random branches to (test,s,14)
-- Executing Set("SIP/Brian-3d55", "__MATEWEIGHT2=3") in new stack
-- Executing Set("SIP/Brian-3d55", "__COUNT=3") in new stack
-- Executing EndWhile("SIP/Brian-3d55", "") in new stack
-- Executing While("SIP/Brian-3d55", "1") in new stack
-- Executing Random("SIP/Brian-3d55", ":s|finalscore") in new stack
-- Executing NoOp("SIP/Brian-3d55", " is the probability") in new stack