Skip to main content

Is Java Right for What I want to do - connect pc, open sip & incoming call

3 replies [Last post]
Joined: 2006-11-22


I've been looking for a way to have a cross-platform (Mac,Windows,Linux, etc) program to work in the background when the computer is switched on (or the program is opened), so that when a call comes through on the VoIP phone (a Grandstream, Snom, softphone, etc), my computer picks this up and opens a webpage (PHP), which will then display some information in the browser (definitely Firefox compatible).

The webpage displayed will depend on the phone number that was called, which is set up as the Caller ID when it comes into the Voip phone (this ability is set up by the Voip provider I use, so that I know which of my phone numbers was called - home or work).

I know it's possible, there are Windows-only progs out there using VB scripts to do exactly this. But I definitely need something cross-platform, and wondered if it might be the case that Java could be used to pull VB scipts (if necessary) for the PC and Applescripts for the Mac? Or is that complicating things?

I'm a web designer and such don't have any knowledge of Java at all apart from some basic javascript. I'm a Voip enthusiast and would like to start taking advantage of the open sip protocol to make my life working in a home office a little smoother.

If anyone could tell me whether I'm headed in the right direction, or if you are already working on such a project please, please, please let me know.



Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-01-27

Sounds like you are doing call center stuff and are wanting to pop a script to an agent when a call comes in to a VoIP enabled softphone.

There are many ways to do this.

SIP supports a forward message, so I would probably have a process where all the SIP messages go, then forward the arrival (can't remember the exact SIP protocol off the top of my head) to the actual softphone and then also have the process send a message (probably via JMS) to an app on the agents desktop which displays a URL, I would probably use an embedded web browser with JDIC. If you developed the softphone then you can put it right in there as well.

Running a call center without having to purchase Avayas and Nortels is becoming pretty competitive...maybe I shouldn't give out all my ideas:-)

Joined: 2004-07-17

Not sure which part you are having trouble with, but if you just want to open a browser and pass a url (which may include the phone number), you can do that with JDIC. If you really need interaction between Java and javascript on the browser, you can use jrex.

Message was edited by: manjuka

Message was edited by: manjuka

Joined: 2005-06-08

I don't know about VBScript; but the OS X version of Java ships with an Applescript-to-Java bridge. There's also a number of scripting languages available through the generic Java scripting support built into the forthcoming JDK 6; see

Depending on what those VBScripts are doing, it may be hard to port them to Java. Java is not very adept at calling non-Java code: it uses a system called JNI which has a pretty tremendous learning curve. If those VBScripts are hooking into native Windows libaries, then porting them to Java will probably be non-trivial.