B4J Question TAPI LIBRARY..or way to GET CALLER ID FROM Telephone Call Center

Magma

Expert
Licensed User
Longtime User
Hi there,

tried to had smaller title... but want it full description...

So i want to read "real/live/time" all the new incoming calls at a telephone center specifially Auerswald Compact 4000..
https://www.auerswald.de/de/service/125-developer-service/950-dev-beschreibung-api-de.html

They are saying using standard TAPI...
but where in B4J has TAPI ?

So is there anyway to read new incoming calls (offhook/ on hook/ duration / specific lines / etc) ?

Thanks in advance
 

Magma

Expert
Licensed User
Longtime User
Actually specific callcenter using "lan tapi" - i can't read german language... but seems something like json browsable files.. from it's ip..

So it is possible to read them fast and not loosing incoming calls will make me the job... i don;t want recording voice or making calls / only read incoming calls if it is on hook or not - duration... only that..

Did anyone know how ?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Call http://192.168.1.240/app_ext_ports_status from the local network and you´ll get a list of all ports and their state. Replace the ip with your ip from the Commander.

Note that i am using a C6000 but i guess it is similar.

The result is a JSON

[{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":7314,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":2,"portId":9789,"portNr":0},{"amtId":0,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":1,"portId":8515,"portNr":1},{"amtId":0,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":1,"portId":8515,"portNr":1},{"amtId":0,"anschlArt":0,"bKanalGesperrt":0,"bKanalStatus":0,"moduleId":1,"portId":8515,"portNr":1}]

To get callerid you need to use the TAPI installed on your System (kind of driver installed). The above (and some others) command can be used to get a list of phonecalls.

But the call is listed only AFTER the call itself... So the list will not help here.

Last 10 caller: https://192.168.1.240/app_gespr_list?limit=10

Note that you can find the callerid here ;-)
 
Last edited:
Upvote 0

Magma

Expert
Licensed User
Longtime User
@DonManfred ...Yes i see that (after the call)... i need when ringing first (who is calling).. and then the duration...

You are saying about TAPI... ok let's say i am installing TAPI... then how i will get at b4j the caller id, open lines and the others ... ?
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
I am trying to figure a way... to just catch the status of phone lines (who is calling, on hold, hook, off hook)... If there is no way to do it trough b4j may be i ll use a command line tool or make it through vb6...

I ve found code for vb6 without dll's but not a clear code to check all the lines the same time.

Is there something like cmd utility (do that)...

or better something to port at b4j and check lines...

Thanks
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Found at vb.net - way to check status of lines...

https://www.codeproject.com/Tips/636769/VB-NET-ITAPI-TAPI-Incoming-call-and-caller-ID

specifically:

B4X:
    Private Sub tapiGeneral_Event(ByVal sender As Object, _
      ByVal e As TapiCallStateEventArgs) Handles tapiCls.TE_CALLSTATE

        ' MsgBox(e.State.ToString)

        Select Case e.State

            Case CALL_STATE.CS_UNKNOWN

            Case CALL_STATE.CS_OFFERING
                'When a call is coming in during the ring tone
             offeringCall = True

            Case CALL_STATE.CS_CONNECTED
                'When a call is answered
             connectedCall = True
             offeringCall = False
               
            Case CALL_STATE.CS_HOLD
            Case CALL_STATE.CS_IDLE
            Case CALL_STATE.CS_INPROGRESS
            Case CALL_STATE.CS_QUEUED
            Case CALL_STATE.CS_DISCONNECTED
                'When a call is in conversation or closed
                connectedCall = False               
        End Select

    End Sub

If having the above and this (translated in B4J):

B4X:
    Private Sub tapiCallNotification_Event(ByVal sender As Object, _
      ByVal e As TapiCallNotificationEventArgs) Handles tapiCls.TE_CALLNOTIFICATION
        'MsgBox("Call notification")

        Select Case e.Event
            Case CALL_NOTIFICATION_EVENT.CNE_MONITOR
                'Choose you action
            Case CALL_NOTIFICATION_EVENT.CNE_OWNER
                'Choose you action
        End Select
    End Sub

    Private Sub tapiInfoChange_Event(ByVal sender As Object, _
      ByVal e As TapiCallInfoChangeEventArgs) Handles tapiCls.TE_CALLINFOCHANGE
        Dim callerNumber As String = ""

        Try

            callerNumber = e.Call.CallInfo(CALLINFO_STRING.CIS_CALLERIDNUMBER).ToString

            If callerNumber.Length = 0 Then
                'Hidden number
               
            Else
                'Clear number
               
            End If

        Catch ex As Exception

            'Manage the exception

        End Try


    End Sub

...will help..
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Upvote 0
Top