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!

Procomm and 911

Status
Not open for further replies.

Wolftrax

IS-IT--Management
Jul 21, 2003
9
US
Hello all!

Here is what I'm trying to do. Right now I use Procomm to pull real time CDR records from my Meridian Opt 61. I do this so that when a person dials 911 in error, I can then go into Procomm and do a find for 911 and locate the DN that dialed the 911 call in error. Is there a way that anyone knows that I can have Procomm monitor and find this data automaticly and send that line of records to a network printer? This would save the time of having to have someone look up the information and relay it to our call center. We are in the process of evaluating 911 software, so this is something that I am using in the interim. I am using PC version 4.8.
Thank you in advance for your time!
 
If the information is coming back in response to a command you issue, you could either use the rget command to read the output line by line or save the output to a file (using the snapshot or capture command), then parse it line by line. Using the strfind command, you could check each line for "911" then perform additionally parsing on that line to get the DN. As I don't know what the output looks like, I can't offer more specific assistance than that, but hopefully it gives you some ideas to work with.


aspect@aspectscripting.com
 
Thank you for your quick response :)

To give you a better idea of what data comes out of the phone switch, I am going to attach this example. This data comes out in real time, and contains every call that is made. There is no action that I do to pull this data, I just do a find for "911" from the raw data, then call the call center to let them know who made the call. In the following example, the third item down contains the two items I am interested in, the 911 and the DN (3807) that made the call.

N 105 00 T008010 T005012 07/21 13:09 00:05:48 A 1905105????

N 106 00 T001046 T006011 07/21 13:14 00:00:38 A 1906105????

N 107 00 DN3837 T000032 07/21 13:14 00:00:30 A 1900911

N 108 00 DN3807 T000034 07/21 13:12 00:02:00 A 1900596????

S 109 00 DN1978 T001046 07/21 13:15 00:00:00 A 1901104????
Thanks!
 
Here's something that may work for you. There are two possible changes you will need to make. The first is that the script assumes the DN (including the DN prefix) is six characters. If this can vary, then I'll need to change the substr command that extracts then DN. The second possible issue concerns where the cursor is when the 19000911 string is received. As written now, the script is expecting the cursor to be on the line where the call report is appearing. You may need to change sLine to sLine-1 in line 6 if the cursor appears on the blank line after the call report.


aspect@aspectscripting.com
 
Thank you knob!

I have to tell you...I do use procomm for many things, however, I have never had to do anything like this before. It looks like from your post that I should be able to pull the information from the data, but will I be able to then have that line sent to a network printer? I have checked around with a few people but so far I have been unable to locate anyone that knows anything about Aspect. I will continue to ask around, or if you know where I can get some assistance putting this script put together I would be most grateful.
Thanks again for your help! You have me heading in the right direction :)
 
Looks like I forgot to paste in my sample script last time. Here it is with an update to print the DN number to the default printer in Windows:

proc main
string sLine, sOutput
integer iPos

termgets $ROW 0 sLine
if strfind sLine "1900911"
strfind sLine "DN" iPos
substr sOutput sLine iPos 6
if printer open
printstr sOutput
printer close
endif
endif
endproc

aspect@aspectscripting.com
 
I have installed a network printer and was able to give this a try.
The cursor does start on the blank line after the report. I did as instructed on line 6, I get the "invalid operand on line 6" message after putting sLine-1.
What am I doing wrong?
Thanks!
 
Don't know what I was thinking when I wrote that message, the change you want to make is this:

termgets $ROW-1 0 sLine

This works much better than trying to subtract one from a string variable!

aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top