java api for SIP question

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
I'm interested in writing a "simple" java (or vb.net) app to monitor/interact-with my VoIP service.
Not really knowing where to start, I did some googling and found a java api for j2me offered by nokia (linked there via java.sun.com). I haven't found any other "official" j2se api for SIP.

I've never used j2me -- only j2se.
Is the api from nokia (for j2me) compatible with j2se? Or is there some other api for j2se (1.4x)?

Basically, I want to write an app that boils down to 2 things: 1) initiate a call to a number; 2) detect an incomming call and log the time/date/number

Does anyone have any simple, basic, java (or vb.net) examples that would get me going in the right direction?

edit: I'm an experienced programmer, moderately new to java, with a good understanding of tcp/ip, comfortable with client/server concepts
 

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
bump for the day-time java experts

How about part 1 of my question for those that know nothing of SIP:

Are api's for j2me compatible with j2se? (version 1.4something)
 

purpledemon

Senior member
Jun 21, 2001
291
0
0
This may help

http://www.onjava.com/pub/a/onjava/2001/03/08/J2ME.html

Its an old article, but I think the concepts might not have changed much.

Seems like the J2ME virtual machine is just a subset of the J2SE virtual machine that has certain key features removed. e.g. the following sentence

The first thing to realize is that just because J2ME is Java, that doesn't mean you can take your existing Java applications, re-compile them, and have them run on new devices. Key features found in the Java Virtual Machine used by J2SS and J2EE have been removed from J2ME's virtual machine to enable it to run on limited resource machines.

 

Templeton

Senior member
Oct 9, 1999
467
0
0
have a look at jain-sip for java...
If there is any chance of you being able to do it in C, look at the eXosip library, it's built on top of the gnu osip stack and handles all of the nasty details of the protocol, you can have a UA up and running in a matter of hours. Only problem is that it's released under the gpl, if this won't work for you, the resiprocate stack is similiarly easy to use (more powerful though), written in c++, and released under an extremely non restrictive license. see sipfoundry
 

znaps

Senior member
Jan 15, 2004
414
0
0
2 questions:

- Are you talking about a desktop application here which interfaces with existing desktop software which you've installed?

- What hardware are you interfacing with?
 

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
Originally posted by: znaps
2 questions:

- Are you talking about a desktop application here which interfaces with existing desktop software which you've installed?

- What hardware are you interfacing with?
I'm talking about writing my own desktop app to iterface with a VoIP device.
I just signed up for SunRocket (like Vonage, packet8, etc) and do not have the hardware yet, so I don't know the specifics on the device (should be here in a week).

While playing around with my sunrocket account -- which I could log into -- and setting up a contact-list on their website, I noticed a button on the web-page to "Call" the number.
It then hit me that pressing that button (on their web-site) would cause my phone to call that number. (If sunrocket can send my device instructions to call a number, so can I!)
I could also find a use for "monitoring" the device -- like logging an inbound phone-call -- which may mean either writing a proxy app to pass traffic through, or writing a "sniffer" app (using jpcap api) to detect/sniff inbound traffic to the device.
This is for personal use, so I don't mind the use of pcap.

Of course, my grand ideas could all be blown out of the water if there's some proprietary software/hardware involved -- which I won't know for a week. (But I really doubt it)

I'd be developing in Java (or vb.net) on my desktop, so the limitations of j2me don't apply.

I'm looking into that "JAIN SIP" api, but it's very unclear to me if it works with j2se 1.4, and it's unclear to me where to even get it
 

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
Originally posted by: Templeton
have a look at jain-sip for java...
[/L]
Ok... JAIN-SIP-1.1 is what I need (I think). It took a while figuring out that "spec" means "the source you need" -- I thought it was refering to the protocol "spec" document.

 

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
Originally posted by: znaps
Just posting this related site, in case you haven't stumbled upon it yet:

https://sip-communicator.dev.java.net/
Funny, I was just reading about that and the sister-project, http://jain-sip-presence-proxy.dev.java.net

...looks like I'm not the only one with this idea... lol -- a wide selection of "soft phones" and other projects out there. I was also reading about Internet Messenger being "sip compliant" -- so (conceptually) it doesn't look too hard to mix the two. I'm thinking maybe have my app text-message me if someone IM's me when I'm not home -- in addition to the "phone monitoring" idea.

Microsoft has a huge/good write up on SIP under their technet site HERE

The paranoid side of me also thinks it wouldn't be terribly difficult combine a soft-phone, sip-proxy, and war-driving -- giving you phone-access on unsecured networks that also use a VoIP service. Hmmmm....
 

znaps

Senior member
Jan 15, 2004
414
0
0
The paranoid side of me also thinks it wouldn't be terribly difficult combine a soft-phone, sip-proxy, and war-driving -- giving you phone-access on unsecured networks that also use a VoIP service. Hmmmm....

hehe, now THAT would be a killer app!
 

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
Originally posted by: znaps
The paranoid side of me also thinks it wouldn't be terribly difficult combine a soft-phone, sip-proxy, and war-driving -- giving you phone-access on unsecured networks that also use a VoIP service. Hmmmm....

hehe, now THAT would be a killer app!
before you get your hopes up, keep in mind I've only been reading about the topic for a day. I'm sure there's safe-guards and/or significant complications in place that I haven't seen yet.
...but ya, that would be cool.
 

Templeton

Senior member
Oct 9, 1999
467
0
0
Originally posted by: ttown
Originally posted by: znaps
The paranoid side of me also thinks it wouldn't be terribly difficult combine a soft-phone, sip-proxy, and war-driving -- giving you phone-access on unsecured networks that also use a VoIP service. Hmmmm....

hehe, now THAT would be a killer app!
before you get your hopes up, keep in mind I've only been reading about the topic for a day. I'm sure there's safe-guards and/or significant complications in place that I haven't seen yet.
...but ya, that would be cool.

You could certainly make voip calls using a softphone on an unsecured network. If you want to make calls to the pstn using someone elses voip service (vonage, packet8, etc..), there will probably be safegaurds in place. You'll need to register your phone with the services proxy/registrar, providing a username and other login credentials. (I don't use one of these services, but I can't imagine them not using at the very least the authentication capabilities that sip provides)