How to Detect if a Line is Busy
Keywords:
Question:
I want some kind of decision-making routine. How can my script capture the result of the phone being dialed, i.e., how can it determined if the phone is ringing, if the number is busy, if there's no carrier, etc. If the number is busy, I want the script to hang up and dial again. Is there a serial extender command what will, after a number has been dialed, return a code that says, "Hey, the line is busy"? Any ideas?Answer:
Something like:AddExtender("wwser34I.dll") MyModemIsOn="COM2" BBSPhone="5156000" port=pComOpen(MyModemIsOn,0,57600,"8N1","RTSRTS") ;Retry dial to good connect with carrier ;See pComInfo more other information while 1 pModemDial(port,1,BBSPhone) rslt=pModemConnect(port) err=pGetLastError(0) if err==0 then break Display(3,"Error Code",err) endwhileThe part about detecting if the line is busy is done on the pModemConnect line.If pModemConnect returns 0, then the connection did not occur. If after a pModemConnect you do a pGetLastError it will tell you the problem.
-4 I think is BUSY
-1 is Voice Answered.
Article ID: W12569Filename: Detect if a Line is Busy.txt