Import of support sources from SoboSIP, checked out on 2005/09/11
MfPorta: fix possible segfault.
Whitespace-only: 's|        |\t|g'.
When doing recording buffer data to do writes in bigger chunks, to
avoid creating additional load on the system.
Merge in latest changes from the BSD-licensed project:

1. Allow time-to-live to be altered from the command line;

2. implement poll rate limiting, so that we don't call poll(2) on each and
   every packet;

3. make positive reply be the same in remote and local modes.
Don't leak memory in the case strdup(3) fails.
Free some strdup'ed parameters if memory allocation fails.
Use explicit NULL check.
Reduce diff to the public version.
Add missed includes.
Add code to debug problems with rtpproxy init.
Since we are now opening control socket in non-blocking mode, it opens
race condition between accepting stream connection on unix domain
socket and availability of data on the socket. Patch it by doing read()
in a loop until we actually get the data. While I am here, allow V
command to take extra argument, which we don't process but put into
the log file. This allows to pass some extra information from the
client (SER in this case) such as PID number for example.
Add support for GSM.
Fix on big-endian platforms.
getopt(3) returns int, not char. This fixed build on FreeBSD/powerpc,
apparently char is unsigned there.
Fix rtpp_log_open() macro.
o In remote contatol mode prepend reply for the `i' command with the
cookie;

o display current session count in additional to the count of sessions
created since start.
Merge in makeann changes from the BSD licensed version. Those changes
make GSM/G729 support optional and fix compilation on non-BSD platforms.
Merge in the last two changes from the iptel.org repo:

o Limit number of drain attempts we do to 5;

o change order for traversing list of ready sockets, so that more sensitive
  RTP sockets and handled first and only then less sensitive commands
  processing is performed.
o Add missed include;

o add license into rtp_server.[ch];

o update (c).