LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to dial to a phone or page someone using CVI?

dear all,

I have a program that run a process and i need the program to page the user when the process ended. how should i go about writing this part of the program? can anyone give me some idea?

thank you in advance.
0 Kudos
Message 1 of 3
(3,137 Views)
Hello Sang,
As I understand your post, you want CVI to dial a phone and page someone when an event occurs (process_end in this case). In order to do this easily, you will need a modem connected to your system on a known COM port. You should also check your modem�s documentation for its instruction set (most are Hayes compliant, but it never hurts to check). The general program flow would look like the following:

/* Dial a modem to page the system operator */
char modemstring[100]="ATDT"; //command to make the modem dial
strcat(modemstring,"555-1234"); //append the phone number to dial
strcat(modemstring,",,,,4242#"); //append pause(commas) followed by a page msg
OpenComConfig( ..parameters..); // open & configure the COMPORT
ComWrt(COMPORT, modemstring, strlen(modem
string) ); //dial,write to COMPORT
CloseCom(COMPORT); //close the COMPORT

This should get you started. Your modem may require different commands in order to dial properly and wait the proper length of time for the paging service to answer.

Jeremiah,
National Instruments
Applications Engineer
http://www.ni.com/ask
0 Kudos
Message 2 of 3
(3,137 Views)
thank you for your answer. your function works and not much changes is required. the only line i need to add is a delay of about 15sec before closing the com port. this is due to the comport closing before the numbers is dialed.

thank you once again
0 Kudos
Message 3 of 3
(3,137 Views)