Fixup zt_read() to handle this case correctly and rework ftmod_libpri's read wrapper function to not fail when the read function returns zero bytes.
NOTE: zt_write() has not been changed (some better way to handle these events is needed then)
This should fix these log messages:
[WARNING] ftdm_io.c:3561 [s1c16][1:16] raw I/O read filed
[CRIT] lpwrap_pri.c:125 span 1 D-READ FAIL! []
[CRIT] lpwrap_pri.c:157 span 1 D-WRITE FAIL! []
[ERR] ftmod_libpri.c:131 Short write: -1/6 (Unknown error 500)
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
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>
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>