B4J Question Telephony API Library

vfafou

Well-Known Member
Licensed User
Longtime User
Hello!
I have a recent request for controlling a telephony center (PBX) via a new application I'm writing in B4J.
Does anyone have any experience with telephony APIs in B4J?

Thank you in advance!
 

vfafou

Well-Known Member
Licensed User
Longtime User
The only thing I can found is the JTAPI or something similar.
I think it will be very difficult to wrap it for B4J!
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
How will you be interfacing with the hardware?
 
Upvote 0

Squiffy

Active Member
Licensed User
Longtime User
Upvote 0

Squiffy

Active Member
Licensed User
Longtime User
That's a shame - so much easier with Asterisk/Freeswitch

What kind of control do you need to build? Do you need to control it in the form of making calls/transferring/switchboard/etc., or just react to events or stats for display or analysis? I see it has some form of TCP port, but without knowing what you're trying to do I'm not sure if it helps.
 
Upvote 0

vfafou

Well-Known Member
Licensed User
Longtime User

It's needed to tell you that's a GUI application.

Well, the functions I need to do are:

1. My user will answer the call with a keyboard key (e.g. F3).
2. My user needs to park (hold with an ID) the line.
3. A second user will unpark the line in order to finish the conversation.
4. The second user hangs up the line, or I receive the event that the line hanged up from customer.

Finally, I need:

1. Caller ID
2. Trunk ID
3. Answer Function
4. Park Function
5. Unpark Function
6. Hang Up Function

I've read quickly the link you sent me but I can't figure out which B4J component can help me to get the job done!
 
Upvote 0

Squiffy

Active Member
Licensed User
Longtime User
I've not done a GUI app yet in B4j, only server apps.

But a quick looks shows you need to include jNetwork in your project, then investigate sockets. As a starting point for more reading :

B4X:
dim mySocket as Socket
dim HostIP as string="192.168.0.1"
dim HostPort as int =5001
dim ConnectTimeout as int = 30000

mySocket.Initialize
mySocket.Connect(HostIP, HostPort, ConnectTimeout)
...
etc etc
...

EDIT -
See here for a nonUI example on how to use sockets. Easily adapted, I'm sure.
 
Last edited:
Upvote 0

Squiffy

Active Member
Licensed User
Longtime User
Re-reading what you wrote, I'm guessing that you meant that you want to use the PC as a phone device. If that is correct then the above probably won't help. Sorry, I think I misunderstood.

Though, assuming what I've just written is correct, it sounds like you want to replace the phones with PC based phones. If that is correct, you are to all intents and purposes replacing the point of having the PBX anyway. Is it viable to move to something like Asterisk?
 
Upvote 0

vfafou

Well-Known Member
Licensed User
Longtime User
Yes, I want to use the computer as a phone device!
Unfortunately, the decision of which PBX will be used is not mine...
I'm just called to make my app work with the specific PBX. :-(
 
Upvote 0

Squiffy

Active Member
Licensed User
Longtime User
Does the PBX have VoIP/softphone phone capability? Well, it has generally but does your installation have it?

One possibility is to use something like the Bria softphone which has an API to allow external application control :

http://www.counterpath.com/bria-desktop-api/

You would register the softphone as a voip phone on the PBX, then use your app to control the softphone. If that's an option then it might save you a few headaches as the softphone handles all the functionality for you, you just instruct it.

EDIT -
theres a Java library for it as well which could probably be included in B4J :

https://sourceforge.net/projects/briaapi/files/BriaAPI_Java_Sample_1.0.zip/download
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…