startrecord=true label= nodetype=7 filename=avm:rexx/stdhead.avm nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=8 line1=parse upper arg servername mailbox magiccookie . line2= line3= line4= line5= line6= line7= line8= line9= line10= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=14 comment=If type is voice, goto sendVoice. Otherwise, go to sendFax nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=8 line1=call loadLogEntry(mailbox, magiccookie) line2= line3= line4= line5= line6= line7= line8= line9= line10= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=8 line1=if log.returnNumber = '' then do line2= log.returnStatus = 'No Tel#' line3= log.returnRetry = 0 line4= signal sendVoiceDone line5=end line6=if log.filename = '' then do line7= log.returnStatus = 'No File' line8= log.returnRetry = 0 line9= signal sendVoiceDone line10=end nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=8 line1= line2= line3= line4=if upper(log.type) = 'VOICE' then signal sendVoice line5=else if upper(log.type) = 'FAX' then signal sendFax line6= line7=log.returnstatus = 'Not Voice/Fax' line8=log.returnretry = 0 line9= line10= nextactiontype=0 nextactionaction=sendVoiceDone endrecord=true startrecord=true label= nodetype=14 comment=Going to send a voice file nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=14 comment=Dial up to three times nextactiontype=3 nextactionaction= endrecord=true startrecord=true label=sendVoice nodetype=8 line1=numTries = 3 line2= line3= line4= line5= line6= line7= line8= line9= line10= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label=sendVoiceRedial nodetype=15 number=log.returnnumber busyactiontype=0 busyactionaction=sendVoiceAgain timedoutactiontype=0 timedoutactionaction=sendVoiceAgain abortactiontype=2 abortactionaction=log.returnStatus = 'Abort'; log.returnRetry = 0; signal sendVoiceDone erroractiontype=2 erroractionaction=log.returnStatus = 'Error'; log.returnRetry = 0; signal sendVoiceDone nextactiontype=0 nextactionaction=sendVoiceConnected endrecord=true startrecord=true label=sendVoiceAgain nodetype=5 mode=2 nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=16 timeout=5 abortactiontype=2 abortactionaction=log.returnStatus = 'Abort'; log.returnRetry = 0; signal sendVoiceDone erroractiontype=2 erroractionaction=log.returnStatus = 'Error'; log.returnRetry = 0; signal sendVoiceDone nextactiontype=2 nextactionaction= endrecord=true startrecord=true label=sendVoiceRetry nodetype=8 line1=numTries = numTries - 1 line2=if numTries <= 0 then do line3= log.returnStatus = 'Busy' line4= signal sendVoiceDone line5=end line6= line7= line8= line9= line10= nextactiontype=0 nextactionaction=sendVoiceRedial endrecord=true startrecord=true label=sendVoiceConnected nodetype=8 line1=actualFileName = log.fileName line2=if verify(actualFileName, '/:', 'M') = 0 then line3= actualFileName = voiceFile(mailbox, actualFileName) line4= line5=actualAltFileName = '' line6=if symbol('log.altFileName') = 'VAR' then actualAltFileName = log.altFileName line7=actualAltFileName = voiceFile(mailbox, actualAltFileName) line8= line9= line10= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=8 line1=numTimes = 5 line2= line3= line4= line5= line6= line7= line8= line9= line10= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label=sendVoiceRepeat nodetype=8 line1=if actualAltFileName = '' then signal sendVoiceSkipIntro line2= line3= line4= line5= line6= line7= line8= line9= line10= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=1 filename=actualAltFileName comment= keyactiontype=3 keyactionaction= faxactiontype=2 faxactionaction=log.returnStatus = 'Fax?'; log.returnRetry = 0; signal sendVoiceDone dataactiontype=2 dataactionaction=log.returnStatus = 'Data?'; log.returnRetry = 0; signal sendVoiceDone busyactiontype=2 busyactionaction=if numTimes = 3 then signal sendVoiceAgain; else signal sendVoiceBusy abortactiontype=2 abortactionaction=log.returnStatus = 'Abort'; log.returnRetry = 0; signal sendVoiceDone erroractiontype=3 erroractionaction= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=12 nextactiontype=3 nextactionaction= endrecord=true startrecord=true label=sendVoiceSkipIntro nodetype=1 filename=actualFileName comment= keyactiontype=3 keyactionaction= faxactiontype=2 faxactionaction=log.returnStatus = 'Fax?'; log.returnRetry = 0; signal sendVoiceDone dataactiontype=2 dataactionaction=log.returnStatus = 'Data?'; log.returnRetry = 0; signal sendVoiceDone busyactiontype=2 busyactionaction=if numTimes = 3 then signal sendVoiceAgain; else signal sendVoiceBusy abortactiontype=2 abortactionaction=log.returnStatus = 'Abort'; log.returnRetry = 0; signal sendVoiceDone erroractiontype=2 erroractionaction=log.returnStatus = 'Error'; log.returnRetry = 0; signal sendVoiceDone nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=12 nextactiontype=3 nextactionaction= endrecord=true startrecord=true label=sendVoiceMenu nodetype=3 filename='avm:voices/SendVoice' comment=Press 1 to repeat the message. Or, press the * symbol to accept the delivery. [9=maintenance mode, 0=play menu] retries=1 zeroactiontype=0 zeroactionaction=sendVoiceMenu oneactiontype=0 oneactionaction=sendVoiceRepeat twoactiontype=3 twoactionaction= threeactiontype=3 threeactionaction= fouractiontype=3 fouractionaction= fiveactiontype=3 fiveactionaction= sixactiontype=3 sixactionaction= sevenactiontype=3 sevenactionaction= eightactiontype=3 eightactionaction= nineactiontype=2 nineactionaction=log.returnRetry = 0; log.returnStatus = 'Sent+'; call updateLogEntry(mailbox, magicCookie); call aamaintenancemode(log.origmailbox); signal answerVoiceDone poundactiontype=0 poundactionaction=answerVoiceDone staractiontype=0 staractionaction=sendVoiceOK faxactiontype=2 faxactionaction=log.returnStatus = 'Fax?'; log.returnRetry = 0; signal sendVoiceDone dataactiontype=2 dataactionaction=log.returnStatus = 'Data?'; log.returnRetry = 0; signal sendVoiceDone busyactiontype=2 busyactionaction=if numTimes = 3 then signal sendVoiceAgain; else signal sendVoiceBusy timedoutactiontype=3 timedoutactionaction= abortactiontype=2 abortactionaction=log.returnStatus = 'Abort'; log.returnRetry = 0; signal sendVoiceDone erroractiontype=2 erroractionaction=log.returnStatus = 'Error'; log.returnRetry = 0; signal sendVoiceDone nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=8 line1=numTimes = numTimes - 1 line2=if numTimes <= 0 then do line3= signal sendVoiceTimedOut line4=end line5= line6= line7= line8= line9= line10= nextactiontype=0 nextactionaction=sendVoiceRepeat endrecord=true startrecord=true label=sendVoiceTimedOut nodetype=8 line1=log.returnStatus = 'Sent-TimedOut' line2=log.returnRetry = 0 line3= line4= line5= line6= line7= line8= line9= line10= nextactiontype=0 nextactionaction=sendVoiceDone endrecord=true startrecord=true label=sendVoiceBusy nodetype=8 line1=log.returnRetry = 0 line2=log.returnStatus = 'Sent-Busy' line3= line4= line5= line6= line7= line8= line9= line10= nextactiontype=0 nextactionaction=sendVoiceDone endrecord=true startrecord=true label=sendVoiceOK nodetype=8 line1=log.returnRetry = 0 line2=log.returnStatus = 'Sent+' line3= line4= line5= line6= line7= line8= line9= line10= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label=sendVoiceDone nodetype=8 line1=if log.returnRetry > 0 then do line2= log.returnRetry = log.returnRetry - 1 line3= log.time = cTime() + log.returnInterval * 60 line4=end line5= line6=call updateLogEntry(mailbox, magicCookie) line7= line8= line9= line10= nextactiontype=2 nextactionaction=exit endrecord=true startrecord=true label=startup nodetype=14 comment=Pressing 0 usually gets us here nextactiontype=3 nextactionaction= endrecord=true startrecord=true label=answerVoiceDone nodetype=14 comment=Pressing * gets us here nextactiontype=2 nextactionaction=exit endrecord=true startrecord=true label= nodetype=14 comment=Going to send a fax file nextactiontype=3 nextactionaction= endrecord=true startrecord=true label=sendFax nodetype=8 line1=options failat 50 line2=signal off syntax line3=if ~show('p', 'REXX_GPFAX') then do line4= log.returnStatus = 'Fax Prog?' line5= log.returnRetry = 0 line6= call updateLogEntry(mailbox, magiccookie) line7=end line8= line9= line10= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=6 mode=0 nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=8 line1=address rexx_gpfax 'listen' line2=address rexx_gpfax 'sendfax' log.filename 'to' log.returnnumber line3=sendok = rc line4=address rexx_gpfax 'reportlog' 'T' 3 line5=log.returnstatus = result line6=if sendok < 5 then do; log.returnretry = 0; log.returnStatus = 'Sent+'; end line7=else if sendok < 10 then do; log.returnretry = 0; log.returnStatus = 'Sent'; end line8=else do; log.returnRetry = log.returnretry - 1; log.time = cTime() + log.returnInterval * 60; end line9=call updateLogEntry(mailbox, magiccookie) line10= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=8 line1=address rexx_gpfax 'unlisten' line2= line3= line4= line5= line6= line7= line8= line9= line10= nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=16 timeout=5 abortactiontype=0 abortactionaction=stdabort erroractiontype=0 erroractionaction=stderror nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=11 line1=AT+FCLASS=0 timeout=2 swallowecho=1 timedoutactiontype=0 timedoutactionaction=stdtimedout abortactiontype=0 abortactionaction=stdabort erroractiontype=0 erroractionaction=stderror nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=10 timeout=2 valueactiontype=3 valueactionaction= timedoutactiontype=0 timedoutactionaction=stdtimedout abortactiontype=0 abortactionaction=stdabort erroractiontype=0 erroractionaction=stderror nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=10 timeout=2 valueactiontype=3 valueactionaction= timedoutactiontype=0 timedoutactionaction=stdtimedout abortactiontype=0 abortactionaction=stdabort erroractiontype=0 erroractionaction=stderror nextactiontype=3 nextactionaction= endrecord=true startrecord=true label= nodetype=14 comment=We're done sending a fax nextactiontype=2 nextactionaction=exit endrecord=true startrecord=true label= nodetype=7 filename=avm:rexx/stdtail.avm nextactiontype=3 nextactionaction= endrecord=true