• We just launched and are currently in beta. Join us as we build and grow the community.

Capture Data From PBX

kadleqca

Layer 2 Pro
K Rep
0
0
0
Rep
0
K Vouches
0
0
0
Vouches
0
Posts
144
Likes
100
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 400 XP
Im Back again ,with another Hardware interfacing project . Good For Engineering Students and for inhouse company programmers. This sample Tutorial how to capture data from a PBX (Panasonic KXTDA100)
sorry i can't provide you all the code because we are selling the system in the market
but I will give the coders some idea on how to start interfacing the Hardware to a VB system or existing Data Logging, Billing System.
'====================================================
VB part

add MSCOMM control, a Textbox, and a List box

and paste the code

  1. Option

    Explicit

  2. ' Select the right COM port in the Properties of the control!

  3. Private

    Sub

    Form_Load()
  4. MSComm1.Settings = "9600,n,8,1"
  5. MSComm1.InputLen = 0
  6. MSComm1.RThreshold = 1
  7. MSComm1.CommPort = 1
  8. MSComm1.PortOpen = True
  9. End

    Sub

  10. Private

    Sub

    MSComm1_OnComm()
  11. Dim

    strinput As

    String
  12. strinput = MSComm1.Input
  13. List1.AddItem strinput
  14. End

    Sub


  15. '
  16. Private

    Sub

    Command1_Click()
  17. MSComm1.PortOpen = True
  18. MSComm1.Output

    = "AT"

    & Chr$(13)
  19. Do
  20. DoEvents
  21. Loop

    Until

    MSComm1.InBufferCount > 1
  22. Text1.Text = MSComm1.Input
  23. 'Write to a filesystem object (.txt)
  24. WriteToFile

  25. 'Extract the capture string then save to Table fields
  26. SaveToDb

  27. End

    Sub

  28. Function

    WriteToFile()
  29. 'codes goes here
  30. 'codes for writing to a .txt file for logging the output data of PBX
  31. 'its column oriented ,(callid, time, date, mins, etc)
  32. 'End Function

  33. Sub

    SaveToDB()
  34. 'codes goes here
  35. 'so extract those strings and save it to database
  36. use ADO, ODBC etc for

    this, its pretty easy
  37. End

    Sub

http://www.emondsoft-solutions.com/

Facebook Fan Page

http://www.facebook.com/pages/emondsoft/120502167993693

Mobile: +639399393702

 

442,401

317,942

317,951

Top