Using sipgate.de on Linux with Linphone SIP client

Note: This is a follow-up blog entry to yesterday’s post about using the Zoiper SIP client on Linux. Linphone works comparably well so far and if I won’t come across any issues, I will recommend Linphone, since it is fully Open Source, which future-proofs is existence and allows others to contribute and improve the software better than for a closed-source product like Zoiper.

Linphone is a GPL licensed SIP client (“softphone”). It has been around since 2001 and is actively developed by the French company Belledonne Communications.

As the name suggests, the software was first developed for Linux but has gradually become truly cross-platform, now supporting Windows, MacOS, Linux, Android, iOS, Windows Phone 8 and most recently a web edition. For most operating systems, simply visit linphone.org and follow the download and installation steps indicated there.

Users of GNU/Linux distributions like Debian, Ubuntu, etc, install the distribution package through their favorite package manager. On my Debian stable (“wheezy”) I did this today:

sudo apt-get install linphone

Then I started up Linphone from the XFCE Start menu, where it is listed in the “Internet” submenu. I canceled the account setup wizard because it didn’t seem to work for me, disabled Video in the Options menu because I am not planning to use it yet, then selected Options – Preferences – Manage SIP accounts and configured my sipgate.de account like this:

Your SIP identity: sip:3998984@sipgate.de
SIP Proxy address: sip:sipgate.de

Screenshot

linphone-sipgate-account

Note that “3998984” is my sipgate.de SIP account name, so you have to substitute it with yours, but note that it is usually not the same as your sipgate.de web login username.

After this initial setup, I successfully tested the account and my headset by calling the sipgate.de test number 10005, which works very similarly to the Skype test call feature.

For personalized config information you can log in at sipgate.de and consult the “Konfigurationshilfe“, selecting one of the Linphone entries from the softphone device lists. I have a sipgate.de basic account, so if you are on a different plan, details may vary slightly.

If this blog post was helpful and/or if something seems inaccurate, please leave a comment. Happy telephoning …

Using sipgate.de on Linux with Zoiper SIP client

I use sipgate.de for international phone calls, using a Grandstream HandyTone IP-to-analog adapter installed in our house, but also using a SIP-capable “softphone” application.

Update: Open Source SIP client software like Linphone, SFLphone, Ekiga or others are preferrable to the below mentioned closed source applications. I successfully use Linphone now, which is also the only Open Source softphone that is explicitly listed by sipgate on their supported devices page.

Below is the original post about Zoiper, which might be of interest if you for some reason don’t like Linphone.


On Windows I have successfully used the PhonerLite freeware (binary download at no charge, proprietary licensed closed-source), which is not available for Linux.

But today I found out, that Sipgate also recommends a SIP client called Zoiper, which is available for Linux. It is also closed-source freeware. But at least – unlike Skype – the installer package has support for 32bit and 64bit Linux systems and the company behind Zoiper seems to develop for all target platforms equally (Android, iOS, Windows Phone 8, Windows, Linux, Mac, Web Browsers).

The Zoiper website has detailed step-by-step installation instructions. To summarize, the installation works like this, assuming the downloaded file is Zoiper_3.3_Linux_Free_32Bit_64Bit.tar.gz :

tar xvzf Zoiper_3.3_Linux_Free_32Bit_64Bit.tar.gz
sudo ./Zoiper_3.3_Linux_Free_64Bit.run

I specified /opt/zoiper as the installation directory.

Then I added an account like this (my SIP account username is 3998984, this is not the sipgate.de web login user name):

zoiper-sipgate-config

The audio devices (speaker, mic) can be configured and tested using the “Audio wizard”:

zoiper-audio-wizard

Is JSP an unsupported deprecated part of JEE ?

Recently, someone claimed that Java Server Pages (JSP) is an “unsupported”, kind of “deprecated” technology and that Java Server Faces (JSF) is the superior current standard.

I responded that JSP is a solid base standard, not deprecated, just not much advertised anymore. In combination with JSTL core logic tags it is still a reasonably powerful option, suitable for straightforward request-oriented web applications.

For example, JSP tag files (pure JSP based tags, no Java coding required) are a great templating feature for easy view structure reuse that many Java web developers don’t even know about because it was only added in JSP 2.0 – as part of JEE 1.4, when newly released JSF was getting all the hype.

JSP is “stable” in the sense that no significant features have been added in recent years. It is hard to find information on what was actually new in JSP 2.3 versus JSP 2.2. Some might say that it is borderline unmaintained because of this lack of changes. Others might just like it as is.

I think JSP is for web applications sort of what the JDBC API is for persistence, whereas JSF is sort of what the JPA standard is: More elaborate, higher-level features, multiple implementations of the standard by different vendors, added (sometimes nerve-wracking) complexity.

On the other hand, the JEE documentation side of things looks pretty bad for JSP (and ironically also for JDBC):

The JEE 5 tutorial still had a full long chapter about all aspects of JSP.

The JEE 6 and JEE 7 tutorials don’t have those chapters anymore and mention JSP only in passing. The documentation focus is clearly on JSF.

The omission of JSP from those JEE tutorials lead some folks on stackoverflow to ask “Where’s the official JSP tutorial” with some interesting answers.

Regarding non-“deprecation” of JSP, please note that the JEE 7 technologies page clearly lists JSP 2.3 as part of the JEE standard.

The reference documentation for JSP 2.3 is the detailed spec of JSR 245, version 2.3, maintenance release 2, available as PDF from the JSP site.

The JSTL 1.2 spec is also available as PDF from its JCP page.

Side note: Maven Central has a javax.servlet.jsp-api artifact, with most recent version strangely marked as 2.3.2-b01, as if it was a “beta” version.

So in conclusion: Certainly there is no buzz around JSP, rather complete silence. You can call that silence a symptom of death or see it as a sign that there is no need or interest to change this still widely used technology anymore.

How does Java’s Object.wait() really work?

Recently, I came across a question whether Object.wait() uses an “infinite loop”.

I didn’t know the answer, but since the JDK is Open Source, I thought I could at least find out where the code is and look at it.

So for example for JDK 7, these are the steps through the OpenJDK sources:

  1. In Object.java wait() calls the native method wait(timeout) via wait(0)
  2. The native code for wait in Object.c actually uses JVM_MonitorWait.
  3. The JVM wrapper method JVM_MonitorWait calls ObjectSynchronizer::wait.
  4. ObjectSynchronizer::wait calls wait() on an ObjectMonitor.
  5. Finally ObjectMonitor::wait does the real work.

I don’t fully understand that code, but I certainly don’t see an infinite loop in there. :o)

Grouping Java skills by categories

I would like to group skill items from typical Java developer resumes – aka CVs – in a somewhat standardized way. See this jsfiddle for some work-in-progress.

I came up with the primary and secondary categories listed below, each with some sample items.

Your feedback is highly appreciated. Please comment on this blog post.

  • Java features and APIs:
    • Configurable JVM feature (Garbage collection, Remote debugging, JMX, etc)
    • Java language feature (Generics, Threads, Annotations, Enums, Lambdas, …)
    • Java SE API (Collections, Date/Time, NIO, java.util.concurrent, …)
    • Java EE API (EJB, JMS, JPA, JSF, JSP, …)
    • Java SE UI (Swing, JavaFX, WebStart, Applets, …)
    • 3rd party Open Source web frameworks (Struts, Wicket, Spring MVC, …)
    • Other 3rd party Open Source framework (Spring, Hibernate, …)
    • Closed-source vendor technology (Java based but no JSR)
  • Java Tools/Servers:
    • Application Servers (Websphere, Weblogic, JBoss, Glassfish, Tomcat, Jetty, …),
    • Developer Tools (IntelliJ, Eclipse, Netbeans, …)
    • Build automation tools (Maven, Ant, Jenkins, Teamcity, Bamboo, …)
    • Profiling and test tools (JVisualVM, SoapUI, JMeter, …)
  • Methodologies (software engineering approaches and practices):
    • Project level: Agile, Waterfall, RUP, …
    • Engineering level: Dependency Injection (DI), Object-Oriented Development (OOP), Continuous Integration (CI), …
  • Relevant non-Java technologies:
    • Web technologies (HTML, CSS, JQuery, JavaScript, SVG, …)
    • Scripting languages (bash, Perl, ksh, Groovy, ruby, etc)
    • Operating systems (Linux, MacOS, Solaris, …)
    • Database servers (Oracle, MS SQL server, Sybase, …)
    • Team tools (Confluence, JIRA, Crucible, …)
    • Other programming languages (C, C++, Cobol, Fortran, Scala, …)

Human readable timestamp for filenames

I use this bash alias (should work in Linux, Cygwin, probably MacOS, maybe other Unixes):

alias timestamp="date --rfc-3339=ns | tr ' '  '_'"

Then use it like this for example to archive a file:

mv somefile somefile_$(timestamp)

You should see something like

`somefile' -> `somefile_2014-11-13_11:45:46.980175800-04:00'

If you don’t like colons in file names, change tr ' ' to tr ' :'.

JQuery: Button to cycle through select options

I wanted an html drop-down list to automatically appear as a simple button that changes color on every click as it cycles through the option values of the (hidden) select element.

The code sample is in this jsfiddle. It uses JQuery.

For each relevant select element, it styles the associated label so it looks like a button, hides the select element and handles clicks on the label button by cycling through the select options.

The display text of each option is used as a tooltip (‘title’ attribute) of the button which also serves as a css selector to color the button according to currently selected option.

The beauty of this is that the selected values of the hidden drop-downs can be submitted by regular form submit and that the form is fully functional if JavaScript is turned off.

The button styling requires CSS3, so IE8 is not suitable. I have tested this successfully in Firefox 33 and IE11.

Design and code visualization

As a team lead at work and for my own good, I want to improve how I visualize system architecture, software design and code structure.

There seem to be at least two angles to this:

  • Show ideas
  • Show (software) reality

For me, ideas often develop top-down, starting from overview level, and require putting something I have in mind on paper or whiteboard, often as a mix of bullet points, sketchy diagram fragments, boxes, ad-hoc dividers and increasingly chaotic arrows.

In the past I have used scans of my paper scribblings or photos of whiteboards to capture the results. But of course, those “snapshots” are not very workable nor professional.

So for idea visualization, I need a flexible yet intuitive mindmapping and/or diagram tool. It should be easy to install or require no installation at all, stylistically appealing but clear, and of course be free/libre open source (i.e. no Visio, please).

I looked at tools like Dia, some online services like LucidChart, and other allegedly free alternatives, and have settled on Pencil Project for now. It is very basic, but seems to provide all I need for now. The cross-platform availability is excellent, it can even be installed as a Firefox extension.

On the other hand, depicting the reality of existing systems and code bases usually requires some sort of generation process that analyzes the real structure, e.g. a network layout, the content of a Java package, an Apache Camel route, etc. and turns it into a renderable file.

For Java source code, I found PlantUML quite interesting, with its javadoc integration and quick dependency diagram support.

I might follow up with more detailed posts about how I use the tools mentioned above. One aspect I have not looked into yet, is how I can embed the visualizations within AsciiDoc.

Java Value Types and Generics specialization

It is exciting to see that Brian Goetz and others are working towards Generics over Primitive Types (List<int> et al) and Value Types (structured immutable data types with value semantics and without object overhead) for Java 10.

The motivation for these initiatives comes from the somewhat clunky divide between objects and primitives in Java.

Objects are the only choice in Java when it comes to collections content and generic type instantiation in general. There is no such thing as List<int> in Java right now.

Objects are also the only option for structured data in Java, including simple aggregation. There are no structs, no tuples, etc. And because the primitive types in Java cannot be “primitively” extended, combined or range restricted, even things like complex numbers, unsigned ints, big decimals and the like all require classes and objects to represent the values.

Arrays are the only way to aggregate a bunch of primitives (of the same type) in Java. But Arrays themselves are objects, with reference identity not value identity, and cannot be used as a substitutes for tuples.

Object purists might argue that Java should just get rid of primitives altogether and strictly follow the “everything is an object” paradigm.

But objects bear management overheads in terms of memory and processing time, bring complexity around identity versus equality, require reference checking for garbage collection purposes, cannot live on the stack, lead to array data in non-contiguous memory, etc.

As the Java architects point out, there currently is an unsolvable conflict between object identity and value semantics in Java: Even if objects a1 and a2 of immutable type A have completely identical state, the JVM cannot treat them as identical “values”, because synchronization relies on monitor object identity, and A1 and A2 would represent separate independent locks. Conflating them into one “value object” would break that distinction.

All this suggests that Java needs to be extended to support structured types with value semantics, conceptually somewhere between primitives and objects. Hopefully Java 10 will come with such types and hopefully smart engineers like Brian Goetz will make sure the resulting type system won’t feel like an incoherent Frankenstein monster.