Steve Underwood [Mon, 2 Jul 2012 13:31:04 +0000 (21:31 +0800)]
Various little tweaks to spandsp to stop warnings with newer compilers
Various little tweaks to spandsp to bring it into line with the master versions
Addition of Ademco Contact ID protocol processing to spandsp
adding AUDIT for root Packages response code,
adding media_gateway_cmd_handler.c for all commands related logic/APIs.
adding media_gateway_packages.c to have list of all supported packages.
adding media_gateway_utils.c for all media gateway utility APIs
Travis Cross [Wed, 27 Jun 2012 20:16:46 +0000 (20:16 +0000)]
Don't truncate 5-digit port numbers
The adj_port buffer was only 5 bytes wide, so we were truncating any
port numbers >= 10000 that were written to this variable as snprintf
ensures the last byte is null.
James Zhang [Wed, 27 Jun 2012 16:31:35 +0000 (12:31 -0400)]
ss7: add ss7_iam_nature_connection_hex to support Nature of Connection
Indicator in IAM message.
- ss7_iam_nature_connection_hex is the channel variable to carry
HEX value from/to IAM message
- X-FreeTDM-IAM-NATURE-CONN-HEX is the x-header string to carry
HEX value from/to sip invite message
- This IE is 8 bit hex, which turns into 2 chars
- Only Satellite indicator, Continuity check indicator, and Echo
control device indicator are supported. Spare value are not taken.
Spare value is always set to all zero.
- example:
To set 00010101 (bit H-A), set X-FreeTDM-IAM-NATURE-CONN-HEX string
value to 15 in the sip invite message to NSG.
When NSG send out sip invite, if the incoming IAM message comes with
Nature of Connection IE, NSG will put X-FreeTDM-IAM-NATURE-CONN-HEX
in the invite x-header. For example, if the IE value is 00001010 in
the IAM, NSG will send X-FreeTDM-IAM-NATURE-CONN-HEX with value string
of "0A".
- Two characters are madatory. "0A" must be specified rather than "A". If
invalid format or characters are found, this x-header will be ommited.
- Valid characters include 0-9, A-F, and a-f
Stefan Knoblich [Tue, 26 Jun 2012 19:33:40 +0000 (21:33 +0200)]
ftmod_libpri: Add MSN/DDI filter for incoming calls.
This feature allows ftmod_libpri to ignore calls with non-matching destination number.
You may want to use this on BRI PTMP lines (Point-to-MultiPoint),
to avoid conflicts between your FreeSWITCH server and other devices connected to the line.
The filter is disabled by default (all calls will be accepted),
setting one (or more) "local-number" parameters on the span configuration enables it.
Travis Cross [Fri, 22 Jun 2012 23:16:37 +0000 (23:16 +0000)]
Retry updating base image
If updating the base image fails, retry a few times. If that doesn't
work, simply move on; the update usually fails because Debian is
updating its mirrors; it's not important that we be absolutely up to
date.
Travis Cross [Mon, 25 Jun 2012 06:01:37 +0000 (06:01 +0000)]
Fix confusion between size_t and ssize_t
readfile returns a value of type ssize_t (signed) and returns -1 if an
error occurs. In auth_readdb_internal, however, we were assigning the
return value of readfile to a variable of type size_t (unsigned), but
then testing this unsigned value to see if it was < 0, a
contradiction. We would thus simultaneously fail to report the error
in readfile and would end up with a corrupted length value.
Travis Cross [Mon, 25 Jun 2012 05:57:01 +0000 (05:57 +0000)]
Add missing return statement
sres_cached_answers_sockaddr is supposed to return ENOENT if no cached
records are found. Because of the missing return statement, however,
it would never do this and would instead return something very likely
to be garbage.
Travis Cross [Mon, 25 Jun 2012 05:53:55 +0000 (05:53 +0000)]
Remove a contradiction
base64_d returns a value of size_t, which is unsigned. The value
therefore cannot be less than zero. The second check testing whether
it is >= INT_MAX is not a contradiction, but it doesn't make any sense
to check for this (as far as I can tell).
Travis Cross [Mon, 25 Jun 2012 05:33:24 +0000 (05:33 +0000)]
Implement MEMLOCK and UNLOCK as functions
Converting these macros to functions declared static inline allow the
C type-checker to work and avoid warnings about unused expression
values. These warnings break the build with clang.
Travis Cross [Mon, 25 Jun 2012 05:29:39 +0000 (05:29 +0000)]
Implement su_errno and su_seterrno as functions
This avoid warnings about expressions with unused values. These
warnings break the build with clang.
An optimizing compiler should still inline these calls. If that turns
out not to happen on some platform, we could rename the functions used
internally and declare them static inline.
Travis Cross [Sun, 24 Jun 2012 08:05:25 +0000 (08:05 +0000)]
Fix memset calls in APR sha2 implementation
The implementation clears the context / state data from memory when it
is finished with it. Prior to this commit, however, it was actually
only clearing the first 4 bytes on x86 or 8 bytes on x86_64.
clang warns:
warning: argument to 'sizeof' in 'memset' call is the same
expression as the destination; did you mean to dereference it?
[-Wsizeof-pointer-memaccess]
Travis Cross [Fri, 22 Jun 2012 16:10:47 +0000 (16:10 +0000)]
Harmonize debian nightly version with print_git_revision
Debian nightlies created with debian/util.sh now have the version set
in the same format as Makefile.am produces. Unlike Makefile.am,
however, we show the orig packaging date rather than the date of the
latest commit, as the latter could legitimately regress and we need
this to always increment.
Travis Cross [Fri, 22 Jun 2012 13:25:40 +0000 (13:25 +0000)]
Always set the ZRTP SAS verified flag on our side
When we're terminating ZRTP to an IVR or to a leg which is not
ZRTP-capable, there's no way for us to make an intelligent decision
about whether this flag should be set. For a client to consider the
SAS as verified, however, both sides need to set this flag. By always
setting this flag on our side, we leave the decision completely in the
hands of the client where we hope there is a careful human.
James Zhang [Fri, 22 Jun 2012 21:05:15 +0000 (17:05 -0400)]
ss7: adding ss7_iam_fwd_ind_hex as x-header and channel variables in hex format.
Read the forward call indicator IE and print it into channel variable
ss7_iam_fwd_ind_hex. If this variable exists, put it in the x-header.
This implementation takes bits of A, CB, D, E, F, HG, I from the hex
value. Bits of KJ, L, P-M are not taken and set to 0.
The hex value is H-A-P-I, H is the highest bit to A, and next is P-I.
I is the lowest bit in the whole field, and H is the highest bit in
the whole field. Refer to Q.763 chapter 3.23.