Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error in recording receiving state

Status
Not open for further replies.

NTim07

Programmer
Jul 3, 2007
12
LB
hi all,
when i start recording script on the procomm, i found that in the recording files
transmit "LD 38^M"
waitfor "^@^@^@^@^@^@."<---- it should be just "."
transmit "STAT 0^M"
waitfor "^@^@^@^@^@^@."<------???

can u help me ...
 
The script recorder will grab more than just one character since a longer string is more unique, and less likely to be received incorrectly, than a single character. If the single period will truly work OK, then you can make this change, but you might want to look for a slightly longer string if possible.

 
thanks knob,
... but my problem is:
i want to write a program so that it will disable\enable conference loop 0 in ld 38 when it checks that the state of the conference channels is greater that 25 channels.

so, when i apply the command stat 0, it returns ^@^@^@^@^@^@. where it should be CFRN x IDEL Y busy.(x,y are variable numbers)

how can i overcome this problem where i have to get the y number for the PBX.???

thanks again
 
A starting point:
Code:
;Checks staus of ConfLoop0, resets if to many units are disabled.     
    
proc main

integer DisChannels=0

   transmit "****"
   pause 1   
   transmit "LD 38^M"
   waitfor "."
   pause 2
   transmit "STAT 0^M"
   
; extract input here......
; insert value into variable DisChannels
   
   waitfor "."
   transmit "****"
   waitfor ">"
   pause 2
   
   if DisChannels > 25
     call DisEnLoop
     termwrites "Loop was reset. Reason: To many disabled units.`n`r"
   else
     termwrites "Loop looks OK.`n`r"
   endif
   
endproc

proc DisEnLoop

transmit "LD 38^M"
   waitfor "."
   pause 2
   transmit "DISL 0^M"
   waitfor "."
   transmit "ENLL 0^M"
   waitfor "."
   transmit "****"
   waitfor ">"
   
endproc

Not sure how to get the value out of the string received from the
switch, looks something like this:
Code:
CNFC 00 DSBL    01 BUSY
CHAN 00 DSBL    01 BUSY
Maby some ProComm expert can help?
:)
 
Think hi's looking for the value in colomb2 (00) in my example.
What's the best way to extract it into the variable DisChannels?

Something along the lines of "If line starts with CHAN
then make DisChannels = colomb2"
 
ok .. but how can i program to get the starting WORD(CHAN) in the Second Line????

CNFC 00 DSBL 01 BUSY
CHAN 00 DSBL 01 BUSY<----------

thanks
 
You could use either waitfor or when target to wait for the CHAN string to come across, then use rget to read the remainder of the line into a string variable. Next, I would use strextract to get the particular field you are interested in.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top