3R Technologic

CSipSimple 0.01 has been released !

Pleased to announce that the first release of CSipSimple is now out.

Was planned at the end of the last year but one thing after another I delayed its release to ship more features and more enhancement.

There is two very interesting new enhancements :

* The support of SILK codec. It is the codec developed by Skype. It's very interesting cause can run with low bandwidth (and still high quality) and in HD using a higher bandwidth.

I spent time to understand how to integrate a codec to pjsip cause was my first try to do so. But it will benefits for future codecs ... specially codec2 that I started to implement. Code is here and is almost functional but codec2 is not yet officially available for voip and it's under heavy development :). So for now I will delay its release but if anybody wants to test it's easy to activate in a build ;).

* A completely re-worked method to keep alive the network connection. Previously it was delegated to pjsip. The bad side is that pjsip is not able to add CPU wake locks to android system. As consequence I had to implement an "Alarm" that wake up CPU each x seconds and send a packet on the network to keep the connection alive. The code for that is directly take from the Gingerbread stock SIP application :) and then plug to pjsip system which timers are as consequence disabled.

Among other changes : the voice mails notification support, a way to set codecs priorities per network type, and the activation of the speex accoustic echo canceller (which has to be used only with devices that support vfp : armv7 and upper).

There is a lot of exciting future steps. The more exciting is video... I'm waiting for pjsip 2.0 release to be out officially cause it's a little bit annoying for me to re-merge 2.0 with my changes and with current pjsip trunk. There is also multiple calls management that I have already really well started but not released in 0.01. (Code is there but in background and not accessible for users ;) ).

CSipSimple 0.00-13 / First Beta release !

Great news guys.

CSipSimple is now in beta release aka 0.00-13 available on the market.

Thanks to feedback, tests and help from many users on googlecode many improvements has been done.

We have now a powerful filtering/rewriting/auto-answer engine. It's much more stable; it has a lot of feature now such as proximity sensor, codec reordering, account chooser, fast configuration

Many other feature are planned but for now priority goes to do something stable and reliable. There is also some known issues on some devices (Samsung Galaxy S, SE X10... their audio implementation make things really difficult to do something compatible)

Well if you want to download it : market://search?q=pname:com.csipsimple

CSipSimple Alpha release - Build 12

After a long long long time, I finally decided to release this 0.00-12 version.
It's now available on the market.

There is several improvements and bug fix but it doesn't solve some issues observed on some device.
For example on Samsung Galaxy i7500 or on Sony X10 without update, outgoing calls don't work. If you are in this case, you will observe that there is no input nor output sound.
Then all your phone audios are broken and you'll need to reboot it to retrieve a working phone. I guess that's due to a specific version in the android audio driver.

I'll continue to work on this issue. But there is so much missing thing on the rest of the app.
So right now, a first thing is to fix open issues/bug in the googlecode tracker. I consider that if they appear and are raised by users, it means that should be considered as priority.

Among good news, I've just granted commit rights to a new contributor ! He has already committed really interesting improvements and I hope many other contributors will join us to make the project alive and growing fast with new features and with the best user experience !

So stay tuned. Good things are coming soon.

CSipSimple release 0.00-11 is out

Well yet another release. No big news on this one for users on which it was already running.
For those who had a freeze bug, this release will probably fix things. At least it should not freeze with a non responding phone ;).

The change is a complete rewrite of the audio drive. Previously I used directly C++ audio classes (by including good headers and libs on the NDK) as I considered it's a clean and pretty fast method.
Unfortunately for some reason that I still don't know, it causes freeze on some device (I suspect that it was to fast ;) or that the jvm tried to garbage collect something generated in the native layer).
So after a lot of time wasted spent time to debug the freeze, I concluded that I should use the JVM to create my audio objects (using JNI).
Fortunately, the performance loss is not so huge that I though : the java layer is not fully used : it's just the JNI interface that is used when the method to read/write audio buffers are invoked.

To conclude, for now all feedback I get on this new audio driver is positive. There is only one device on which there is issue : the samsung galaxy spica. But it seems to be related to the java audio management. (The first bug I find on it is the ToneGenerator that go in a deadlock when re-created and the second one seems to be also a deadlock when I try to set the audio route. It has to be debugged, but it's less awful than the previous freezing bug).

Hope you'll enjoy this new version.
Stay tuned, now that I fixed this blocking issue, i'll continue to improve the user interface and the features of the java application :)  !!!

CSipSimple Alpha release - Build 08

After a whole week of hard work.... I'm proud to release the alpha build 08.

A hard focus has been done on User Interface. I've read a lot of code from the android eclair source (and copied some pieces when it was necessary - recoded when I though that android code was too complicated).

I chose to take the latest known look and feel for the interface. Not only because I use android 2.1 but also because I though that it is not a good idea to take a custom interface (with no concordances with the basic Phone application). I chose the nexus one's one because it's the best way to address the more users. Even if they have 2.0.1 interface (with arc unlocker) this unlocker will be ok for them I think. (and why not one day enable plugins/ custom dialers -- that's planned :))

Among other new things I tried to make things a little bit more stable (there is still known possibilities of dead locks but it's more rare). Audio routing has also been improved. (Ringer/InCall mode) DTMF is now fully implemented (it tries the RFC method first and if fails just generate dialtone (using pjsip)).

Some screen-shots for the beauty :)

So what is on my todo list now :

  • Implement Hold call
  • Proximity sensor while in call and screen lock (timer if no proximity sensor)
  • Finalize labels for incoming calls and in call screen
  • Possibility to choose outgoing account (if some) in dialer
  • Re-Have a look for integration to native contacts (if possible I would like to be able to register the 2.1 QuickContact card - I have already look this but seems not so easy to do, so I postponed)
  • Implement phone filters for native outgoing calls (and let accounts override this param)
  • Label / l10n (at least in french for now, and since I'll not be ready for a beta release no other languages will be done)
  • Quick Settings at first start time
  • Native callLog integration
What I already postponed for after the 0.01-xx :
  • Conferences
  • Bluetooth (seems not so easy to handle in fact)
  • ARMv4 support (I'll need a sdk like for these plateforms)
And the point I don't know whether I'll implement since 0.01-xx :
  • SIP SIMPLE support (Buddy List/Status/Display Name) (A good thing would have been to integrate to IMProviders but I've not yet found docs about that point)

CSipSimple Alpha release - Build 06

Well a new release is now available to the market place.

I pushed it a little bit in hurry (so I was obliged to increment by 2 the build number).
The important new feature is not visible for users : it's the use of -rdynamic in link process.
By the way, I hope that it will solve problem I encountered with some manufacturers builds (at least it solves for the Archos 5IT and samsung GTI7500).

Other new features :

  • Integration with native dialer (I should probably add an option to enable/disable it)
  • Sound stream should now be redirected to the good endpoint (earpiece)
  • Added a new wizard basic that aim to make things easier to configure for many users

This week i'm in holiday so the development should progress quickly during this week :). Probably a new release by the end of the week !

CSipSimple Alpha release - Build 04

I've just posted a new release of the application (both in android market place, archos apps lib and csipsimple website).

In this new version there is :

  • Some improvements in the java application. (Network disconnection, battery usage etc... should be better now).
  • Support of 16KHz. This means that even if the media is negotiate to use 8KHz, resampling will provide to the audio layer 16KHz voice, which reduce by half latency.
  • Integration of gsm, speex and g722 codecs. (I've just tested the speex codec, but I'm pretty confident with others since they are managed by pjsip).
  • Auto update sip stack at each update (if needed).

So what are the next steps :

  • Make it more stable
  • Try to integrate the workaround for android 1.5 audio crash at conversation end
  • Add more options (choose codec, priority....)
  • Enable to choose outgoing account for a call (use options)
  • Integration with tel: and with sip: (a plus could be integration with sms or better with our own proto).
  • Improve UI : in call view & screen orientation management.

This will be done for the 0.00-05 (still a FeteDuSip release). After this step, another alpha will provide SIP SIMPLE support. And maybe if legacy issue can be managed without an in app purchase, the g729 codec support (seems to be important for many people).

CSipSimple alpha release soon

Ok, we have something that starts to be a real application.

Tomorrow I'll release the first pre-alpha apk. For now, just a trunk build on something really instable. But this will allow testors/coders/translators etc to join me if they are interested.

This also will enable me to announce the project to PjSIP mailing list and to android community. I think that it's important to have feedback from the beginning to code something that match :

  • User requirements
  • Pjsip core dev advices

A good idea could be to backport my modifications in pjsip stack (about 2 file for android port, and a little hack for freephonie, which should be integrated independently from android port because it cause impossibility to register on server that doesn't allow two registration from the same ip at the same time).

So ... hope next week will be encouraging for csipsimple application.

CSipSimple

Well, a little teasing post :)...

After days of work, I have a first functional version of an application that enable native (C code) sip for Android.
It's based on pjsip and pjsip-jni.

  • Based on latest trunk of pjsip (ie 1.x series). So most features of pjsip are available (see PJSIP features for more informations). Note that VoiDroid was based on 1.0.x series. So i didn't reused VoiDroid code (except some part of port). I prefered to use pjsip-jni as base.
  • Integrated to android NDK toolchain (Some little modifications are made into NDK toolchain to access some private apis that i consider enough reliable).
  • Pjsip patched to work with the french "Free" provider (which uses Cirpack which only allows one account registration). (When i'll released my work, i'll propose to the pjsip core team to integrate my patch)
  • For now my targets are :
   Registrar :
     # Freephonie (from the french Free provider)
     # OCS Alcatel Lucent solution (ECS + OmniPCX Office)
   Android devices :
     # HTC magic
     # HTC hero
     # And soon an Archos IT (i'll recieve one thanks to Archos vouncher)

My first test are really really concluent. Voice quality is almost perfect thanks to pjmedia echo cancellation and the fact that it's native code.

I have open a google code project :
CSipSimple
But for now, as far there is no release, there is no commit (for now it's not usable, and i want to provide something really clean and usable !!)

Android WebView and ssl self-signed certificates

I tried today to code a web application that allow access to a web virtual desktop.

Problem is that this virtual desktop solution could be hosted on a web server with a self-signed certificate. By default, android WebView doesn't allow you to handle ssl certificates fault. (In facts, the default behaviour is to display you a blank screen without asking user if he want to accept certificate).

I well know that unsigned certificates should not be a good way to manage security of a website. But the fact is that in some case, you can afford this little weak.

To resolve this problem under IPhone we have to use a private interface of the webview object. That doesn't ensure us that apple will approve application. Besides, we had to find the trick on a web snippet (and wasn't easy to find).

On android, to solve problem, we will also use private interface (not published on sdk but well present in real java class). Process I use may also be applicable to access any other not published interface.

First step : find the private interface.

Use the fact android source code is open !! http://android.git.kernel.org/ So investigate into Browser source code. Here we discover WebViewClient has a perfect method to handle ssl errors. Browser handle it asking user what to do with certificate.

Second step : get corresponding class source

Well here go the tricky part. We will get real java source code (not the one provided by sdk, but the one that is in java class path at runtime on android). In our case, we have emphasized that WebViewClient is the class we want to hack. So just get it from source from git (WebViewClient.java). You also have to get ../net/http/SslError.java. Luckily, WebViewClient has only this dependency on privates methods. If you want to access WebView apis, you may need to get a lot of files. At this point you have to be aware that if private api are private, they could change ! So check by browsing revisions if privates api/code has not changed between different API versions. What we are about to do is potentially overwrite an existing java class.

Third step : override java class

Now, we will import class into android project. Just replicate packages from sources you get. Source tree

Last step : use private api

That's all folk's ;). Now you just have to use new class.

// It could be a private static member, here just for demo
WebViewClient mWebviewclient = new WebViewClient(){
     public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error){
          handler.proceed();
     }
};

//Where myWebview is the WebView object
myWebView.setWebViewClient(mWebviewclient);

Here I just proceed if i detect an ssl certificate error. A good idea should be to check we are talking to the good website (IP configured into you application, and maybe also consider connection type and maybe finally get certificate to be able to compare later).

TuxAndDroid

I'm proud to present you my first "not an hello world" android application :

TuxAndDroid

It's aim is to control my kysoh tuxdroid from my phone. This is not at release state yet. Just for geeks (those who have tuxdroids... ;) ), able to compile the android project ;)

For now, I think that it's not yet really featured to be released (lack preferences and gestures over droid aren't yet well computed).

In this first project, i appreciated the fact that the java api of tuxdroid has just to be copy/paste to the android project (with some little fixes due to a difference between jdk targeted versions). But after theses little changes made, I could concentrate my efforts to code the android application.

So, vive l'opensource & vive android !

SipDroid and Direct RTP

I tried this week to make SipDroid work within a LAN configuration.

Unfortunately, when your SipPhone, registrar and callee are in the same network, they naturally try to establish direct rtp sockets for media. And this case isn't yet well managed by SipDroid (1.1.3).

I proposed a little hack to make it work for this configurations. This is not fully functional but can be a begin for more work.

Time I spent handling the code of SipDroid make me realize that this project isn't yet really mature and really still in development.

An alternative should be done using for example pjsip and the android ndk. A really interesting approach (previous from any ndk release) has already been explored by the VoiDroid project but seems to be dead.

Could be interesting to develop ... to be continued ... ;)