Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSCOMM and PABX Systems
Message
From
18/10/2000 05:10:41
 
 
To
18/10/2000 03:00:40
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00430761
Message ID:
00430780
Views:
9
It's looks like you are in the process creating the Call Accounting Software .. right?
To communicate with the PBX system, you have to follow the following things:
1. Create the communication serial cable
2. Set the PBX communication setting such as:
speed, parity, databit, stop bit and the line feed
3. use the MSCOMM to receive any string from the PBX's port to the PC's port
4. follow the below codes:

when opening the Comm Port

If MSComm1.PortOpen = False Then
MSComm1.CommPort = 2 'COM2 the Comm port that you are using for example
MSComm1.RThreshold = 1
MSComm1.SThreshold = 1
MSComm1.ParityReplace = "?"
MSComm1.InputLen = 1
MSComm1.EOFEnable = True
MSComm1.RTSEnable = True
MSComm1.Handshaking = comRTSXOnXOff
MSComm1.Settings = ' The setting must same setting as you have setted on your PBX
MSComm1.PortOpen = True
End If



in MSCOMM_Oncomm event

Private Static Sub MSComm1_OnComm()
Dim iRecord
Dim EVMsg$
Dim ERMsg$
' Branch according to the CommEvent property.
Select Case MSComm1.CommEvent
' Event messages.
Case comEvReceive
EVMsg$ = "Receiving"
' This you have to call the procedure that will read any characters
' That received from the PC's port then may be you can do the
' Cost calculation process

Case comEvSend
EVMsg$ = "Sending"
Case comEvCTS
EVMsg$ = "Change in CTS Detected"
Case comEvDSR
EVMsg$ = "Change in DSR Detected"
Case comEvCD
EVMsg$ = "Change in CD Detected"
Case comEvRing
EVMsg$ = "The Phone is Ringing"
Case comEvEOF
EVMsg$ = "End of File Detected"

' Error messages.
Case comBreak
ERMsg$ = "Break Received"
Case comCDTO
ERMsg$ = "Carrier Detect Timeout"
Case comCTSTO
ERMsg$ = "CTS Timeout"
Case comDCB
ERMsg$ = "Error retrieving DCB"
Case comDSRTO
ERMsg$ = "DSR Timeout"
Case comFrame
ERMsg$ = "Framing Error"
Case comOverrun
ERMsg$ = "Overrun Error"
Case comRxOver
ERMsg$ = "Receive Buffer Overflow"
Case comRxParity
ERMsg$ = "Parity Error"
Case comTxFull
ERMsg$ = "Transmit Buffer Full"
Case Else
ERMsg$ = "Unknown error or event"
End Select
End Sub

by the way, what brand or models of PBX that you want to create for the call accounting?..
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform