Table of Contents toctoggle

This SIP forwarding daemon acts as a stateless SIP proxy to essentially forward a SIP address to another SIP server. This is useful if you already have an account with a SIP provider, but aren't too happy about the SIP URL you got and instead prefer to use a SIP URL with your own domain name (but don't want to run a full-blown SIP server like Asterisk or OpenSER).

So it allows you to use and publish SIP URLs of the form with the minimum possible effort.

Of course, your existing SIP provider has to allow incoming connections via SIP (unfortunately, some providers choose to block direct SIP connections and only allow connections via PSTN).


For compiling the source code, you need to have the following packages available (in addition to the standard development environment):

  • SQLite 3
  • The GNU oSIP library
  • UDNS (optional)

UDNS is only needed for DNS SRV support and can be disabled in the Makefile (see -DHAVE_UDNS).

Set Up

In order to run your own SIP forwarding daemon, there are two things to consider:

  • IP address: it is advised to explicitly bind the daemon to a specific IP (or IPv6) address using the -b command line option.
  • DNS: in order to have SIP requests for routed to your SIP forwarding server, you will either have to set up your DNS zone such that A/AAAA records for point to the SIP forwarding server, or add an SRV record for

As an example, have a look at the setup for the domain which has a SRV record:   28800   IN      SRV     10 0 5060

and A/AAAA records for        28800   IN      A        28800   IN      AAAA    2001:6f8:~131c::1

Consequentially, the SIPFwd daemon is bound to these IP addresses using the the -b command line option:

sipfwd -b -b 2001:6f8:~131c::1


Configuration information is stored in an SQLite3 database in the "forward" table. To add a forwarding rule, you simply have to insert it into the database, e.g.

$ sqlite3 /var/lib/sipfwd/sipfwd.db
> INSERT INTO forward (local, remote)
    VALUES ('', '');
> INSERT INTO forward (local, remote)
    VALUES ('', '');
> INSERT INTO forward (local, remote)
    VALUES ('', '');

This will forward any SIP connections for to

Note that the local column has to be specified as username@domain, whereas the remote column has to be specified as a full SIP URI.


For demonstration purposes I have added the users spam and time to the SIPFwd daemon configuration running on (these will seemlessly forward to services provided by Voipfone). So just point your SIP client to and to give it a try...


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

see for full details.