Freeswitch File Interfaces

– layout: post title: FreeSwitch’s file interfaces –

  • file, file_string in mod_dptools
  • local_stream in mod_local_stream
  • http, https, http_cache in mod_http_cache
  • memcache in mod_memcache
  • av, rtmp, mp4, m4a, mov, mkv, webm in mod_av
  • http, https in mod_httpapi
  • rayo, fileman in...
Read More

Building better CouchDB design functions

I wanted to use npm packages as dependencies for CouchDB design functions in order to re-use code between projects. I also wanted to be able to test my code in Node.js before injecting it into CouchDB. This sometimes happens for...

Read More

Couchdb 2.0

CouchDB 2.0

Testing CouchDB 2.0 using my docker image.

Port 5984 (cluster-port) is operated by chttpd; port 5986 (backend-port) by httpd.

... Read More

Zte F160

ZTE F160 (Free) & gammu

  • Obtenir le SMSC:
  • usb_modeswitch + enlever-remettre le cable une ou deux fois

    [gammu] port=/dev/ttyUSB0 connection=at smscnumber=+33695000695

  • gammu -d textall -f /dev/stderr sendsms TEXT +336..... -unicode -textuf8 "..."
Read More

Node.js/IO.js/npm setup

See for the followings, which basically mean I can npm install -g without worrying anymore:

export NPM_PACKAGES="$HOME/.npm-packages" export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH" 

And then I use:

export PATH="$PATH:./node_modules/.bin:$NPM_PACKAGES/bin" 

Notice ./node_modules/.bin which is a relative PATH entry, which is normally not...

Read More


Use .netrc

Save access to CouchDB servers using .netrc files.

Use .curlrc

At least add -n. Using -s is probably a good idea in scripts.

CDR search

For example, looking for CDRs for 33972470000:

curl --get \...
Read More

OpenSIPS Extras!

Two things in this post. Assuming you run the following code:

 mpath="/usr/lib/opensips/modules" loadmodule "" loadmodule "" loadmodule "" timer_route[log_uptime, 7] { xlog("uptime = $stat(timestamp) , startup = $TS , current = $Ts\n"); } 

through /usr/sbin/opensips -D -E -f...

Read More

git + ctags + coffee-script

I used the .git_template ctags scripts from and combined with ctags definitions for CoffeeScript (to get a more generic version than CoffeTags), for example

Now I can use ctrl-] and :ta.

Read More

Rebuild a Debian Kernel

Basically use the instructions on

Some notes:

fakeroot make -f debian/rules.gen setup_amd64_none_amd64
fakeroot make -f debian/rules.gen binary-arch_amd64_none_amd64
Read More




~/Public/src/umtrx/UHD-Fairwaves/host/utils$ ./ --addr= --fw=../../../ USRP-N2XX found. Hardware type: umtrx Flash size: 8388608 Sector size: 65536 Begin firmware write: this should take about 1 second... Erasing 16383 bytes at 6291456 Writing image Verifying data Read back 16383...
Read More

Jack and PulseAudio

I want Jack as the main interface to the hardware, but PulseAudio is supported by many applications (like 0ad). I finally got things to work; essentially I start jack as usual (using qjackctl at session startup), then I needed to...

Read More

BSC-MSC interface specs


48.002 overview 48.006 DTAP (MS-MSC), part of BSSAP; also MTP/M3UA-lite for BSSAP (SCCP class 0 and class 2) 48.008 BSSMAP (BSS-MSC), part of BSSAP TS 52 series for BSSOMAP (runs over SCCP)


TS 29.002 M3UA

Q.711 SCCP


Read More

Snippets for fs_cli

Remove calls matching a date range:

fs_cli -p CCNQ -x 'show calls' | awk -F, '{ print $3,$1}' | egrep '^2013-05-0[1-8]' | awk '{print "uuid_kill " $3}' | xargs -l -d '\n' fs_cli -p CCNQ -x
Read More

ZappaJS as a generic web server: CGI

Trying to write a tiny web server for munin: #!/usr/bin/env coffee cgi = require 'cgi' require('zappajs') 8080, -> @get '/munin-cgi/munin-cgi-graph*', cgi '/usr/lib/munin/cgi/munin-cgi-graph', mountPoint: '/munin-cgi/munin-cgi-graph' @use static: '/var/cache/munin/www' This uses the cgi package and a static mount point from...

Read More

Gangnam Style Generation

By now there’s an entire generation (of 5-to-11-year old, I’d say) whose first dance moves has been the horse dance from Gangnam Style, and whose first sing-along has been “hey sexy lady”.

Read More
Path :5984 :5986
/ yes yes, with uuid

Installation notes

posted: 2013-02-23 21:21

Read More

Delaying outbound ACK

 # Match customer (destination) based on IP address iptables -t mangle -F POSTROUTING iptables -t mangle -A POSTROUTING -o eth0 -p udp -d -j CUSTOMER # Create table to match "ACK sip" and set a mark. iptables -t...
Read More

Build FreeSwitch .deb

Recent versions (especially from git) may have non-working instructions. This seems to work:

dpkg-buildpackage -b
Read More


Built-in functions: int(x), abs, sin, cos, tan, asin, acos, atan, sqr(x), sqrt, pow(x,y), exp, log, log10, sign(x), min(x,y), max(x,y), sigmoid(x,y), atan2, rand(n>0), band(n,m), bor(n,m), bnot(n), if(n,x,y), equal(x,y), above(x,y), below(x,y), nchoosek(n,m), fact(n), print(…)

Built-in parameters:

 float frating float...
Read More

Firefox Add-Ons I use

For development: Acebug, Cookies Manager+, dotjs, Firebug, JSONView, NoScript, RESTClient

For general browsing: Adblock Plus, Element Hiding Helper for Adblock Plus, NoScript, QrCodeR, ScrapBook. And a couple dictionaries.

posted: 2012-11-10 10:59

Read More

Using local Node binaries

npm allows you to add binaries in the system paths by using the -g option. The installation typically looks like this:

 sudo npm -g install coffee-script 

However this means you need to: (a) be able...

Read More

Reverse proxy with Zappa

Zappa is a Node.js / Express.js web server and framework based on the ideas of Sinatra.

One of the many uses I have had for Zappa includes mixing dynamic content and reverse proxying other Zappa processes and CouchDB....

Read More

ProcessingJS and CoffeeScript

I wanted the background for to be more lively, so I used ProcessingJS and came up with the following CoffeeScript code. (For a demo visit the site.)

 ### (c) 2011 Stephane Alnet ### $(document).ready ->...
Read More


(This is an initial write-up for this project. More description work is still needed.)


I am one of the "fontainier" at l'ASAEP, our local water association. We own and operate our own water sources, pumping stations, distribution network,...

Read More

ANSam vs CED

Thought I should share these.

First a waveform view of two call start tones sent by two different fax machines. The top one is a SuperG3 fax, it sends an ANSam tone (specified in ITU V.8); the first giveaway...

Read More

CouchDB IPv6

CouchDB's configuration's address parameter under [httpd] maps directly to a Mochiweb parameter. It seems it only supports one IP address. So:

 [httpd] address = :: 
will bind to any IPv6 address on the system.


Read More

CouchDB shared calendar

I've posted my version of jchrisa's Calendar CouchApp. It uses the new couchapp framework (evently, CouchDB sessions), CouchDB 0.11.0, and supports timezones, repeat events.

To get it:

 git clone git:// 

You'll need to download...

Read More

ejabberd clustering

I used the excellent notes at the reference article. Here are additional notes for Debian:

  • There's no need to modify /usr/sbin/ejabberd or /usr/sbin/ejabberdctl; the only changes should be in /etc/ejabberd/ejabberd.cfg and /etc/default/ejabberd
  • I did "su ejabberd" instead of...
Read More

Bad Robot

Building on the example script in AnyEvent::XMPP I built a small robot which can send messages to either an individual user or a jabber chat room, from either stdin or a fifo. We use this at work to get...

Read More

Huawei E160E (Orange 3G+) on Debian Lenny

As seen on the Internet:

 # /etc/chatscripts/orange ABORT BUSY ABORT "NO CARRIER" ABORT VOICE ABORT "NO DIALTONE" ABORT ERROR '' ATZ # Check SIM pin should return ready OK-AT-OK 'AT+CPIN?' ## OK-AT-OK 'AT+CPIN="...."' OK-AT-OK 'AT+CGDCONT=?' OK-AT-OK 'AT+CGATT=?' OK-AT-OK 'AT+CGREG=?'...
Read More

Xen and VLANs

Nothing you can't find elsewhere on the Internet in this post, just taking some notes.

This is for Debian Lenny (Xen 3.3). The idea is to connect eth0 to a switch that supports VLANs. The native VLAN is used, along...

Read More

Useful reduce functions for CouchDb

Essentially taking some notes for myself..

  • Count:
     function(keys, values, rereduce) { var count = 0; if(!rereduce) { count = values.length; } else { for(var i in values) { count += values[i]; } } return count; } 
  • Sum:...
Read More

Better FollowMe for FreeSwitch

The problem

The examples for Follow-Me on FreeSwitch had always left me wanted; two issues specifically were pretty frustrating:

  1. Most examples use the common method of doing a bridge command with failover (using the call_timeout channel variable), for example:
Read More


We signed up for Verisign CNAM, so I'm starting to work on the CNAM Query piece of the equation (the CNAM Storage side is relatively straightforward). Specifically the fun Verisign specs (apparently claimed by Verizon under patent application 20080240383).

Read More

CouchDb as FreeSwitch provisioning database

I had the idea of trying to use CouchDb as provisioning database for FreeSwitch, and started with the easiest component, the dialplan. Here’s a short overview of how I did.


I enabled mod_xml_curl module (in modules.conf.xml) and configured the...

Read More

Firefly/mt-daapd network tweaks

Playing with Firefly/mt-daapd tonight, a couple notes:

  • I had to turn IGMP snooping on the switch. (Cool.)
  • On MacOSX if the firewall is configured to block UDP, one has to open UDP port 5353. (Duh.)
  • Custom (arno-iptables-firewall) rules on...
Read More

Recipe for FreeSwitch and RFC2833

I'm using FreeSwitch both to terminate calls (e.g. into and IVR or Voicemail) and switch calls (e.g. between a SIP trunk and a SIP phone or ATA). I try to select endpoints and carriers that do DTMF properly (which I...

Read More