Monday, February 23, 2026

Chromaprint for fingerprinting audio

I'm continuing to develop a VOLTS framework for functional testing of VoIP systems. And one of the problems it tries to catch is a no-media issue, which is greatly detected via sox. But better is actually to know that what is sent/received on audio is correct. And sox is really not a good option here.

Luckily, there is a tool called fpcalc, which is part of a chromaprint/AcoustID project, which is actually aiming for this. In other words - fingerprinting audio files. Only thing here - it's not really for for a short files, so better to have long (10-15 seconds) audio samples.

fpcalc was really easy to integrate into VOLTS, so now you can check not only if audio is present, but also if the audio is correct.

More info can be found on the project page and the VOLTS documentation.

Happy testing! 

Tuesday, February 10, 2026

Notes about using $var(...) in Kamailio

Everyone using Kamailio knows that $var() is a tricky beast. If you are not resetting it at the beginning of a script, you might get interesting effects later, or trying to use it with async statements is also not a good idea.

One of the things that tends to be overlooked is that now $null is implemented, despite its description in the documentation.

TL;DR: there is no $null, just a "0" (zero) value.

But one more thing is that an empty string is also not an empty string, but "0". So having  a statement like

uac_replace_from("$var(name)", "...");

will give you actually "0" in a CallerID name if you made something like

$var(name) = "";

before. Tricky beast as is. 

P.S.: To add, $vn(...) will also threat empty string as $null, but in this case will do even worse making From header like

From: <null> <sip:....> 

which is just a malformed header.