SIPTAPI Header Behavior

Hello everyone,
I’m trying to setup SIPTAPI v0.2.17 on Windows 10 with our CRM (REA9, Real Estate Assistant 9) although I am currently testing using the windows dialer.exe (behavior between the programs is identical). I have a PBXact server on Version 12.7.8-2202-1.sng7 with Grandstream GXP-2135 endpoints on FW version (FW version has not affected the behavior of SIPTAPI)

Currently, I have SIPTAPI successfully dialing out, but, there seems to be incompatibilities with the SIP BYE requests.

To preface, I do not have a large amount of experience in SIP or PBX servers.

Here’s what’s going on:
When dialing out with SIPTAPI via dialer.exe, a call prompt notifies the user that it is dialing a number (call status) and contains a hang up button to allow the user to hang up the call. There’s two main behaviors here, depending on SIPTAPI config and neither are desirable.

  1. In SIPTAPI there is a setting to wait for the peer to send the BYE. When this is checked, it never receives the BYE and the prompt just sits there on dialing. The hang up button in the call prompt will work (it sends a BYE request, loggable in wireshark) until the remote phone starts dialing. After this, the hangup button has no affect on the call between my cell phone and desk phone.
    2a. There is another setting titled “Immediate BYE after REFER” which will do what it says and will receive a BYE right after the REFER and nothing else is heard from the server.
    2b. If neither of these are checked, it behaves the same as 2a.

Here’s what I think is happening:
When the server refers my desk phone, the SIPTAPI connection is no longer needed so the server doesn’t communicate to it anymore.

Here’s why I think that:
I setup wireshark to listen to SIP traffic. I can see all of the normal SIP traffic while it’s dialing. In the case of Behavior 1, I can see SIP traffic all the way until the remote phone starts ringing and then it’s silence, no matter what else happens in the call. In the case of Behavior 2, I can see the BYE get sent from the server and dialer.exe closes the call prompt.

Here’s what I think needs to be configured:
I’m not privy to the inner workings of the PBX server but I feel like there is some configuration somewhere that would continue communication with the SIPTAPI connection for the duration of the call, instead of dropping it/not continuing to send the call status.
The BYE behavior would also have to be modified, so when SIPTAPI sends a BYE, it hangs up the call even after it has started dialing.

The end goal for this would be the PBX server continuing to communicate with the SIPTAPI client so that I can see the current call status, and also be able to hang up the call using the hang up button.

*80101 is under User’s Extension so that the GXP-2135 will auto answer. Changing this value does not affect behavior.

Wireshark requests:
the header values for the requests can be provided if it will be advantageous to troubleshooting.

Firstly there is no TAPI over the wire; this is just an answered outgoing SIP call followed by a blind transfer of that call.

I believe it is up to your SIP client (“SIP/TAPI”) to detect the notify for the 200 OK, and hang up then. In any case, I think sending a BYE will only stop the NOTIFYs, not the underlying call, unless the transfer fails, in which case the BYE will mean it won’t be possible to return the failed call to the transferrer.

Certainly the main example of a successful transfer in the relevant RFC has the transferrer sending BYE on seeing the NOTIFY/200 OK: RFC 5589 - Session Initiation Protocol (SIP) Call Control - Transfer

1 Like

If your TAPI driver wants the ability to abort the call up to the point where the B leg answer, it needs to use an attended transfer, only issuing the REFER when it sees the OK directly on the B leg.

If it wants to be able to hang up a call after it is established, it either needs to act as a proper telephone switch, and not issue any transfers, or it needs to use a protocol, e.g. Asterisk’s AMI, that is designed for third party control.

1 Like

Thank you for the replies! I started looking into AMI and went down a rabbit hole on that side and it led me to test AstTapi, Activa for Asterisk, and finally xtelsio TAPI for Asterisk.
xtelsio’s TAPI for Asterisk worked perfectly! TAPI dialing works via the grandstream web api (this removes the auto dial beep on the endpoint and the ~6s delay that I was having on call connection while the call was referred and such) and it hangs up and reports call status via AMI. This is the perfect solution and is what I was theorizing developing myself. They do have a one time fee for the software (21.50 EUR for 10 lines) but that price has been deemed worth it due to the efficiency that is added allowing our CRM to track all of the call details automatically and the time saved from developing something on my end.

For anyone here in the future, here are some steps that got xtelsio TAPI for Asterisk working on a freePBX/PBXact server with Grandstream GXP-2135 endpoints

  1. Download TAPI for Asterisk
  2. Unzip the files and run setup.exe (the program requires vcredist and it will prompt you to download it, the version they provide will be in german so don’t be alarmed)
  3. go to freepbx Modules > Settings > Asterisk Manager Users > Add Manager
  4. Set a name, secret, and set the Permit field to the IP address that the client computer is on, save and apply changes
  5. You may have to enable access to the Asterisk AMI port which is 5038 by default I believe.
    To enable a port go to Modules > Connectivity > Firewall > Services (side menu) > Custom Services
  6. Return to your xtelsio config, if you closed it, open Phone and Modem by searching in the start menu, click the advanced tab and click configure on TAPI for Asterisk.
  7. Under Connection details enter the server IP Address, username, and password and save. If the connection times out ensure the IP is correct and the port is listening and allowed through the firewall on the pbx server. If authentication fails, make sure you have applied changes on freepbx when creating your AMI manager.
  8. Click Scan in the bottom, check the extension that (hopefully) pops up and click apply in the middle and apply at the bottom then OK.
    8a. I have grandstream endpoints which TAPI for Asterisk supports so I then clicked the TAPI-Line and clicked settings at the bottom, selected grandstream from special device and clicked settings. Enter the webgui ip address and admin password. This allows dialing out to be completed directly via the phone instead of using the server to refer calls.

Note that a new 16 install will have the Asterisk AMI service bound to localhost by default. If setting up remote AMI connections in 16+, you will need to update the bindaddr in /etc/asterisk/manager.conf

I’ve never ran into it myself, but we’ve seen reports over the years with issues when scaling this solution for lots of individual users.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.