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-15 / Second Beta release !

A new beta release of CSipSimple is available on the market.

Some bug fix and some improvements are here... Merely stable version :)

  • Fix force close while making a tel: call and csipsimple not started before
  • Samsung Galaxy S (and I9000) fix for speakerphone
  • IPv6 basic support (doesn't support dns resolution but if you set registrar and proxy with ipv6 address should be fine)
  • HTC Evo tweak for the PSP wifi mode bug from HTC (already fixed for N1 & Desire, but default setting to tweak was not set for Evo )
  • Sipgate & PlanetPhone wizard
  • DTMF Info option in settings
  • DNS SRV support
  • Default stun server (thx goes to ekiga guys that are agree to let us use their stun server as default parameter)
  • Armv4 support
  • New translations (thanks goes to translators that spend time on Launchpad to translate the project !! when written : bg, de, fr, hu, it, nl, pt, ru)
  • Bluetooth for 2.2.1

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

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

Get round corners back in GMail

I'm not really a fan of the round corners. But as it sounds to stress a lot of people ( :p )... There is an easy solution to get the rounded corner back in your GMail... and even better... remove the ads :)

I know that other solution exists (using Greasmonkey for example) but this one is technically interesting and show the power of Firefox

So, first of all, use Firefox :D (use Firefox 4.0 if possible but that's not necessary for the trick)
Go to your user profile :
  • Windows Vista et Seven : C:\Users\UserName\Appdata\Roaming\Mozilla\Firefox\
  • Windows 2000/XP : C:\Documents and Settings\UserName\Application Data\Mozilla\Firefox\Profiles\
  • Windows 9x/Me : C:\Windows\Application Data\Mozilla\Firefox\Profiles\chrome\ or C:\Windows\Profiles\UserName\Application Data\Mozilla\Firefox\Profiles\
  • Windows NT 4.x : C:\Winnt\Profiles\\Application Data\Mozilla\Firefox\Profiles\
  • Unix/Linux : ~/.mozilla/firefox/
  • Mac OS X : ~/Library/Mozilla/Firefox/Profiles/ or ~/Library/Application Support/Mozilla/Firefox/Profiles/
Then go in a folder named [some-random-letters].default/chrome/

Here create a new file named (the name is important) userContent.css
This file will allow you to customize every content shown by Firefox.
In this file paste the following code :

@-moz-document domain(mail.google.com){
.p {
-moz-border-radius-topleft : 10px;
.q {
-moz-border-radius-topright : 10px;

.i {
-moz-border-radius-bottomleft : 10px;
.j {
-moz-border-radius-bottomright : 10px;

-moz-border-radius:5px 5px 0 0;

.z8 {
-moz-border-radius : 5px;

-moz-border-radius:5px 0 0 5px;

.mq {

table.Bs.nH.iY > tr > td:nth-child(3){

table.Bs.nH.iY > tr > td:nth-child(2){


You can notice that the media like query @-moz-document is used. (See http://www.w3.org/TR/css3-mediaqueries/)
This is the same type that @media or @print followed by a query. In this query we specify that we want the enclosed css to be applied only on domain mail.google.com.
Then there is a lot of selector, .i, .j, .p and .q matches the borders divs. (Has certainly previously a rounded sprite background).
.mq match the top ads banner and finally the two last tables td for side ads (not really sure this is a good idea to select these one like that since it can hide other parts of the interface...but for now seems to work at least with my configuration).

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)

HTML5 / CSS3 / SVG experiments

I've made some tests with this promising features of the HTML5, CSS3 and SVG.

Here is my test page : http://www2.r3gis.fr/blog

It's powered by Django (if you don't know this web framework, just try it, you'll never want to rewrite a line in php after that ;) ).

Browser state of the art :

  • Fully compatible with firefox 3.7a5 (nightly build).
  • Chrome(ium) also support it (but i found some bugs in the implementation of HTML5 in webkit, I'll probably open bugs when the site will be finished).
  • Opera 10 support almost everything but not gradient (which has a deep impact since i use it as background).

What I tested :

  • An XHTML page to allow inline SVG inclusion.

This is the way I choose to include my svg button since firefox doesn't support yet <img /> with svg src.

  • CSS 3 gradient background.

It is really easy to use. you can choose your gradient orientation (gecko and webkit doesn't supports the same parameters but it's easy to do anyway)
Another point I noticed (but I may have missed something) is that the gradient is not regenerated when a tag height changed (for example my background) the gradient height is not re-computed and is duplicated at the bottom.

  • CSS 3 transitions (I know in the example i made too much transition on mouse over ;) )

This feature is just fantastic. All javascript is now absolutely useless (javascript frameworks are not so awful now but it's still javascript). Here the only thing you have to do is add a css class and the magic of (-webkit-/-moz-/)"transition" does the transition.
The only thing is missing for me is to allow transition between for example height :0px; and height : auto;. I found a work around by using max-height:0px and max-height;10000px; (where 10000 is a very big value). The transition time is not respected between 0px and the height auto, but at least we have a transition.

  • Canvas with 2d context (I used processing js to make the dev easier). Unfortunately since it doesn't allow transparent background I didn't include it in the example.
  • Inline SVG buttons (I'm a svg fan ;) ).

Thanks to the template system of Django it's easy to include a svg (directly generated by inkscape).
The cool stuff is that doing that, your svg document obey the rules defines in the master CSS. (It could be valuable to change you icon colors for example).
Another cool feature is to use CSS3 transition on your inline SVG !! Wahoo. Just by changing the :over class of my lines in my buttons I make it bolder and I changed the color. Just with a css class, and with a transition.
This feature only works with firefox 3.7 for now. But it introduce a real usage for your svg buttons in the webpage (and besides your buttons are scalable!).

  • CSS 3 border-radius, one of the firstly adopted feature (and waited for since a long). The end of the sprites and of these headaches with multiples divs/table.
  • CSS 3 box-shadow and text-shadow : same as for the last point. One personal note on the cool feature that enable to use multiples shadow and also inset shadows. With this feature you can now render complext generics buttons just using this and gradients. No more bitmap !!!
  • @font-face. What's a pleasure to be able to embed your own font ! You'll be sure that the user will see your website with your font. (There is a bug with chromium when using @fontface and css3 transition although ;) )

What I have not yet tested but that I'll test :

  • CSS 3 transformations (that should allow to deform parts of the webpage)
  • Webgl (canvas with 3d context) demos I've seen are really impressive
  • SVG animations (I know that it is not yet well supported by firefox but should be by chrome... at least for events that starts an animation (i'd like to write the less javascript as possible - not because i don't know how to write javascript to do this kind of stuff, just because I want to experiments new browser features))

Just a last word... If you are using internet explorer..... Go out of there, you're contributing the fact the web is such a poor place.... Download either Firefox, Chrome / Chromium, Safari or Opera....

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 !

File name trick

I was coding a little script that save files names into a file.
To avoid any bug in this script I wondered if there were a way to have a file with \n (carriage return) in their name....

And after some tests...
I found a way to create files with \n in their name...

In fact it's pretty simple :

echo -n -e "test\nsecond line" | xargs -0 touch

Then you obtain a file that name has two line.
It's funny to see how other application behaves with theses files or folder (replace touch by mkdir).
For example gedit tab are shown on several line, nautilus expand its header etc etc.

I think that it could introduce bugs in some applications (from UI layout bugs to crash of an application).

But let me show you something a little bit more fun with this :

for i in A B C D E F G H I J K L M N O P Q R S T U V W X Y Z; do figlet $i | sed "s#/#%#g" | xargs 0 touch; done

It will create a file by alphabet letter with a ASCII art name!!
You can also try with any ascii art generator (from jpeg files). Just be aware of the fact ascii art should not contain "/" char (else it will be consider as path separator) (that the reason why I added a sed in last command).

ASCII art files names

If you find some funny command on the same idea, let me know it :).
(I'm also interested if you find a way to use custom (mono) font in nautilus for file name display ! )

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.


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 :
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){

//Where myWebview is the WebView object

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).


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


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 ... ;)

Website creation

This is the first entry in this blog.

Just for debugging purpose...