Public Sub UpdateChannelState() Dim nTemp As Int32 Dim str As String Dim i As Int32 For i = 0 To MaxLine - 1 nTemp = SsmGetChType(i) If (nTemp = -1) Then MessageBox.Show("Fail to call SsmGetChType") ElseIf (nTemp = 12) Then Select Case (ChannelState(i).WorkState) Case CH_IDLE str = "Idle" Case CH_RING str = "Ringing" Case CH_ACTIVE str = "Active" Case CH_OFFLINE str = "Offline" Case CH_WAITFOR_ONHOOK str = "WaitforOnhook" End Select str = "" str = System.Text.Encoding.ASCII.GetString(ChannelState(i).pCallId) str = "" str = System.Text.Encoding.ASCII.GetString(ChannelState(i).Lcd) str = "" Select Case (ChannelState(i).Dir) Case UNKNOWN str = "Unknown" Case UP str = "Call out" Case DOWN str = "Call in" End Select End If Next End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)