- security tests: responses may have empty SIP URI

don't fail there.
- increase size of call_id for RTP proxy table and
  include a size check.
- rtpproxy: cleaned up some stuff with handling of FD's
This commit is contained in:
Thomas Ries
2003-08-30 15:11:43 +00:00
parent b6b97c0c46
commit d846e2b4c3
8 changed files with 221 additions and 159 deletions
+123 -115
View File
@@ -1,26 +1,34 @@
0.3.5
=====
20-Aug-2003: - security tests: responses may have empty SIP URI
don't fail there.
- increase size of call_id for RTP proxy table and
include a size check.
- rtpproxy: cleaned up some stuff with handling of FD's
0.3.4
=====
05-Aug-2003: - released 0.3.4
31-Jul-2003: - now supports only OSIP2 only (due to rather big changes
in the API libosip -> libosip2). Compiles cleanly w/
05-Aug-2003: - released 0.3.4
31-Jul-2003: - now supports OSIP2 only (due to rather big changes
in the API libosip -> libosip2). Compiles cleanly w/
libosip2 2.0.2
0.3.3
=====
05-Jul-2003: - released 0.3.3
10-May-2003: - rewritten code in proxy_rewrite_invitation_body
should now work (better) with multiple media streams
23-Apr-2003: - FAQ updates: RTP internals
- more debug and error testing (MOREDEBUG)
6-Apr-2003: - build options for FLI4L builds (libc5 & uClibc)
05-Jul-2003: - released 0.3.3
10-May-2003: - rewritten code in proxy_rewrite_invitation_body
should now work (better) with multiple media streams
23-Apr-2003: - FAQ updates: RTP internals
- more debug and error testing (MOREDEBUG)
6-Apr-2003: - build options for FLI4L builds (libc5 & uClibc)
0.3.2
=====
5-Apr-2003: - released 0.3.2
4-Apr-2003: - introduced config option 'silence_log' - this allows
to control how much logging is done to syslog -
5-Apr-2003: - released 0.3.2
4-Apr-2003: - introduced config option 'silence_log' - this allows
to control how much logging is done to syslog -
logging can even completely be switched off...
1-Apr-2003: - should now be able to deal with an outbound interface
1-Apr-2003: - should now be able to deal with an outbound interface
that is "temporary" DOWN (dial up internet access)
if outbounf IF is down, send back a response to
inbound UAs "408 Request Timeout".
@@ -34,49 +42,49 @@
that produced a bunch of "ERROR:Error in close(0): Bad file
descriptor" errors each time a RTP stream timed out
- fixed daemonizing (libc5) - now it properly detaches
30-May-2003: - always log ERROR, WARNING and INFO to syslog (also
30-May-2003: - always log ERROR, WARNING and INFO to syslog (also
if not running as daemon)
- minor corrections on ERROR printouts
0.3.1
=====
- 29-May-2003: - released 0.3.1
- fix in configure.in for statically linking to libosip
- fix in rewriting SIP messages, figure out proper
destination if *not* rewriting the SIP URI
- another NULL pointer related crash (no UA header present)
- 29-May-2003: - released 0.3.1
- fix in configure.in for statically linking to libosip
- fix in rewriting SIP messages, figure out proper
destination if *not* rewriting the SIP URI
- another NULL pointer related crash (no UA header present)
0.3.0
=====
- 29-May-2003: - released 0.3.0
- supports libosip2 (automatically detect osip1/osip2)
- redone authentication - now should work with libosip2
libosip0.8.8 has a bug (fails in parse_msg)
- 28-May-2003: - changes in rewriting SIP messages - not everything
is blindly rewritten now (e.g. SUBSCRIBE is NOT)
- fixed resource leak (sockets) in get_ip_by_ifname
- 26-Mar-2003: - Bugfix: some potential NULL pointers passed to atoi()
of optional fields in SIP message could lead to crash
- 23-Mar-2003: - send 403 FORBIDDEN response to requests addressed
to proxy itself (-> SUBSCRIBE bug)
- 29-May-2003: - released 0.3.0
- supports libosip2 (automatically detect osip1/osip2)
- redone authentication - now should work with libosip2
libosip0.8.8 has a bug (fails in parse_msg)
- 28-May-2003: - changes in rewriting SIP messages - not everything
is blindly rewritten now (e.g. SUBSCRIBE is NOT)
- fixed resource leak (sockets) in get_ip_by_ifname
- 26-Mar-2003: - Bugfix: some potential NULL pointers passed to atoi()
of optional fields in SIP message could lead to crash
- 23-Mar-2003: - send 403 FORBIDDEN response to requests addressed
to proxy itself (-> SUBSCRIBE bug)
0.2.8
=====
- 23-Mar-2003: - released 0.2.8
- made compile with uClibc (see doc/FLI4L_HOWTO.txt)
- 22-Mar-2003: - made compile on SUSE5.3 (libc5)
- added --enable-almost-static feature switch. This will
- 23-Mar-2003: - released 0.2.8
- made compile with uClibc (see doc/FLI4L_HOWTO.txt)
- 22-Mar-2003: - made compile on SUSE5.3 (libc5)
- added --enable-almost-static feature switch. This will
build siproxd statically linked against libosip & pthreads
(for Fli4l use)
- 16-Mar-2003: - ERROR on unknown keywords in config file
- introduced INFO logging
- 16-Mar-2003: - ERROR on unknown keywords in config file
- introduced INFO logging
0.2.7
=====
- 15-Mar-2003: - released 0.2.7
- 9-Mar-2003: - replaced get_ip_by_ifname by simpler code
(still to be *BSD tested)
- removed old host-name based style for in/outbound interface
- 15-Mar-2003: - released 0.2.7
- 9-Mar-2003: - replaced get_ip_by_ifname by simpler code
(still to be *BSD tested)
- removed old host-name based style for in/outbound interface
configuration. This is only done via interface names
- experimental: The host part of UA registration entries
can be masqueraded (mask_host, masked_host config items)
@@ -84,113 +92,113 @@
0.2.6
=====
- 28-Jan-2003: - released 0.2.6
- New Feature: RTP proxy should be able to handle multiple
media stream in the same session (audio + video)
- 21-Jan-2003: - Bugfix: crash in compare_url (MSN Messenger issue)
- 19-Jan-2003: - use of libosip-0.9.3 not possible yet -
- 28-Jan-2003: - released 0.2.6
- New Feature: RTP proxy should be able to handle multiple
media stream in the same session (audio + video)
- 21-Jan-2003: - Bugfix: crash in compare_url (MSN Messenger issue)
- 19-Jan-2003: - use of libosip-0.9.3 not possible yet -
libosip fails in msg_setproxy_authenticate
-> Bug in libosip? to be investigated!
- give IP address in debug for 'received packet'
- give IP address in debug for 'received packet'
- 'WARNING:proxy.c:202 request from/to unregistered UA' now
includes sender and destination url
- 17-Jan-2003: - OpenBSD: do not link against gnugetopt (Luke Renn)
- 17-Jan-2003: - OpenBSD: do not link against gnugetopt (Luke Renn)
0.2.5a
======
- 6-Dec-2002: - released 0.2.5a (major bugfixes)
- Bugfix: interfaces on odd positions (the 1st , 3rd, 5th)
have been skipped during the search (ip by interface)
- Bugfix: MSN messenger 4.6 caused a segfault due to
non supplied username in contact header during
registration. (Credits to Dhiraj Bhuyan for the hint)
Included additional tests in that area.
- 4-Dec-2002: - fixed a major (but stupid) bug in check_vialoop. Siproxd
wrongly claimed to have detected a loop...
- 6-Dec-2002: - released 0.2.5a (major bugfixes)
- Bugfix: interfaces on odd positions (the 1st , 3rd, 5th)
have been skipped during the search (ip by interface)
- Bugfix: MSN messenger 4.6 caused a segfault due to
non supplied username in contact header during
registration. (Credits to Dhiraj Bhuyan for the hint)
Included additional tests in that area.
- 4-Dec-2002: - fixed a major (but stupid) bug in check_vialoop. Siproxd
wrongly claimed to have detected a loop...
0.2.4
=====
- 23-Nov-2002: - released 0.2.4 (feature enhancements)
- BSD: resolved some compatibility issues (sscanf ->
resulted in coredump when reading config file)
should now build on *BSD (tested on FreeBSD 4-7)
- inbound/outbound interfaces now can be specified
by their interface name - this removes the need
for a 'quasi' static IP and restarting siproxd at
change of IP address.
- 13-Nov-2002: - working on portability - goal is building on *BSD
(feedback from Georg Schwarz)
- 23-Nov-2002: - released 0.2.4 (feature enhancements)
- BSD: resolved some compatibility issues (sscanf ->
resulted in coredump when reading config file)
should now build on *BSD (tested on FreeBSD 4-7)
- inbound/outbound interfaces now can be specified
by their interface name - this removes the need
for a 'quasi' static IP and restarting siproxd at
change of IP address.
- 13-Nov-2002: - working on portability - goal is building on *BSD
(feedback from Georg Schwarz)
0.2.3
=====
- 10-Nov-2002: - released 0.2.3 (minor fixes)
- 9-Nov-2002: - make install also installs a sample password file
(/etc/siproxd_passwd.cfg)
- 8-Nov-2002: - string manipulations & data structures: better error
handling on some places.
- 2-Nov-2002: - 'make install' install now a templace config file
(/etc/siproxd.conf.example)
- 24-Oct-2002: - small docu updates in README
- 17-Oct-2002: - fix in ./configure - abort on missing libraries
- 9-Nov-2002: - make install also installs a sample password file
(/etc/siproxd_passwd.cfg)
- 8-Nov-2002: - string manipulations & data structures: better error
handling on some places.
- 2-Nov-2002: - 'make install' install now a templace config file
(/etc/siproxd.conf.example)
- 24-Oct-2002: - small docu updates in README
- 17-Oct-2002: - fix in ./configure - abort on missing libraries
0.2.2
=====
- 12-Oct-2002: - Released version 0.2.2
- '-d' commandline option supersedes config file setting
of debug_level.
- reworked return status from functions - now uses
symbolic values and is more consistent
- added individual user passwords for authentication
- 12-Oct-2002: - Released version 0.2.2
- '-d' commandline option supersedes config file setting
of debug_level.
- reworked return status from functions - now uses
symbolic values and is more consistent
- added individual user passwords for authentication
0.2.1
=====
- 28-Sep-2002: - Released version 0.2.1
- 27-Sep-2002: - first implementation of proxy authentication (for REGISTER)
- 24-Sep-2002: - if daemonized, log to syslog
- 22-Sep-2002: - added access list support for registration and incoming
SIP packets.
- 21-Sep-2002: - added RPM support (Spec File)
- 28-Sep-2002: - Released version 0.2.1
- 27-Sep-2002: - first implementation of proxy authentication (for REGISTER)
- 24-Sep-2002: - if daemonized, log to syslog
- 22-Sep-2002: - added access list support for registration and incoming
SIP packets.
- 21-Sep-2002: - added RPM support (Spec File)
0.2.0
=====
- 17-Sep-2002: - Released version 0.2.0
- 15-Sep-2002: - added functionality to change user ID (drop privs)
after startup (configurable)
- added optional chroot jail (configurable)
- 17-Sep-2002: - Released version 0.2.0
- 15-Sep-2002: - added functionality to change user ID (drop privs)
after startup (configurable)
- added optional chroot jail (configurable)
0.1.3
=====
- 11-Sep-2002: - Fixed a error in the autoconf/automake part of the project.
(scripts subdirectory was missing in the tar.gz archive.
This resulted in an error during ./configure - complaining
about non existent install-sh script)
- startup is more silent - set initial debug level to 0
- 10-Sep-2002: - Some (yea, I know...) -minor- docu updates
- 8-Sep-2002: - Masquerade Contact Headers of inbound clients
(Contact header will be used by the remote SIP
user agent to directly contact the local user agent -
and bypassing the proxy. This of course will *not* work
if the local user agent is located in a private IP range.)
- Performance optimizations in RTP proxy
- Bugfix: now masqueraded clients work with any
SIP port (other than 5060). Before, incoming
requests/responses where always sent to port 5060.
- 11-Sep-2002: - Fixed a error in the autoconf/automake part of the project.
(scripts subdirectory was missing in the tar.gz archive.
This resulted in an error during ./configure - complaining
about non existent install-sh script)
- startup is more silent - set initial debug level to 0
- 10-Sep-2002: - Some (yea, I know...) -minor- docu updates
- 8-Sep-2002: - Masquerade Contact Headers of inbound clients
(Contact header will be used by the remote SIP
user agent to directly contact the local user agent -
and bypassing the proxy. This of course will *not* work
if the local user agent is located in a private IP range.)
- Performance optimizations in RTP proxy
- Bugfix: now masqueraded clients work with any
SIP port (other than 5060). Before, incoming
requests/responses where always sent to port 5060.
0.1.2
=====
- 7-Sep-2002: - Released version 0.1.2
- fixed registration concept (SIP Contact header is not
a *must* to be present in every frame)
- Experimental RTP proxying feature (using pthreads)
- 26-Aug-2002: - Optimized DNS caching
- 7-Sep-2002: - Released version 0.1.2
- fixed registration concept (SIP Contact header is not
a *must* to be present in every frame)
- Experimental RTP proxying feature (using pthreads)
- 26-Aug-2002: - Optimized DNS caching
0.1.1
=====
- 25-Aug-2002: - Released version 0.1.1
- can daemonize (detach and run in background)
- do some DNS caching
- 24-Aug-2002: - Imlemented support for a config file,
- obsoletes siproxd_conf.h
- can daemonize (detach and run in background)
- do some DNS caching
- 24-Aug-2002: - Imlemented support for a config file,
- obsoletes siproxd_conf.h
0.1.0
=====
- 19-Aug-2002: - Released version 0.1.0
- 19-Aug-2002: - Released version 0.1.0
+3 -1
View File
@@ -22,7 +22,7 @@ IP addresses and port numbers.
REQUIREMENTS
============
- libosip-0.8.8 (http://www.fsf.org/software/osip/)
- libosip2-2.0.2 (http://www.fsf.org/software/osip/)
- pthreads (should be part of any Linux distribution)
Up to now, siporxd only has been tested under:
@@ -214,6 +214,8 @@ Thomas Ries (tries@gmx.net)
pub 1024D/87BCDC94 2000-03-19 Thomas Ries (tries@gmx.net)
Key fingerprint = 13D1 19F5 77D0 4CEC 8D3F A24E 09FC C18A 87BC DC94
VoIP: 17476691342@proxy01.sipphone.com
CREDITS
+2 -1
View File
@@ -49,7 +49,8 @@ Reported interoperability (tested with softphones):
- MSN messenger 4.6 (remote and local UA)
Known bugs:
- does not yet work with Grandstream BudgeTone phones,
but I'm working on this.
-----
md5sum for siproxd-0.3.4.tar.gz:
+22 -3
View File
@@ -3,7 +3,6 @@ TODOs, in random order:
- siproxd daemonized: looks like clashes between threads
- Daemonizing: daemon() f*** up a following pthread_create
- is select() really tread safe? libc bug?
- lost 200 ACK immediately before RTP starts...
- TERM handler
@@ -26,11 +25,31 @@ TODOs, in random order:
- get_ip_by_host: reduce DNS timeouts (seems to be a more complex problem...)
- (support for "full duplex" RTP proxying)
- via loop detection: send 482 error code
- support Record-Route header
- feature: don't bind to 0.0.0.0 address, but only to inbound/outbound IF's
(defined by IFNAME)
- support for "full duplex" RTP proxying
- symmetric RTP proxying
This seems to be a more complex issue. It looks like some
SIP phone only do work properly with symmetric RTP data flow:
Phone A UDP-Port X <-> Phone B UDP-Port Y
The following then seems to produce just "silence" (no RX of audio):
Phone A UDP-Port X -> Phone B UDP-Port Y
Phone A UDP-Port X <- Phone B UDP-Port Z
Unfortunately this is the scenario resulting from siproxd's
the RTP proxy...
This we might overcome by introducing a full-duplex RTP proxy that
takes care of this.
An other idea might be to not proxy at all, but inject/open an
UDP masquerading tunnel in the firewall (there exist a C call interface
for doing such things). This would be easier I think - but is then Linux
specific and depends of the kernel (ipchains / iptables, ...)
- maybe STUN support
+1 -1
View File
@@ -28,7 +28,7 @@ dnl Release Version
dnl
SPD_MAJOR_VERSION=0
SPD_MINOR_VERSION=3
SPD_MICRO_VERSION=4
SPD_MICRO_VERSION=5
SPD_VERSION=$SPD_MAJOR_VERSION.$SPD_MINOR_VERSION.$SPD_MICRO_VERSION
+65 -33
View File
@@ -50,11 +50,12 @@ pthread_mutex_t rtp_proxytable_mutex = PTHREAD_MUTEX_INITIALIZER;
/*
* table to remember all active rtp proxy streams
*/
#define CALLID_SIZE 32
#define CALLIDNUM_SIZE 256
#define CALLIDHOST_SIZE 32
struct {
int sock;
char callid_number[CALLID_SIZE];
char callid_host[CALLID_SIZE];
char callid_number[CALLIDNUM_SIZE];
char callid_host[CALLIDHOST_SIZE];
int media_stream_no;
struct in_addr outbound_ipaddr;
int outboundport;
@@ -121,7 +122,7 @@ void *rtpproxy_main(void *arg) {
fd_set fdset;
int fd_max;
time_t t, last_t=0;
int i, count;
int i, count, sts;
int num_fd;
static int rtp_socket=0;
osip_call_id_t callid;
@@ -137,9 +138,29 @@ void *rtpproxy_main(void *arg) {
tv.tv_usec = 0;
num_fd=select(fd_max+1, &fdset, NULL, NULL, &tv);
if ((num_fd<0) && (errno==EINTR)) continue;
if ((num_fd<0) && (errno==EINTR)) {
/*
* wakeup due to a change in the proxy table:
* lock mutex copy master FD set and unlock
*/
pthread_mutex_lock(&rtp_proxytable_mutex);
memcpy(&fdset, &master_fdset, sizeof(fdset));
fd_max=master_fd_max;
pthread_mutex_unlock(&rtp_proxytable_mutex);
continue;
}
#ifdef MOREDEBUG /*&&&&*/
if (num_fd<0) {WARN("select() returned error [%s]",strerror(errno));}
if (num_fd<0) {
int i;
WARN("select() returned error [%s]",strerror(errno));
for (i=0;i<RTPPROXY_SIZE;i++) {
DEBUGC(DBCLASS_RTP,"maxfd=%i",master_fd_max);
if (rtp_proxytable[i].sock != 0) {
DEBUGC(DBCLASS_RTP,"[%i] -> socket=%i",i, rtp_proxytable[i].sock);
}
} /* for i */
}
#endif
time(&t);
@@ -159,15 +180,19 @@ if (num_fd<0) {WARN("select() returned error [%s]",strerror(errno));}
/* read from sock rtp_proxytable[i].sock*/
count=read(rtp_proxytable[i].sock, rtp_buff, RTP_BUFFER_SIZE);
#ifdef MOREDEBUG /*&&&&*/
if (read<0) {WARN("read() returned error [%s]",strerror(errno));}
if (count<0) {WARN("read() returned error [%s]",strerror(errno));}
#endif
/* write to dest via socket rtp_inbound*/
sipsock_send_udp(&rtp_socket,
sts=sipsock_send_udp(&rtp_socket,
rtp_proxytable[i].inbound_client_ipaddr,
rtp_proxytable[i].inbound_client_port,
rtp_buff, count, 0); /* don't dump it */
#ifdef MOREDEBUG /*&&&&*/
if (sts != STS_SUCCESS) {WARN("sipsock_send_udp() returned error");}
#endif
/* update timestamp of last usage */
rtp_proxytable[i].timestamp=t;
@@ -242,6 +267,26 @@ int rtp_start_fwd (osip_call_id_t *callid, int media_stream_no,
return STS_FAILURE;
}
/*
* life insurance: check size of received call_id strings
* I don't know what the maximum allowed size within SIP is,
* so if this test fails maybe it's just necessary to increase
* the constants CALLIDNUM_SIZE and/or CALLIDHOST_SIZE.
*/
if (strlen(callid->number) > CALLIDNUM_SIZE) {
ERROR("rtp_start_fwd: received callid number "
"has too many characters (%i, max=%i)",
strlen(callid->number),CALLIDNUM_SIZE);
return STS_FAILURE;
}
if (strlen(callid->host) > CALLIDHOST_SIZE) {
ERROR("rtp_start_fwd: received callid host "
"has too many characters (%i, max=%i)",
strlen(callid->host),CALLIDHOST_SIZE);
return STS_FAILURE;
}
#ifdef MOREDEBUG /*&&&&*/
INFO("starting RTP proxy stream for: %s@%s #=%i",
callid->number, callid->host, media_stream_no);
@@ -299,25 +344,7 @@ INFO("starting RTP proxy stream for: %s@%s #=%i",
/* outbound port already in use */
if ((memcmp(&rtp_proxytable[j].outbound_ipaddr,
&outbound_ipaddr, sizeof(struct in_addr))== 0) &&
(rtp_proxytable[j].outboundport == i) ) {
#if 0 // redundant code - program flow should never reach this one
/* if the rtp proxy stream is already active (this must then
be a repetition of an SIP UDP INVITE packet) just pass back
the used port number an do nothing more */
if((strcmp(rtp_proxytable[j].callid_number, callid->number)==0) &&
(strcmp(rtp_proxytable[j].callid_host, callid->host)==0) ) {
/* return the already known port number */
DEBUGC(DBCLASS_RTP,"RTP stream already active (port=%i)",
rtp_proxytable[j].outboundport);
*outboundport=rtp_proxytable[j].outboundport;
sts = STS_SUCCESS;
goto unlock_and_exit;
}
#endif
break;
}
(rtp_proxytable[j].outboundport == i) ) break;
}
/* port is available, try to allocate */
@@ -381,12 +408,12 @@ INFO("starting RTP proxy stream for: %s@%s #=%i",
/* prepare FD set for next select operation */
rtp_recreate_fdset();
/* wakeup/signal rtp_proxythread from select() hibernation */
/* wakeup/signal rtp_proxythread from select() hibernation */
if (!pthread_equal(rtpproxy_tid, pthread_self()))
pthread_kill(rtpproxy_tid, SIGALRM);
unlock_and_exit:
/* unlock mutex */
/* unlock mutex */
pthread_mutex_unlock(&rtp_proxytable_mutex);
#undef return
@@ -437,6 +464,14 @@ INFO("stopping RTP proxy stream for: %s@%s",
* !! this minimizes the risk of deadlocks.
*/
}
/*
* wakeup/signal rtp_proxythread from select() hibernation.
* This must be done here before we close the socket, otherwise
* we may get an select() error later from the proxy thread that
* is still hibernating in select() now.
*/
if (!pthread_equal(rtpproxy_tid, pthread_self()))
pthread_kill(rtpproxy_tid, SIGALRM);
/*
* find the proper entry in rtp_proxytable
@@ -484,9 +519,6 @@ INFO("stopping RTP proxy stream for: %s@%s",
/* prepare FD set for next select operation */
rtp_recreate_fdset();
/* wakeup/signal rtp_proxythread from select() hibernation */
if (!pthread_equal(rtpproxy_tid, pthread_self()))
pthread_kill(rtpproxy_tid, SIGALRM);
unlock_and_exit:
/*
@@ -514,7 +546,7 @@ int rtp_recreate_fdset(void) {
int i;
FD_ZERO(&master_fdset);
master_fd_max=0;
master_fd_max=-1;
for (i=0;i<RTPPROXY_SIZE;i++) {
if (rtp_proxytable[i].sock != 0) {
FD_SET(rtp_proxytable[i].sock, &master_fdset);
+4 -4
View File
@@ -62,19 +62,19 @@ int security_check_raw(char *sip_buffer, int size){
*/
int security_check_sip(osip_message_t *sip){
/* check for existing SIP URI */
if (sip->req_uri == NULL) {
/* check for existing SIP URI in request */
if (MSG_IS_REQUEST(sip) && (sip->req_uri == NULL)) {
ERROR("security check failed: NULL SIP URI");
return STS_FAILURE;
}
/* check for existing TO */
/* check for existing To: header */
if (sip->to == NULL) {
ERROR("security check failed: NULL To Header");
return STS_FAILURE;
}
/* check for existing TO URL */
/* check for existing To: URL */
if (sip->to->url == NULL) {
ERROR("security check failed: NULL To->url Header");
return STS_FAILURE;
+1 -1
View File
@@ -145,7 +145,7 @@ struct siproxd_config {
#define URLMAP_SIZE 32 /* number of URL mapping table entries */
#define RTPPROXY_SIZE 64 /* number of rtp proxy entries */
#define BUFFER_SIZE 1024 /* input buffer for read from socket */
#define BUFFER_SIZE 8196 /* input buffer for read from socket */
#define RTP_BUFFER_SIZE 512 /* max size of an RTP frame */
#define URL_STRING_SIZE 128 /* max size of an URL/URI string */
#define STATUSCODE_SIZE 5 /* size of string representation of status */