I really need to dig deeper here, some libpri events never fire for
incoming calls and i'll have to find out how mod_freetdm or the
FreeSWITCH core change states on the channel...
Anyway, incoming and outgoing calls still work for me (BRI PTMP TE),
so commit this now and let a wider audience do some more testing.
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
Tested-by: Stefan Knoblich <s.knoblich@axsentis.de>
ftmod_pritap: Abort before overflowing spanparameters array and initialize to all zero
ftmod_isdn: Fix overflow check, skip over parameters without name or value, initialize spanparameters array to all zero.
ftmod_libpri: Skip over parameters without name or value, initialize spanparameters array to all zero and drop "i < 10" hardcoded check.
This should fix:
2010-11-15 09:24:34.609515 [ERR] ftmod_libpri.c:1741 Unknown parameter '', aborting configuration
2010-11-15 09:24:34.609515 [ERR] mod_freetdm.c:3080 Error configuring FreeTDM span BRI_1
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
Reported-by: Ingmar Schraub <is@eseco.de>
"if (ftdm_array_len(spanparameters) == paramindex)" is still off-by-one,
we want to stop at "ftdm_array_len(spanparameters) - 1", before we overwrite
the last (= terminating, NULL) element.
NOTE: i'd prefer an "argc, argv"-style interface here
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
- Add alias names for parameters:
"node" -> "mode"
"dp" -> "ton"
"switch" -> "dialect"
"l1" -> "layer1"
(Switching between ftmod_libpri and ftmod_isdn is easier now.)
- Removed unused members from struct ftdm_libpri_data
and rename misnamed ones
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
- Check D and B-channel availability (could be extended to check B-channel count)
- Drop usage of spri->private_info, use spri->span instead
- Use accessor functions where possible
- Rename ftdmchan to chan where possible
- Various other cleanups
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
Tested-by: Stefan Knoblich <s.knoblich@axsentis.de>
as that does not work on gcc (Debian 4.3.2-1.1) 4.3.2
and probably other compilers when the inlined function
is not defined in the same compilation unit
Requires libpri-1.4.12_beta1 or newer!
Completely untested, AOC-S/D/E ChargingRequest operations are sent to NT (DTAG BRI PTMP),
but rejected with "Unrecognized Operation".
NOTE: FreeTDM core needs support for this to be useful!
Only AOC-E events are decoded and sent to the log.
To enable:
Set (or add) <param name="opts" value="aoc"> in your
libpri_spans span config.
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
This fixes several issues with parameter handling (e.g. default alaw/ulaw selection being totally useless).
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
Fixes:
- Fix double locking in check_state(): remove ftdm_mutex_(un)lock calls.
New:
- Add lpwrap_init_bri() to initialize libpri in BRI mode
- Use trunk type to determine PRI/BRI and PTP/PTMP mode (no additional configuration required).
- Improve libpri detection code in configure.ac, check whether libpri is usable
and if BRI support is available (needs more work)
Cleanups:
- Whitespace and indentation cleanups
- Rename str2* functions to parse_*
- Simplify libpri_configure_span() option parsing and bail out on error
- Add "ftdm libpri help" command that displays usage information
- Coding style cleanups and other (minor) changes
Known issues:
- BRI PTMP TE Q.921 link does not go beyond TEI ASSIGNED state,
SABME requests are ignored by NT (EuroISDN DTAG, DAHDI-2.3.0.1, vzaphfc)
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>