Add support for "q921_all"/"q931_all" to parse_debug() ("debug" span parameter), taken from
ftmod_libpri.
Passive libpri's raw dump feature is broken (e.g. I-frames missing), so
add "q921_raw" hexdump support to the pritap I/O read/write function.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Said function has been added in libpri-1.4.11 and breaks
building with older libpri versions (i.e. the passive one for ftmod_pritap).
Check for pri_maintenance_service() in configure and disable
the "maintenance" subcommand if it is not available.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Yeah, right, discard the incoming audio data when the b-channel is active...
Reverse the check, so ftdm_read() on an active mISDN b-channel will
be able to read audio data from the RX socketpair and not kill
the call from repeatedly timing out in poll().
Fixes:
[WARNING] mod_freetdm.c:775 Too many timeouts while waiting I/O in channel FreeTDM/1:1/XX device 1:1!
[ERR] mod_freetdm.c:820 clearing IO in channel FreeTDM/1:1/XX device 1:1!
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
epoll_wait() on the B-channel socket may indicate pending messages, but
recvfrom() returns EAGAIN. Retry a few more times (up to 5 retries)
to get the pending message.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Fixes:
src/ftmod/ftmod_misdn/ftmod_misdn.c:924:3: error: format '%lx' expects
argument of type 'long unsigned int', but argument 13 has type '__u64'
[-Werror=format]
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Reported-by: hyper_ch #freetdm @ irc.freenode.net
This bug was cause when answer-supervision is used because now we do not move from DIALING to UP
as soon as the line is ringing, but instead we wait for the CAS bit change
Handle driver events while reading media
ftmod_analog_em:
Initialize read data len to avoid crashing when
the freetdm read function does not read anything
Use peerhangup flag variable to track whether a hangup has been
initiated by the peer or libpri itself (e.g. Layer 2 timeouts).
These changes fix a couple of problems with hangup events not being
handled properly in some situations:
- Call abort caused by incoming RESTART on a channel in use
- T309 timeout after L2 loss
- Improved hangup handling in libpri-side on_hangup() event handler
and state_advance() (FreeTDM side)
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
PROGRESS without PROGRESS INDICATOR IE is invalid according to Q.931,
so always call pri_progress() with info flag set, even if we do not
have media yet.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
"Safer" version of ftdm_clamp(), that swaps min/max parameters if
vmin happens to be larger than vmax, making sure the output will
always satisfy vmin <= x <= vmax.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>