Search This Blog

Monday, March 10, 2008

We have SIP working on android!

Final update: For folks who are still reaching this post via searches, the [SIPDroid] project took our initial work and have extended it for a full featured application. Instead of downloading our stuff, check them out - their work will be more recent. We (HSC) are not updating our files.

Update: April 2 2008: Source code of stack released here

1.jpg

Update: Mar 17 2008

See here for a screencast :-)

Update: Mar 12 2008

Some other sites linking here seem to be reporting this news with their own verbiage. Lets be specific on what we are doing:

  • We have taken the GPL'd mjsip SIP stack and our objective is to make it work on android (this is mostly a porting activity). We are not writing our own stack.

  • We are not doing any optimizations, etc. The scope is exactly what I wrote - make mjsip work on android, so developers can use the mjsip APIs to build apps in android.

  • It is a very straighforward 'take from community (GPL/mjsip), give back to community (post ported code back to GPL/mjsip)' activity.

  • We are targetting to release the port in a week or so... (as-is - as I mentioned the objective is straighforward -a port of mjsip - if it has bugs when you do funky stuff , fix it yourself when we release it :-) )


We (my company) had started an internal project to get SIP working on Android and some smart folks belted out some nifty code to get SIP working on android. We hope to release the ported SIP stack on android pretty soon. We used the GPL'd mjSIP stack and will be releasing the modifications as per GPL, obviously - so other developers have a good SIP API to build apps. This should happen pretty soon. Some time ago, we did a rss-to-presence implementation stub (concept here) over Google Mashup editor. I look forward to seeing the "google-phone" talk SIP to the "google-server" and other cool stuff.

Stay tuned!

20 comments:

  1. [...] Trails in the Sand wrote an interesting post today onHere’s a quick excerpt We (my company) had started an internal project to get SIP working on Android and some smart folks belted out some nifty code to get SIP working on android. We hope to release the SIP stack on android pretty soon. We used the mjSIP stack and will be releasing the modifications as per GPL, obviously. This should happen pretty soon. Stay tuned! [...]

    ReplyDelete
  2. Interesting stuff ....btw a couple of bugs in the mjsip stack(1.6) one of those is in the JAudioLauncher.java

    /** Stops media application */
    public boolean stopMedia()
    { printLog("halting java audio..",LogLevel.HIGH);
    if (sender!=null)
    { sender.halt(); sender=null;
    printLog("sender halted",LogLevel.LOW);
    }
    if (audio_input!=null)
    { audio_input.stop(); audio_output=null;
    // above line should be: audio_input.stop(); audio_input=null;
    }

    INTERESTING PROJECT!!

    ReplyDelete
  3. [...] is an update to the original “We have SIP working on android” [...]

    ReplyDelete
  4. Hi,

    The screencast that you show lets two clients call one another but how can one continue to make a voice conversation. Do you have some library or information you can point us to do the same.

    Thanks Himanshu

    ReplyDelete
  5. to be more specific to my question.....is there an RTP implementation to Android ? Even if there is one, sadly there is no audio capture feature in Android emulator

    ReplyDelete
  6. Hey, I was able to make a simple User Agent for Android using your stack. Thanks a lot. Until you guys release your version, you can check out mine at: http://tecknolojia.blogspot.com/2008/04/sip-user-agent-for-android.html

    ReplyDelete
  7. Yes, my company completed the SIP UA and RTP port as well (we modified mjsip's RTP basic impl and their UA) and should be releasing it in a couple of days. The sad part however is the android emulator's media component crashes - this has been confirmed as a known problem in the google android dev group. So till they fix it, or we get hold of a google phone device (where I believe the media component works), we can't test voice. Anyway, our next release will have the ported UA and the RTP and media, with RTP and media commented out and essentially untested. the UA has been tested to work with several SIP clients.

    ReplyDelete
  8. Thats very impressive........maybe you could initially stream a media file such as a .wav file....thats what I have been trying to do but without much success. Are you aware of a solution to this problem on Android:

    float fFrameRate=16000.0F;
    AudioFormat format=new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, fFrameRate, 16, 1, 2, fFrameRate, false);

    DataLine.Info lineInfo=new DataLine.Info(SourceDataLine.class, format, INTERNAL_BUFFER_SIZE);

    if (!AudioSystem.isLineSupported(lineInfo))
    { Logg.log("ERROR: AudioLine not supported by this System.");
    }


    This is a code snippet from the AudioOutput class. I am trying to stream a .wav file from Android using RTP. What happens here is that the Line instance created is not supported by the AudioSystem....I guess there is some issue with frame rate/sampling/modulation choice. Can you share with me a solution to this problem or the kind of modulation/frame rate/sampling rate supported by Android. Thanks.....

    ReplyDelete
  9. Do you think I can get a an early look to the RTP Impl? If yes, please email at himanshu ranavat at yahoo dt com

    ReplyDelete
  10. The method AudioSystem.isLineSupported(lineInfo) return false and Android can't play the media in RTP package. Did anyone solve it?

    ReplyDelete
  11. hi sir,

    i have htc G1 Google phone "Android operating system" so i need SIP support any programe, please any body can please send me software me,

    my yahoo : supercom123@yahoo.com

    Thans

    Regarding,

    Riza

    ReplyDelete
  12. hello sir,
    Is it Possible to use sip libraries which are there in j2me in android

    ReplyDelete
  13. Well, you could, but you would need to port it over to Android and build the app using its APIs.

    ReplyDelete
  14. Hello,
    I have a sip stack(full java based proprietary) which is not a complete one.I want to use the sip stack for contructing headers and sip packet on android(which is a requirement actually) in android.How can i extend the sip stack in order to send and recieve invite.Which Api are useful for sending the sip request or making the connection with a sip server from android client.Please Help

    ReplyDelete
  15. Hey All,

    Just got a HTC Dream and was looking into SIP software. Don't see any recent updates here....is this project dead?

    ReplyDelete
  16. Hi, please see sipdroid.org - those folks have taken our initial work and have extended it. All updates will now be at sipdroid.org

    ReplyDelete
  17. Hi, i am using sipdroid on my verizon droid and for incoming it works great but i cant get itto go off hook (am connecting to my toshiba ctx pbx) ...any idas...thanx

    ReplyDelete
  18. Hi Arjun and everybody,

    I’m having problem with the SUBSCRIBE / NOTIFY of mjSIP agent:

    I can send a SUBSCRIBE request to the Presence Server, and the Server responsed with 200 OK msg + a NOTIFY msg. I can get the 200 OK msg, but somehow I can not receive the NOTIFY msg from the Presence Server !!!!

    Can you tell me why ? any idea how to solve this ?

    Any response from you is much much appreciated !
    Thanks,

    ReplyDelete
  19. I see you share interesting things here, you can earn some extra money, your blog has big potential, for the monetizing method, just type in google - K2 advices how to monetize a
    website

    ReplyDelete