Search code examples
javasiptelephonypbxtapi

SIP alternative to TAPI?


We are using the TAPI technology in our java based clients to connect to PBX hardware for using the CTI operations (start a call, handle receiving calls etc). To connect to the TAPI we use the gjtapi project. We start a call from our client gui and we can monitor the events and we see the events on the telephone device connected to the client.

As an alternative, I tried the SIP protocol, we can also start calls, but when we connect using the SIP protocol the telephone device is bypassed, we do not see anything on the device. For example, when using TAPI and we receive a call, we see the incoming call on the phone and also on our gui, they work synchronised. But when I connect using SIP and receive call, nothing happens on the telephone device. Is that a wrong setting/implementation or is that the behaviour of SIP, it provides a some sort of soft-phone?


Solution

  • TAPI is a 3rd Party technology: meaning your application does not do the "work", it sends commands to the PBX to do the "work" on your behalf.

    In SIP you have to do everything yourself: you can set up a call to somewhere but you are very limited in telling other things what to do.

    You can get similar functionality as TAPI from SIP but it is far more involved. You need to put your self as the "man-in-the-middle". For example you want a call from the device to outside:

    • First make a call (from your app) to the device
    • Second make a call (from your app) to the external party
    • Third connect both ends

    However, if you want TAPI-like control after that, you need to keep your application "in the loop". SIP can only control what you are directly involved in. This means you need to either:

    • Trombone the calls (audio passes through your app)
    • Use media bypass (audio goes between 2 parties) but you keep the signaling

    This can also be dangerous as it means your app is "in between" all calls: meaning if it crashes, all calls are lost!

    I advise you to not underestimate the amount of work it takes to get something like this working properly. There are also other alternatives like CSTA and many PBX support their own proprietary interfaces for this kind of control. But in my opinion TAPI is probably the better choice for 3rd Party call control (especially if you want to support more then 1 PBX vendor)