Commit Graph

6288 Commits

Author SHA1 Message Date
Stefan Knoblich ab285ace3d FreeTDM: Improve error checking and logging in load_config(), add FTDM_SPAN_IS_DIGITAL() helper.
Output the current trunk_type in "add X-channel vs. trunk_type" error messages and
check this for B-/D-channels too.

ISDN (= digital) spans need to have a trunk_type set before adding channels,
bail out early with an error message (actually two) if this is not the case.

(Adding channels should really be moved out of the parsing loop, to catch
 certain types of errors easier.)

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 20:32:34 +02:00
Michael S Collins eb7e640b59 Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch 2012-07-11 11:10:33 -07:00
Michael S Collins fbfa31d2d1 Add dump_events.pl script 2012-07-11 11:10:24 -07:00
Stefan Knoblich 7a12804577 FreeTDM: Add trunk mode (NET/CPE) to span configuration in freetdm.conf and use it in ftmod_misdn and ftmod_libpri.
Some I/O implementations (e.g. mISDN) need this information to correctly
set up the port configuration. In FreeTDM, the mode of a span has been.
up until now, a part of the signalling module configuration ("node" or "mode"
for libpri and isdn spans), which is parsed _after_ the I/O part of a span
has been initialized. This limitation currently prevents us from using mISDN
in NT mode.

To work around this problem (without adding a lot of new tunk_type values like "E1_NET" etc.),
add a new "trunk_mode" parameter to the span categories in freetdm.conf, which by default
is "CPE" for all trunk types, except "FXS" (which defaults to "NET").

ftmod_misdn uses trunk_type + trunk_mode to correctly choose the d-channel protocol
for a port.

ftmod_libpri uses trunk_mode as a hint for the default "mode" setting.
(NOTE: It will print a warning if trunk_mode and signalling mode do not match.)

All other modules currently ignore the value of trunk_mode.

Example freetdm.conf snippet for a mISDN span in NET/NT mode
(using a HFC-S USB dongle):

  [span misdn MBRI_1]
  trunk_type => BRI_PTMP
  trunk_mode => NET
  b-channel  => HFC-S_USB.1:1-2
  d-channel  => HFC-S_USB.1:3

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 19:15:35 +02:00
Stefan Knoblich 61cfafe6c2 FreeTDM: Move custom backtrace code into ftdm_backtrace_walk() and helper functions.
Portability fix for uClibc and other (linux) environments that lack execinfo.h.

ftdm_backtrace_walk() and related return FTDM_NOTIMPL and print a message
if backtraces are not available in the current environment.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 17:25:58 +02:00
Anthony Minessale 6c406aa0d9 add wait handler to forking code in ivrd 2012-07-10 13:32:35 -05:00
Anthony Minessale 27155bcb71 come to ClueCon its in one month 2012-07-10 12:05:26 -05:00
Jeff Lenk fa1276d949 FS-4219 --resolve 2012-07-08 09:10:28 -05:00
Moises Silva c81e20475f freetdm: Try to be more foolproof when creating an iterator for an empty span
to avoid triggering asserts later
2012-07-06 18:43:03 -04:00
David Yat Sin f509b708a7 Freetdm: Fix for 64-bit check on Ubuntu 2012-07-06 15:23:37 -04:00
David Yat Sin 4ead147e10 chlog:Support for send-connect-ack parameter 2012-07-06 12:15:48 -04:00
Stefan Knoblich a5e1101302 ftmod_libpri: Add doxygen documentation for new MSN/DDI filter functions.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-06 11:08:34 +02:00
David Yat Sin 3ad41603d0 Merge branch 'releases.3.4' of ssh://git.sangoma.com/smg_freeswitch into releases.3.4 2012-07-04 17:52:37 -04:00
Steve Underwood 4a200ce3a0 More tweaks for spandsp. 2012-07-04 23:57:30 +08:00
Steve Underwood 2b75169c07 A lot of tweaks to clean up some inconsistencies in spandsp. They should
have no functional effect.
2012-07-04 22:51:46 +08:00
James Zhang 64f33c25da ss7: fix on last fix, make enough memory for bad encode cases 2012-07-04 10:09:19 -04:00
James Zhang edd718d258 ss7: fix a wired crash on remind ticket 4972
- change dynamic memory allocation/deallocation to char array
2012-07-04 10:00:23 -04:00
Michael Jerris 6068534c8e add to make sure config dir is there for AC_CONFIG_AUX_DIR 2012-07-02 17:46:21 -04:00
Anthony Minessale b2df2ee1d7 FS-4376 --resolve update and repeat 'make spandsp-reconf' 2012-07-02 14:24:23 -05:00
Jeff Lenk 7f41862156 build fix for recent spandsp commit - windows 2012-07-02 09:04:15 -05:00
Steve Underwood 5c259f26d2 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
2012-07-02 21:31:04 +08:00
David Yat Sin 24a458683a Skip filling locPtyNum if caller_data->loc.digits is NULL 2012-06-29 12:54:09 -04:00
James Zhang 80f72823b3 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
2012-06-27 12:31:35 -04:00
Stefan Knoblich c92a55d3f1 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.

Example configuration snippet:

   <libpri_spans>
      <span name="example01">
         <!-- ... other span settings omitted ... -->
         <param name="local-number" value="123456"/>
         <param name="local-number" value="654321"/>
      </span>
   </libpri_spans>

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-06-26 21:53:20 +02:00
Stefan Knoblich 1ae88d51d0 ftmod_libpri: Move service_change_status_t down into #include guard area.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-06-26 21:53:20 +02:00
Travis Cross 5fd025eb66 Update AUTHORS 2012-06-25 08:51:49 +00:00
Travis Cross b8109bde58 Bootstrap bnlib without warnings or errors 2012-06-25 08:50:00 +00:00
Travis Cross 3b2df07f3e Fix bnlib call to AC_INIT 2012-06-25 08:48:19 +00:00
Travis Cross 95c26f9a6b Remove outdated autoconf tests in bnlib 2012-06-25 08:48:11 +00:00
Travis Cross 3f24ef16b1
Avoid -Wunused-value warning
Don't use the SET_STATUS1 macro as it will always produce this
warning.  It's a rather 'interesting' macro that's probably best
avoided anyway.
2012-06-25 06:41:00 +00:00
Travis Cross cbde2faab2 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.
2012-06-25 06:38:30 +00:00
Travis Cross e6629ab5f6 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.
2012-06-25 06:38:30 +00:00
Travis Cross 5077384c5b 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).
2012-06-25 06:38:30 +00:00
Travis Cross 76a26648d4 Remove a tautological conditional
SU_LOG->log_level is declared as unsigned, hence it will always
be >= 0.
2012-06-25 06:38:29 +00:00
Travis Cross 9e52f33d91 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.
2012-06-25 06:38:29 +00:00
Travis Cross c01a142665 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.
2012-06-25 06:38:29 +00:00
Travis Cross 43f2c89a08 Fix memset calls in sofia-sip
These calls were zeroing only a pointer's worth of memory rather than
the actual size of the objects.
2012-06-25 06:38:29 +00:00
Travis Cross 3c2f914617 Fix warnings in sqlite 2012-06-24 08:34:52 +00:00
Travis Cross 932dccd475 Return const char* from apr_pool_tag
clang warns:

  warning: returning 'const char *' from a function with result type
    'char *' discards qualifiers [-Wincompatible-pointer-types]
2012-06-24 08:15:16 +00:00
Travis Cross a973fb6347 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]
2012-06-24 08:05:25 +00:00
Anthony Minessale 76fae0cec0 add video support to lib/mod.dingaling this needs testing, google voice won't work with video calls so disable video codecs if you use that 2012-06-22 18:15:06 -05:00
James Zhang 607da0f56c 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.
2012-06-22 17:05:15 -04:00
Mathieu Rene 294ab3880f fix conflict 2012-06-21 10:40:57 -04:00
Mathieu Rene 79702bc0d2 start implementing command handlers 2012-06-20 21:34:04 -04:00
David Yat Sin b44bcd5763 Added core spanflag CLI command 2012-06-20 16:28:00 -04:00
David Yat Sin b980f47097 Merge branch 'nsg-4.3' of ssh://git.sangoma.com/smg_freeswitch into nsg-4.3 2012-06-20 13:21:22 -04:00
David Yat Sin 8da3d119ab Added display of M2UA signalling channels for CLI command show status 2012-06-20 13:20:35 -04:00
Mathieu Rene 1720e4f072 Merge branch 'nsg-4.3' of git.sangoma.com:smg_freeswitch into nsg-4.3 2012-06-20 12:31:07 -04:00
Mathieu Rene 43ffafcb4b wrong operand to sizeof 2012-06-20 12:30:37 -04:00
Mathieu Rene 166249b0b9 Check in TDM and RTP controllable channels (incomplete) 2012-06-20 12:30:08 -04:00
kapil 7b97ff470f adding "xmlshow m2ua <m2ua_interface_name> clusterstatus" CLI command. 2012-06-20 13:53:51 +05:30
kapil 2512694e43 removing warnings 2012-06-20 12:12:28 +05:30
David Yat Sin a54ec05fdb fix for compilation error on 64-bit 2012-06-20 02:06:31 -04:00
David Yat Sin 6aa8c9b80d freetdm: Improvements to ftdm core flag CLI command 2012-06-19 22:35:37 -04:00
David Yat Sin 0a9f34aa09 Fixed compile issues again on 32-bit 2012-06-18 15:27:45 -04:00
David Yat Sin 0cefb8d633 Fixed compile issues again on 32-bit 2012-06-18 15:01:08 -04:00
David Yat Sin 56c8534827 Fixed compile issues again on 32-bit 2012-06-18 14:34:12 -04:00
David Yat Sin 32106afc43 Fixed compile issues again on 32-bit 2012-06-18 12:51:38 -04:00
kapil 3b4c725b1c fixing cli issues 2012-06-18 17:41:05 +05:30
kapil 6b542763d9 Merge branch 'nsg-4.3' of ssh://git.sangoma.com/smg_freeswitch into nsg-4.3
Conflicts:
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c
2012-06-14 15:45:51 +05:30
kapil 69197b1d0c fixing cli issues 2012-06-14 15:40:57 +05:30
David Yat Sin 2112375e07 re-adjusted parameter names 2012-06-12 20:19:37 -04:00
David Yat Sin 143fb61bdb re-adjusted parameter names 2012-06-12 20:12:27 -04:00
David Yat Sin feaadd2f43 re-adjusted parameter names 2012-06-12 19:29:07 -04:00
David Yat Sin 055dc8bc4b re-adjusted parameter names 2012-06-12 19:15:14 -04:00
David Yat Sin 8880793174 Removed include for switch_utils.h 2012-06-12 18:47:53 -04:00
David Yat Sin ba17ae3f10 Fix for compile warnings 2012-06-12 18:32:58 -04:00
David Yat Sin bdaead271d Fix for compile warnings 2012-06-12 18:18:14 -04:00
David Yat Sin b22a4b566a Fix for some compile warnings 2012-06-12 18:07:42 -04:00
kapil 58dc659fbb adding code based on modified xml and cli code changes (rename the m2ua cli command to
"xmlshow" and adding cli code to show sctp state also in m2ua peerstatus command)
2012-06-12 18:43:01 +05:30
Travis Cross c85c8d7bbd
Add mechanism to set OpenSSL session timeout
In a sofia profile, you can now set the parameter tls-timeout to a
positive integer value which represents the maximum time in seconds
that OpenSSL will keep a TLS session (and its ephemeral keys) alive.

This value is passed to OpenSSL's SSL_CTX_set_timeout(3).

OpenSSL's default value is 300 seconds, but the relevant standard
(RFC 2246) suggests that much longer session lifetimes are
acceptable (it recommends values less than 24 hours).

Longer values can be useful for extending battery life on mobile
devices.

Signed-off-by: Travis Cross <tc@traviscross.com>
2012-06-11 21:46:05 +00:00
David Yat Sin 91f9374a9f Added code to treat sngss7_config section (same as sng_isup) 2012-06-11 13:23:37 -04:00
Travis Cross b735735ea1 gitignore a symlink we're creating in ldns 2012-06-11 18:06:00 +00:00
kapil 8102c1603c adding src/peer port into xml config 2012-06-11 18:45:56 +05:30
kapil 69bada7025 removign sctp/peer id from <m2ua_interface> config xml block 2012-06-11 12:43:08 +05:30
David Yat Sin 07a1093cf4 Fix for NFAS when one of the d-channels are down 2012-06-06 20:41:48 -04:00
Viktor Krykun 2c9e1454fe various bug fixes in libzrtp
* fixed bug with remote hello-hash buffer being too small
 * removed unused hello-hash storage in zrtp stream context
 * fixed bug with libzrtp rendered "empty" SAS hash from incoming
   SasRelay packet
 * incremented libzrtp version number to 1.15

Signed-off-by: Travis Cross <tc@traviscross.com>
2012-06-06 00:20:15 +00:00
kapil e4bd524b7d adding peerstatus and logging enable/disable CLI command 2012-06-05 21:33:13 +05:30
Jeff Lenk a065cf8631 FS-4219 --resolve correct windows version 2012-06-05 08:44:22 -05:00
kapil 2b5875a258 adding M2UA/NIF CLI commands 2012-06-05 17:12:16 +05:30
kapil 117cbc1bf5 adding SCTP status CLI command 2012-06-04 22:52:26 +05:30
David Yat Sin eb0404d025 Merge remote branch 'fsorig/master' into releases.3.5
Conflicts:
	build/modules.conf.in
	libs/freetdm/mod_freetdm/mod_freetdm.c
2012-05-31 13:57:42 -04:00
David Yat Sin e05bd3fae8 Some changes to ss7 variables to be more consistent 2012-05-30 13:10:04 -04:00
kapil a3995ad16e Merge branch 'nsg-4.3' of ssh://git.sangoma.com/smg_freeswitch into nsg-4.3 2012-05-30 20:22:08 +05:30
kapil f1f78a8653 adding m2ua stack free code while unloading freetdm module 2012-05-30 20:20:58 +05:30
Kapil 889a0be2b3 issue fix 2012-05-30 16:41:31 +05:30
kapil 69501d091c adding M2UA configuration/alarm handling code 2012-05-30 12:31:25 +05:30
kapil d3c8429af9 Merge branch 'nsg-4.3' of ssh://git.sangoma.com/smg_freeswitch into nsg-4.3 2012-05-30 07:47:07 +05:30
kapil 076d9fbe67 M2UA xml configuration parsing code 2012-05-30 07:45:59 +05:30
Anthony Minessale 8bb55ed4bf abstract out originate_signal_bond to a function to avoid confustion and regressions 2012-05-29 13:10:15 -05:00
Kapil a941cad15d adding M2UA SG open endpoint request code 2012-05-29 15:06:25 +05:30
James 91dfa062bf ss7: adding iam_fwd_ind_HEX channel variable to set forward indicator
IE's heximal value.
     - add <action application="export" data="freetdm_iam_fwd_ind_HEX=2301"/>
       to dialplan with expected hex value. If the outgoing ftdm channel's
       forward indicator needs to be changed, "export" needs to be put in the
       incoming channel's dialplan to set this variable value accordingly.
     - 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 from the hex.
     - How to calculate hex value with wanted bits:
       . 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.
       . use a text pad to fill in the bits with 0 and 1. eventually fill all
         the 16 bits
       . copy the binary value into a calculator and convert it to hex
2012-05-28 17:07:52 -04:00
Anthony Minessale 452e1d8271 FS-4249 --resolve 2012-05-25 07:54:11 -05:00
Anthony Minessale 0a70ea3e09 scgi updates 2012-05-23 13:12:32 -05:00
Anthony Minessale 4b2e7fc1f2 perl update 2012-05-23 11:31:17 -05:00
Anthony Minessale bb3f72cb66 add perl wrapper to scgi 2012-05-23 09:37:54 -05:00
David Yat Sin e91e4d6816 renamed sip_h_X-FreeTDM-Access-Transport to sip_h_X-FreeTDM-Access-Transport-URLENC 2012-05-18 09:57:51 -04:00
kapil 4a99dc7fc7 added code to ftdm_sangoma_ss7_run api to avoid code execution for M2UA
SG
2012-05-18 12:24:27 +05:30
kapil 23ca7f8fed adding m2ua stack config/control code 2012-05-18 12:05:25 +05:30
James Zhang ce46a57b85 ss7: Adding support of Access Transport IE in IAM message
Adding sip x-header and channel variable to set the value
     of Access Transport IE
2012-05-17 17:56:50 -04:00
Jeff Lenk b65c321193 FS-4228 --resolve add zrtp support to windows vs2010 build 2012-05-17 08:38:11 -05:00
Travis Cross 6da083551e libzrtp: fix spelling in log message 2012-05-15 22:28:18 +00:00
Travis Cross c2a74240ee libzrtp: fix client-side enrollment
It appears that libzrtp would prevent a non-passive client from
enrolling with a PBX because of a broken license mode comparison.

Thanks to Ivo Kutts for the report.

FS-4223 --resolve
2012-05-15 22:28:18 +00:00
Jeff Lenk a7c85c804a FS-4219 --resolve 2012-05-15 09:18:02 -05:00
Anthony Minessale ec0f4c9f6c FS-4218 --resolve 2012-05-14 09:47:42 -05:00
Travis Cross c77d9a18dd spelling fix 2012-05-12 18:53:00 +00:00
Anthony Minessale aedbd06b99 fix warning 2012-05-10 11:01:30 -05:00
Anthony Minessale f917cbe29b add server side to scgi 2012-05-10 08:23:23 -05:00
Anthony Minessale 6bb33d7683 add libscgi (SCGI Client) 2012-05-09 14:05:03 -05:00
Jeff Lenk 4fbf8625ed OPENZAP-183 --resolve 2012-05-09 09:20:10 -05:00
Moises Silva 105ce9ff33 Fixes before merging sangoma repo with upstream 2012-05-07 16:26:48 -04:00
Moises Silva 1f08e2b0ec Merge remote branch 'fsorig/master' 2012-05-07 15:46:08 -04:00
Moises Silva f316f9307f freetdm: First GSM working version
- Manually merging latest code from gideon.gsm branch after review/inspection/modifications
2012-05-07 15:35:13 -04:00
Moises Silva cf9f937079 Merge branch 'master' into gsm.merge 2012-05-07 15:15:44 -04:00
Moises Silva cc79163da3 freetdm: refactor ftmod_gsm.c code to use proper core functions and interrupts to wait for io and state changes 2012-05-07 15:13:26 -04:00
Moises Silva de98034145 freetdm: - Extend ftdm interrupt object to notify which IO events are ready in the device
- Add definition of FTDM_MAX_SIG_PARAMETERS to have a standard limit for signaling module parameters
2012-05-07 15:13:26 -04:00
Moises Silva 06eee95da8 freetdm: update ftmod_gsm.c to match latest libwat changes 2012-05-07 15:13:26 -04:00
Gideon Sadan c268b388a7 freetdm: GSM - Finish adding status command + stabilizing 2012-05-07 15:13:21 -04:00
Gideon Sadan f891fefcb1 freetdm: GSM read and write initialization 2012-05-07 15:11:58 -04:00
Gideon Sadan 9cb67dd0c7 freetdm: initializing wat library interface 2012-05-07 15:11:01 -04:00
Moises Silva 412c808e0c freetdm: Added GSM module skeleton 2012-05-07 15:10:25 -04:00
David Yat Sin 67c43a0759 Initial commit 2012-05-04 18:42:59 -04:00
Ken Rice 0eca328f48 white space cleanup 2012-05-03 18:55:06 -05:00
Anthony Minessale 8664dc6d5a some perfomance tweaks 2012-05-03 16:31:21 -05:00
Anthony Minessale 163fffb3e8 fix issue with threaded ivrd, forking is back by default but threaded can be chosen with -t; in both modes the fd number is not passed as the first arg to the program but in threaded mode the stdin will no longer be mapped to the socket you will have to get the first command line arg instead of fileno stdin 2012-05-03 13:13:48 -05:00
David Yat Sin 428340830b Fix for not handling T302 timeout in NET mode 2012-04-29 11:33:24 -04:00
David Yat Sin 5226489c39 Merge branch 'releases.3.4' into releases.3.5
Conflicts:
	libs/freetdm/mod_freetdm/mod_freetdm.c
	libs/freetdm/src/ftdm_state.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c
2012-04-26 16:13:26 -04:00
Anthony Minessale b553d62fbd add sip_require_timer=true variable to enable require timer on session refresh that breaks finicky endpoints 2012-04-26 10:35:02 -05:00
Ken Rice 7a147e4762 Update a ton of copyright statements to make sure the dates are proper 2012-04-25 17:14:55 -05:00
Michael Jerris 7d3816dbea silence set but not used 2012-04-25 15:19:47 -04:00
Michael Jerris ba4280e61f try to add a tag to disable timer autorequire NUTAG_TIMER_AUTOREQUIRE(0) 2012-04-25 15:15:32 -04:00
Ken Rice c5554eb939 Copyright date update. 2012-04-18 11:52:02 -05:00
James Zhang 4f5a6557fc freetdm: fix queue full problem
- restore flushing queue when channel state goes to down
2012-04-18 10:52:01 -04:00
Michael Jerris e9abdac010 attempt to fix ldns install-sh correctly 2012-04-17 23:05:48 -04:00
Michael Jerris 2f9889624f AC_REQUIRE_AUX_FILE is not available in all versions of autotools 2012-04-17 22:30:28 -04:00
Michael Jerris 215d8921a1 please stop removing libs/ldns/install-sh if you can't make it actually work on all platforms. This is the second time I have had to erevert this 2012-04-17 21:48:49 -04:00
Travis Cross 315c0e4c0d ldns: fix bootstrap on automake 1.10 2012-04-17 23:32:34 +00:00
James Zhang e2f1b4ab27 freetdm: fix REL receiving leg always stay in TERMINATING stae in
native bridge mode
         - This is supposed to be included in commit of
           b324f86797. Somehow it's
           not included in that commit. Without this change, the
           REL receiving leg always stay in TERMINATING state when
           received an incoming REL message.
2012-04-16 13:48:35 -04:00
Anthony Minessale ecfe3263e2 FS-4114 --resolve this bug is actually in libsndfile, if its not fixed in the latest version we probably should report it upstream 2012-04-16 11:55:52 -05:00
Stefan Knoblich 997550c511 ftmod_libpri: Check for required features in configure and remove old-style log callbacks
Non-PRI_NEW_SET_API logging callbacks were only available in libpri-1.0 and older,
which also lacks PRI_IO_FUNCS (required) and wouldn't work anyway.

Explicitly check for both PRI_* feature defines at configure time and reject libpri
versions that lack them.

Remove the non-PRI_NEW_SET_API logging callbacks in ftmod_libpri.c.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-04-14 01:39:25 +02:00
Stefan Knoblich 020724e103 ftmod_libpri: Improve libpri message logging.
Use the PRI_NEW_SET_API define provided by >=libpri-1.2 to distinguish
between old style and new style pri_set_error() and pri_set_message()
callback functions.

Improve message logging by using ftdm_log_chan() if per-span
data with a valid (d-)channel object is available.
NOTE: pri_get_userdata() returns NULL if pri is NULL.

This will reduce the horizontal space for libpri output a bit, but allows
us to see which span the message/error came from.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-04-14 01:13:22 +02:00
James cd2d67ace1 freetdm: fixed group block/unblock state dead lock when signal link
is down and recovered later
         To re-produce this bug:
             1. do CGB on one side
             2. unplug signaling link cable
             3. plug signaling link cable back
             4. do CGU on the blocking side
             5. cic state stay in RESTART for ever
         Fix this problem by sending cic to SUSPENDED state after
         receiving/sending CGU message
2012-04-13 17:26:48 -04:00
Brian West f263c0518e up this limit 2012-04-13 11:39:03 -05:00
James Zhang a796c6849c freetdm: fixed no ACM/CPG sending in some situations after native bridge
- clear up ACM_SENT & CPG_SENT flag in DOWN state in native
           bridge state machine
2012-04-13 11:18:53 -04:00
Stefan Knoblich 5f38a7f857 ftmod_misdn: Remove unused timerfd code.
Timer-based b-channel tx gating won't work anyway, so remove all those
"#if 0"-ed bits of cruft.

Also remove the mISDN-specific timerfd_create() check in configure.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-04-12 13:08:57 +02:00
James Zhang 8d1c382632 freetdm: INR/INF implementation
- fill in IEs in INF according to INR request
         - print debug information if IE requested but not supported
2012-04-11 15:14:29 -04:00
James Zhang 16d4f1f063 freetdm: INR/INF implementation
- When NSG receives INR from network, send back INF with calling
         party category information IE and calling number information IE.
         - Introduced a new global setting of "force-inr" for testing
         purpose. Stinga generated INR/INF packets are not acceptable by
         trillium stack since it misses call related information in the
         packets. If configure force-inr to true in freetdm.conf.xml, when
         NSG receives an incoming IAM, it'll send out INR packet regardless
         of incoming IAM's IEs, and keep waiting for INF response from the
         calling side.
         - T.39 timer is introduced in order to handle INR timeout. The
         default value of T.39 is 12 seconds and is configurable according
         to spec.
         - Only supports calling number IE and calling party category IE in
         current fix. The customer only needs the calling number IE right now.
         In ISUP spec, there are 6 optional IEs. NSG only supports calling
         party number and calling category information IE since the other
         IEs are not configurable in freetdm.conf.xml or included in IAM
         message.
         - In collect state, INR/INF implementation needs to work with existed
         SAM messages. If NSG sent out INR and wait for SAM, collect state
         check both INF received and enough dialed numbers received. If one
         of these conditions are not met, it'll stay in collect state and wait
         until either conditions met or timeout. After received INF and enough
         dailed number, state moves to dailing and proceed as regular calls.
2012-04-11 11:20:32 -04:00
Anthony Minessale 62c14df322 FS-3774 --resolve 2012-04-10 16:19:23 -05:00
Anthony Minessale a40f304990 ESL-45 --resolve 2012-04-10 16:11:36 -05:00
Mitch Capper 6f87ac55d6 fs_cli: add batch mode
Signed-off-by: Travis Cross <tc@traviscross.com>
2012-04-08 16:54:40 +00:00
Travis Cross 73b473c367 remove autogenerated file libs/ldns/install-sh
Re-bootstrapping is needed after this change.  Previously CentOS 5
systems wouldn't build correctly without this file in tree, but we've
adjusted bootstrap to compensate.
2012-04-06 21:42:59 +00:00
Ken Rice a362cd846a this should work find with /bin/sh on all systems 2012-04-06 14:52:55 -05:00
Anthony Minessale c41a16d4da shutdown socket before closing to avoid blocking 2012-04-05 14:28:01 -05:00
Travis Cross aad8daffa0 libzrtp: make bootstrap work on CentOS 5 2012-04-05 18:02:53 +00:00
Travis Cross 735d98710c libzrtp: gitignore bnlib/Makefile 2012-04-05 08:18:55 +00:00
Travis Cross 9468eeb5c8 libzrtp: remove an autogenerated file 2012-04-05 07:34:32 +00:00
Travis Cross a5cbd2c650 Revert unintended changes to libs/ldns/install-sh
I hate this file; we need to do something about this.

Partially revert "fix libzrtp build"
commit 0b6023b261
2012-04-05 05:00:24 +00:00
Travis Cross 0b6023b261 fix libzrtp build 2012-04-05 04:44:49 +00:00
Travis Cross c307b67e35 libzrtp: add .gitignore files 2012-04-05 04:26:27 +00:00
Anthony Minessale 92fb339434 FS-4071 --resolve 2012-04-04 16:18:53 -05:00
Travis Cross 79c214d442 libzrtp: remove old convenience script 2012-04-04 20:59:02 +00:00
Travis Cross 68d44c2e01 libzrtp: add bootstrap script 2012-04-04 20:54:56 +00:00
Travis Cross bf71d26c73 libzrtp: add acinclude.m4 file with AX_PREFIX_CONFIG_H macro 2012-04-04 18:53:44 +00:00
David Yat Sin e3369119e0 Merge branch 'master' into releases.3.5 2012-04-03 18:16:36 -04:00
David Yat Sin 27e4cdb4dd Merge branch 'fsorig'
Conflicts:
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c
2012-04-03 18:08:49 -04:00
David Yat Sin be4512be03 FreeTDM - ISDN fix for BRI lines with Q.921 layer going idle 2012-04-03 16:48:14 -04:00
James Zhang 339c45b2cb freetdm: Add documentation for SS7 native bridge 2012-04-03 11:27:25 -04:00
James Zhang b324f86797 freetdm: Clean up SS7 native bridge code to separate the call control, queuing and
resource-cleanup responsibilities clearly between the 2 channels involved in the bridge

   - Each channel is responsible for clearning its own peer_data and event queue
     at the end of the call (when moving to DOWN state)

   - Each channel dequeues messages only from its own queue and enqueues messages
     in the peer's queue, with the only exception being messages received before
     the bridge is stablished (IAM for sure and possible SAM messages) because
     if the bridge is not yet stablished the messages must be queued by the channel
     in its own queue temporarily until the bridge is ready

   - When the bridge is ready it is the responsibility of the incoming channel to
     move the messages that stored temporarily in its own queue to the bridged peer queue

   - During hangup, each channel is responsible for moving itself to DOWN. The procedure
     however differs slightly depending on the hangup conditions

     If the user requests hangup (ie, FreeSWITCH) the request will be noted by setting the
     FTDM_CHANNEL_USER_HANGUP flag but will not be processed yet because call control is
     driven only by the link messages (so no hangup from ESL or command line allowed)

     When REL message comes, the channel receiving it must move to TERMINATING state and:

           - If the user has not hangup yet (FTDM_CHANNEL_USER_HANGUP flag not set) then
             notify the user via SIGEVENT_STOP and wait for the user to move to HANGUP
             state by calling ftdm_channel_call_hangup() before sending RLC

           - If the user did hangup already (FTDM_CHANNEL_USER_HANGUP flag is set) then
             skip user notification and move to HANGUP state directly where the RLC message
             will be sent

   - On HANGUP state the RLC is sent and the channel is moved to DOWN, final state
     The peer channel will forward the REL message and wait for RLC from the network, when
     RLC is received the channel can move straight to DOWN itself because the peer channel
     is completing its own shutdown procedure when it received the REL message
2012-04-03 11:23:49 -04:00
David Yat Sin d730df77e4 Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch 2012-04-02 18:00:38 -04:00
David Yat Sin 38143e3035 freetdm - ISDN added check to treat calling number 0000000000 as empty calling number 2012-04-02 18:00:27 -04:00
Anthony Minessale 647740e9a4 cleanup after yourself 2012-04-02 16:20:40 -05:00
Anthony Minessale afdf50d423 stop sched thread quicker on global destroy 2012-04-02 15:33:45 -05:00
Anthony Minessale 972504a3ca unset logger on global destroy 2012-04-02 15:00:35 -05:00
Anthony Minessale b80a3a3439 set session loglevel as well in fs_cli when doing 'console loglevel info' also now implies '/log info' locally 2012-04-02 11:58:00 -05:00
Travis Cross d2edcad66e Merge Phil Zimmermann's libzrtp as a FreeSWITCH library
Thanks to Phil Zimmermann for the code and for the license exception
we needed to include it.

There remains some build system integration work to be done before
this code will build properly in the FreeSWITCH tree.
2012-03-31 23:42:27 +00:00
James Zhang 8a589435de freetdm: Adding condition to parse sip headers only for non-freetdm channels.
This fixes an issue where ss7 native bridge was accidentally enabled
         any time two freetdm channels were bridged regardless of the freetdm_native_sigbridge
         variable value.
2012-03-30 16:50:00 -04:00
Steve Underwood 13fbaf7e0f Tweaks for spandsp 2012-03-29 23:33:11 +08:00
Stefan Knoblich a856d81a06 ftmod_misdn: More reworking of b-channel audio tx handling.
Use the amount of audio data received in misdn_read() to determine how many
bytes we need to send to the b-channel (= how much free space is left
in the b-channel tx queue). (This is how libosmo-abis and LCR handle it too.)

A pipe is used as a poll()-able audio tx buffer (filled in misdn_write()):
FTDM_WRITE wait requests are currently poll()-ed on the input side of the pipe,
whereas FTDM_READ and _EVENT requests are poll()-ed on the b-channel socket itself.

For every N-bytes of audio data read from the b-channel in misdn_read(),
we try to get as much out of the tx pipe, convert it into the ISDN_P_B_RAW
format and send it to the b-channel socket.

If there's less than N-bytes left in the pipe, we fill the remaining buffer
with silence to avoid buffer underflows.

B-Channel handling overview:

  - misdn_wait(FTDM_WRITE) on audio pipe

  - misdn_write() put audio data into pipe

  - misdn_wait(FTDM_READ) for next incoming mISDN
    message on b-channel socket

  - misdn_read() handle mISDN event, for PH_DATA_IND:

      - Write data into channel buffer and convert
        to a/u-law using misdn_convert_audio_bits()

      - Try to fetch N-bytes from audio pipe

      - If not enough bytes in pipe: fill remaining space with silence

      - Convert audio to raw format

      - Send to b-channel (PH_DATA_REQ)

Known problems / bugs / further investigation:

   1. Bridge aborted by "Write Buffer 0 bytes Failed!" error from switch_core_io.c.
      This is "fixed" by _not_ setting the b-channel sockfd to non-blocking mode.

   2. Audio glitches (maybe caused by FTDM_WRITE misdn_wait() handling or blocking I/O on sockfd?)

   3. misdn_read() EBUSY error messages from sending data to b-channel sockfd after enabling channel.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-03-28 23:49:55 +02:00
Steve Underwood 7b9e4ff674 Various updates to spandsp tests
spandsp logging now passes an opaque pointer to the logging routine, to
increase flexibility. Right now the pointer is set to NULL in all calls.
2012-03-28 23:36:30 +08:00
Steve Underwood c1203b5863 Tweak spandsp tests 2012-03-28 21:45:20 +08:00
Steve Underwood 3e2bea0f1c Lots of little improvements to the spandsp test suite 2012-03-28 21:43:13 +08:00
James Zhang a2db3c24b3 freetdm: fixing more potential null pointers in native bridge mode. 2012-03-27 18:00:24 -04:00
Ken Rice c1f3ff998f opps missed an include 2012-03-27 14:24:58 -05:00
Ken Rice a1ed759b1c try to make compiler -Werror hush 2012-03-27 14:11:41 -05:00
Ken Rice 57fac728c6 make compiler stop complaining 2012-03-27 13:58:27 -05:00
Anthony Minessale d308694201 after f7f9a43a40 missing a bunch of code changes 2012-03-26 16:41:49 -05:00
Stefan Knoblich e3698c2067 ftmod_misdn: Make sure misdn_read() doesn't loop forever and improve logging etc.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-03-23 01:21:55 +01:00
Stefan Knoblich ff4b395956 ftmod_misdn: Rework channel de-/activation and activate d-channel early.
The former fixes a strange "bug" with hfcsusb, where a b-channel deactivation
on a inactive channel (caused by a reset cycle) would cause the port to
lock up and stop processing events.

NOTE: this still needs to be investigated further, but this workaround will
      at least prevent it from breaking completely.

We'll now keep track of the channel activation state and not send any
PH_ACTIVATE_REQ / PH_DEACTIVATE_REQ requests, if the channel already has the
desired state.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-03-23 01:21:55 +01:00
Stefan Knoblich a2f3ef7460 ftmod_misdn: Reserve some space for the mISDN message header in misdn_write().
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-03-23 01:21:55 +01:00
Stefan Knoblich f2841e0280 ftmod_misdn: misdn_write() workaround for signalling drivers that do not use write polling.
Wait till the channel is actually ready to send data.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-03-23 01:21:55 +01:00
Stefan Knoblich fc1e1a91f2 ftmod_misdn: Stop using timerfd for b-channel write polling.
Use POLLIN on the socket instead, the b-channel should be able
to write when there is something to read.

Several other projects handle it this way, e.g. libosmo-abis.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-03-23 01:21:55 +01:00
Stefan Knoblich c85271aaf5 ftmod_misdn: Improve debug log messages.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-03-23 01:21:55 +01:00
Stefan Knoblich 28ed1b5076 ftmod_misdn: Move misdn_handle_incoming() up.
Only used by misdn_read(), so move it right in front of that one.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-03-23 01:21:55 +01:00
Stefan Knoblich 6b76212324 ftmod_misdn: Decode hfcsusb MPH_INFORMATION_IND state and flags.
For diagnostic / debugging purposes.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-03-23 01:21:55 +01:00
James Zhang bfefbb5522 freetdm: fix isup timers default values 2012-03-21 10:12:59 -04:00
James Zhang a8e21663ce Revert "freeswitch: taking out -Ox cflags and have them replaced with -O0"
This reverts commit e560ddccde.
2012-03-21 10:05:51 -04:00
James Zhang 012bc154b0 Revert "freetdm: fixing default values for ISUP"
This reverts commit f1d80cd25d.
2012-03-21 10:00:27 -04:00
James Zhang e560ddccde freeswitch: taking out -Ox cflags and have them replaced with -O0
we dont want to optimize out symbols for debugging
2012-03-20 11:56:29 -04:00
James Zhang fbc5322e65 freetdm: fixing wrong default timer values 2012-03-20 10:51:53 -04:00
Moises Silva 57b022c2d4 freetdm: Do not report error for DAHDI RINGER ON/OFF events, they are no-ops at the moment 2012-03-19 09:27:29 -04:00
Moises Silva 681f582b20 freetdm: Try to resolve OPENZAP-173
The token count needs to be updated after the master session token is cleared
         and before checking for other tokens
2012-03-19 09:20:44 -04:00
Moises Silva bf652b567f freetdm: ftmod_zt - Print which DAHDI event number is failing to be processed 2012-03-18 18:54:54 -04:00
James Zhang f1d80cd25d freetdm: fixing default values for ISUP 2012-03-16 16:09:54 -04:00
James Zhang 63a2c847eb freetdm: merge native bridge fix from releases.3.4
which solves the crash on outgoing calls after native bridge
2012-03-16 12:24:10 -04:00
James Zhang 10277be8d6 freetdm: synchronizing fixes in releases.3.5 version
- glare
         - cgb/cgu range bug
         - inhibit/uninhibit
2012-03-16 11:40:21 -04:00
James Zhang 46ddfc0ebb freetdm: fixing glare with different options 2012-03-16 11:19:01 -04:00
James Zhang 19f01bf50a freetdm: fixing a potential crash on a rarely happened situation 2012-03-15 18:05:47 -04:00
Jeff Lenk e8fbaa77a4 FS-3997 --resolve 2012-03-14 09:26:32 -05:00
Jeff Lenk d3078c60ec update flite to 1.5.4 fixes win64 and kal rate problem 2012-03-13 22:56:02 -05:00
Moises Silva 3c4fdca9e0 freetdm: Fix redmine issue #2931 - Crash on SIP to SS7 call after sigbridge call
The code was improperly using peer_data as an indicator that the sigbridge
         ss7 mode was enabled. The channel flag FTDM_CHANNEL_NATIVE_SIGBRDIGE should
         be used instead
2012-03-07 19:04:31 -05:00
Jeff Lenk d827cfecb4 corrected managedEsl sample 2012-03-04 17:48:30 -06:00
Anthony Minessale 872a0fe658 FS-3957 --resolve 2012-03-01 10:04:07 -06:00
Anthony Minessale 0626c89d4a always update the .update file when changing the sofia lib 2012-02-29 14:45:39 -06:00
Jeff Lenk 6aa492d034 vs2010 add some ssl support to curl - test 2012-02-29 08:50:00 -06:00
Jeff Lenk da36d1f57f FS-3953 --resolve 2012-02-28 08:38:45 -06:00
Anthony Minessale 23645b6af2 comment assert for windows 2012-02-27 16:49:12 -06:00
James Zhang eeec65265a freetdm: fixing format and loc_nadi value according to review board No. 98 2012-02-24 16:32:44 -05:00
James Zhang b5f69db10f freetdm: fixing printing in ftmod_sangoma_ss7_support.c functions 2012-02-24 16:21:21 -05:00
James Zhang 938fafb09e freetdm: fixing problem during review - review board number 98 2012-02-24 16:09:58 -05:00
James Zhang 6ed6fd2c1a freetdm: latest SPIROU fixes in releases.3.4 branch merged in releases.3.5 2012-02-24 15:43:23 -05:00
Jeff Lenk 5e66db63f1 FS-3896 --resolve that sizeof was incorrect 2012-02-17 08:50:03 -06:00
James Zhang 713b55cd58 freetdm: fixing improper log position in tx acm function 2012-02-16 18:33:00 -05:00
James Zhang 3f43b053a0 freetdm: adding x-ocn-* headers for incoming sip calls 2012-02-16 16:49:51 -05:00
Moises Silva 1f34c9301e freetdm: Remove optimistic sanity check, prints spurious error messages 2012-02-16 16:08:21 -05:00
James Zhang 4ccc26f08b freetdm: Fix improper logging statement when doing native ss7 bridge (peer_chan was set to the SIP leg) 2012-02-16 15:15:22 -05:00
James Zhang 8c8d649221 freetdm: Add support to set/receive location and original call number SS7 elements through variables (including SIP X headers) 2012-02-16 15:14:06 -05:00
Moises Silva a6e868f588 freetdm: Fix spirou certification native bridge issue
- The outgoing tdm leg should not move to UP until
           after the IAM is sent at the end of the function
         - The UP state should be processed immediately otherwise
           the state processor is not run due to the way the main
           ss7 processing loop currently works
2012-02-16 14:49:18 -05:00
David Yat Sin 08d29b10b6 freetdm - ISDN fix for channel getting stuck if we receive ALERT after sending DISCONNECT 2012-02-15 13:07:07 -05:00
James Zhang a46c03ef65 freetdm: fixing glare
- adding configuration of glare handling rule
         - fixed cic status remains COLLECTING
2012-02-10 17:29:28 -05:00
Christopher Rienzo fdaa155b99 Lower super_tone_rx DETECTION_THRESHOLD by a factor of 128 2012-02-10 13:17:54 +00:00
Stefan Knoblich 674dc9850b [FreeTDM] Another round of ftdm_log() format string fixes.
Use FTDM_SIZE_FMT where needed, don't treat ftdm_event_t as an int
(even if the e_type enum is the first member), datalen vs. *datalen fix
and other warnings.

All reported by __check_printf() (GCC + __attribute__((format(printf,x,y))) ).

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-02-10 13:29:49 +01:00
Stefan Knoblich 9d5eb0737b [FreeTDM] Fix a couple of ftdm_log() format string errors.
... that could cause segmentation faults.

Caught while working on __check_printf() support for ftdm_log().

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-02-10 13:24:57 +01:00
Stefan Knoblich 124c04624a [ftmod_misdn] Add missing braces around condition of ternary operator.
For compilers that seem to do the wrong thing(tm).

Speculative fix for:

  segfault at 1 ip b72145d3 sp b58f8bfc error 4 in libc-2.11.3.so

  #0  0xb7a5d5d3 in vfprintf () from /lib/i686/cmov/libc.so.6
  #1  0xb7a7cec7 in vasprintf () from /lib/i686/cmov/libc.so.6
  #2  0xb7dd7c5b in switch_vasprintf (...)
  #3  0xb6296de2 in ftdm_logger (...)
  #4  0xb621625d in misdn_handle_mph_information_ind (...) at ftmod_misdn.c:658

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-02-10 13:22:47 +01:00
James Zhang 7b3a3d86b9 freetdm: fixed cgu/cgb commands wrongly setting cic status when
the range covers one or more signaling links
2012-02-09 14:32:08 -05:00
James Zhang b78b612b47 freetdm: fixing cgu with signaling link in unblock range 2012-02-09 14:11:21 -05:00
James Zhang 024a043e2c freetdm: initial fix to rx cgb 2012-02-09 14:04:45 -05:00
James Zhang b0ee65b45a freetdm: adding new commands and removing unused ones
- ftdm ss7 show
         - ftdm ss7 show span X
         - ftdm ss7 show status linkset X
         - ftdm ss7 inhibit X
         - ftdm ss7 uninhibit X
2012-02-09 11:15:48 -05:00
Stefan Knoblich 36b26c51ac [ftmod_misdn] Fix a couple of ftdm_log() printf format errors
Also adds a local ftdm_channel_get_type_str() helper.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-02-09 12:58:59 +01:00
David Yat Sin 9de1e1ad67 freetdm - disabled dtmf detect duration by default 2012-02-07 14:36:22 -05:00
David Yat Sin c5cc318afa Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch 2012-02-07 14:28:58 -05:00
David Yat Sin 1377b9c84d freetdm: support for dtmf_on_start 2012-02-07 14:28:47 -05:00
Stefan Knoblich 4bb1ab0113 [ftmod_misdn] Add some TODO items at the top of ftmod_misdn.c.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-02-07 18:39:11 +01:00
Stefan Knoblich 810f0d4eaa [ftmod_misdn] Make misdn_handle_mph_information_ind() cope with hfcsusb-style MPH_INFORMATION_IND messages.
Only two mISDN hardware drivers emit MPH_INFORMATION_IND messages and both use a different payload:

	- hfcsusb (HFC-based USB dongle) sends a set of ph_info + ph_info_ch structures
	  which contain the complete state information of the port
	  (including internal hw-specific state and flags).

	- hfcmulti which sends a single integer, a single L1_SIGNAL_* event.

We now try to guess the type of message from the payload length.

The hfcmulti signals are converted to FreeTDM alarm flags; the hfcsusb
state/flags are defined in kernel internal hw-specific headers and are ignored ATM (todo).

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-02-07 18:39:11 +01:00
Stefan Knoblich 452c13573d [ftmod_misdn] Include mISDN message primitive id in channel activation log messages.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-02-07 18:39:11 +01:00
Stefan Knoblich fd3ebc7ae3 [ftmod_misdn] Handle MPH_INFORMATION_IND during channel activation.
Add MISDN_MSG_DATA() helper macro for easy access to mISDN message
payload.

Add forward declaration of misdn_handle_mph_information_ind() and use
it in misdn_activate_channel().

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-02-07 18:39:11 +01:00
Stefan Knoblich 9e0928a7ea [ftmod_misdn] Undefine MISDN_CONTROL_TYPE helper macro after use.
No reason to keep it around for longer.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-02-07 18:39:11 +01:00
Stefan Knoblich b6ec127194 [ftmod_misdn] Extend misdn_event_types[] and use a helper macro.
Add missing mISDN event/message types (e.g. MPH_INFORMATION_IND)
and use a helper macro (MISDN_EVENT_TYPE) to define the entries,
like we already do for misdn_control_types[].

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-02-07 18:39:11 +01:00
Steve Underwood 8b3dd5cc1c Fixed issue where junk T.38 received after a FAX exchange is totally completed
s not simply ignored.
2012-02-04 20:33:06 +08:00
Anthony Minessale 1015883e1b commenting this out completely until a better solution is implemented. also FYI you should be refreshing .update on each commit that changes the lib or any of its mods to force a rebuild from the top level 2012-02-03 15:23:46 -06:00
James Zhang 460814d871 esl: fix command prompt 2012-02-03 15:32:10 -05:00
David Yat Sin 2ea5686e4d freetdm: DTMF duration not checked if duration is set to zero 2012-02-03 14:20:08 -05:00
James Zhang 03fee3de39 fs_cli: fix empty prompt in nbss7 2012-02-02 13:48:44 -05:00
Moises Silva 541aa551c7 Merge branch 'releases.3.4.experimental_head' into releases.3.5 2012-01-31 17:17:25 -05:00
Moises Silva 94ceff6842 Merge branch 'master' into smgmaster
Conflicts:
	build/modules.conf.in
	src/mod/loggers/mod_logfile/mod_logfile.c
2012-01-31 16:56:29 -05:00
Moises Silva 1ad0bc250c Merge remote-tracking branch 'fsorig/master' 2012-01-31 15:57:07 -05:00
Moises Silva cafff50005 Merge branch 'releases.3.4' into releases.3.4.experimental_head
Conflicts:
	libs/freetdm/mod_freetdm/mod_freetdm.c
2012-01-31 15:37:33 -05:00
Moises Silva cca407d09a freetdm: Fix bug in SS7 state processing introduced during the changes
for native bridging that caused infinite SUSPEND state executions
         due to peer member not being cleared at the end of the call
2012-01-31 15:18:53 -05:00
Travis Cross b9b77bd615 fs_cli: make enhanced fs_cli features work on all TERMs
FS-3815 --resolve

This is a workaround for the fact that libedit counts terminal control
characters when calculating the length of the prompt.  By not using
absolute positioning, we avoid the issue.

Thanks to Ivan Isaev for the workaround and testing.
2012-01-31 18:42:47 +00:00
David Yat Sin d6c6396e24 Freetdm - ISDN Fix for get_trillium_val function 2012-01-31 12:59:12 -05:00
James Zhang c9c68a7759 freetdm: Some more clean up for ss7 event cloning
- The queue size has been bumped again, long calls could potentially require more elements (multiple resume/suspend)
         - The queue is only used when there is a call active
2012-01-30 19:15:02 -05:00
David Yat Sin a9c10f8c41 FreeTDM - ISDN fix for get_trillium_val function 2012-01-30 18:32:05 -05:00
James Zhang b6c02364a7 freetdm: Reduce the size of the span peer channels and ss7 info per channel clone event queues 2012-01-30 18:26:08 -05:00
James Zhang d1a772bfe9 freetdm: Only hangup with user message when release location information is set 2012-01-30 18:02:26 -05:00
James Zhang c1ad567742 freetdm: removing sus|res|rel commands 2012-01-30 17:37:57 -05:00
Moises Silva 8cade84528 freetdm: Set the call id into the caller data provided as argument to the call place function 2012-01-30 16:15:08 -05:00
Moises Silva 5ef3c94271 OPENZAP-177 --resolve Thanks to Abhishek Singh 2012-01-30 14:15:51 -05:00
James Zhang 14d8b42e58 freetdm: testing code of sending suspend message 2012-01-30 13:19:36 -05:00
James Zhang 777f946e2f freetdm: adding susp/resm/rels but not finished.
disable t6 finished.
2012-01-30 10:28:08 -05:00
Jeff Lenk c2ac8f5fcc correct managed esl sample 2012-01-27 16:04:54 -06:00
Moises Silva 8476d66465 freetdm: Cancel ISUP T6 timer when using native bridge (Spirou certification fix) 2012-01-27 18:54:06 +01:00
Moises Silva 3199513c96 freetdm: More spirou certification changes
- Send RLC immediately even when in native bridge mode
         - Do not enqueue RLC coming from the network
2012-01-27 16:22:45 +01:00
Moises Silva 572154693e freetdm: spirou certification specific changes about RDNIS/RDINF usage 2012-01-27 16:21:53 +01:00
Moises Silva de56f3c465 freetdm: spirou transparent IAM fix for called number 2012-01-27 14:42:33 +01:00
Moises Silva 0ff8a087c6 freetdm: Fix incorrect state transition from DOWN to UP when processing an SS7 clone event 2012-01-27 06:44:11 -05:00
Moises Silva 2db41c5c79 freetdm: Fix uninitialized var leading to segfault 2012-01-27 06:34:36 -05:00
Moises Silva a83f04ab6a freetdm: Relay the rest of SS7 messages supported by libsng_ss7 when in native bridge mode 2012-01-27 00:13:59 -05:00
Moises Silva 1aa4f87b6a freetdm: Tweaks to SS7 native bridge feature
- Enable native bridge also when receiving the UUID via SIP header
         - Remove some debug CRIT messages and set a more proper log level
2012-01-26 23:51:21 -05:00
Moises Silva 9fc8395b31 Merge remote branch 'origin/jz.SPIROU' into releases.3.4.bridge_hack 2012-01-26 23:34:20 -05:00
Moises Silva f2cdb8c6c7 freetdm: Fixes for native signaling bridge (now tested, and works for basic call flows)
- Fix typo when unlocking channel that resulted in deadlock
         - Defer clearing of the peer data until it is completely safe (next call)
2012-01-26 23:31:29 -05:00
Moises Silva 23a328389b freetdm: Initial attempt to bridge natively SS7 signaling between 2 channels 2012-01-26 22:44:19 -05:00
James Zhang 71c3cf365a FreeTDM: adding sip_h_X-FreeTDM-RDNIS-Presentation in redirecting number
to give the ability to change RDNIS Presentation value for
           Transparent IAM
2012-01-26 19:25:04 -05:00
James Zhang 977b546f9a FreeTDM: reuse sip_h_X-FreeTDM-LOC = NULL to indicate disable LOC 2012-01-26 18:52:27 -05:00
James Zhang 3235fa079a FreeTDM: fix for SPIROU
- adding freetdm_iam_fwd_ind_isdn_access_ind (value must be 0 or 1)
             to modify forward call indicator's ISDN access indicator value in
             transparent IAM
2012-01-26 18:00:34 -05:00
James Zhang 95baef8821 FreeTDM: patch SPIROU requests
- adding freetdm_iam_loc_pres variable to disable LOC in transparent IAM
 		   - confirming freetdm_bearer_capability is working properly
2012-01-26 17:37:35 -05:00
Moises Silva b4e8d5b608 freetdm: Fix incorrect variable name leading to segfault 2012-01-26 17:22:45 -05:00
Moises Silva a1a1af579b freetdm: Implement SS7 transparent IAM functionality using the event clones queue 2012-01-26 16:50:38 -05:00
James Zhang 98d566b29c FreeTDM: adding variable ss7_rel_loc for REL location indicator (to support SPIROU) 2012-01-26 16:39:43 -05:00
Moises Silva 1b964054de freetdm: Add new queue for ss7 clone messages, all incoming messages are queued now 2012-01-26 15:21:51 -05:00
James Zhang 90f538c0a0 FreeTDM: Fixing issues of SPIROU
- redirect number in Transparent IAM
		   - redirect information in Transparent IAM
		   - called party number in Transparent IAM
           - adding incoming uuid to x-header to check loop calls
2012-01-26 11:19:41 -05:00
James Zhang 28e27248e5 FreeTDM: remove the previous commit
- hardcode does not work in this matter
2012-01-25 18:00:41 -05:00
David Yat Sin 6f9c2ae50f Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch 2012-01-25 16:13:56 -05:00
David Yat Sin 81188c34a5 Fix for not evaluating digit upon T302 timeout 2012-01-25 16:13:43 -05:00
James Zhang 34c8e58ae1 FreeTDM: location value in REL message set to 0x04
- only available to SPIROU
2012-01-25 16:00:20 -05:00
Anthony Minessale c968f59f8c FS-3833 try this 2012-01-24 08:17:17 -06:00
Moises Silva eb7d52aaa9 freetdm: improve some isdn logging
try to fool-proof the size of the read D channel buffer by not hard-coding it in 2 places
2012-01-22 21:54:35 -05:00
James Zhang 8d1d930085 FreeTDM: fixing OPC bug using local SPC
- take the DPC of the link and set it as OPC in x-header
           - this is what the user want's to have
2012-01-19 18:04:03 -05:00
James Zhang 63ecf4e909 FreeTDM: remove the portion of opc fix 2012-01-19 16:55:15 -05:00
James Zhang 5ac80d3939 FreeTDM: fixing redirect information outgoing call bug 2012-01-19 16:31:52 -05:00
Brian West f2ccbb1918 chmod 755 2012-01-19 19:44:08 -06:00
Moises Silva e3cb0352b0 freetdm: Fill in DAHDI function pointer to retrieve the next channel event 2012-01-19 16:18:30 -02:00