Commit Graph

2555 Commits

Author SHA1 Message Date
David Yat Sin fb9163fe5a Fix for not flushing DTMF buffer at end of call 2013-03-21 10:41:16 -04:00
David Yat Sin 20110f4569 Freetdm - ISDN:Fix for race condition where we receive a new call, and did not finish clearing existing call internally. 2013-03-19 14:32:03 -04:00
Moises Silva 5f876497bc freetdm: - Added ftdm_usage command to check if a channel has calls (ie, is busy)
- Refactored ftdm CLI management to allow standalone APIs to be registered
         - Minor logging changes here and there
2013-03-08 15:15:07 -05:00
Brian West e0066b68d7 don't use : in the file name, makes it somewhat problematic to scp these files even when quoted 2013-03-07 09:41:51 -06:00
David Yat Sin 187d55c7ea Updating documentation for send-connect-ack 2013-02-19 17:00:03 -05:00
David Yat Sin 79324e1fe9 Changed default setting for 5ESS to send CONNECT ACK to match spec 2013-02-19 16:56:11 -05:00
Moises Silva 7c6ba6a34c OPENZAP-207 --resolve Rework the zt_read function
Break the read loop when receiving ELAST
2013-02-11 11:35:30 -05:00
Anthony Minessale ff5b702886 FS-4971 please try this 2013-01-17 09:03:40 -06:00
Moises Silva 29bfcb16be freetdm: ftmod_pritap: Allow specifying different audio mixing modes 2013-01-11 14:52:33 -05:00
Stefan Knoblich 42bb1040de ftmod_pritap: Use strcmp() for "none" and "all" in parse_debug()
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-01-10 18:41:16 +01:00
Stefan Knoblich fe4d5748c6 ftmod_pritap: Hexdump I/O buffers if q921_raw debug is enabled, improve parse_debug()
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>
2013-01-10 18:31:30 +01:00
Stefan Knoblich bfef3e57c4 ftmod_libpri: Disable on_facility() event handler on older libpri versions
Those that lack PRI_EVENT_FACILITY (<= 1.4.10)

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-01-08 15:07:29 +01:00
Stefan Knoblich 221bcc9e90 ftmod_libpri: Also conditionally disable pri_set_service_message_support() call
Same as pri_maintenance_service(), use HAVE_LIBPRI_MAINT_SERVICE.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-01-08 15:07:29 +01:00
Stefan Knoblich 88e75bf9d7 ftmod_libpri: Add configure check for pri_maintenance_service()
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>
2013-01-08 15:07:29 +01:00
Stefan Knoblich 2bb859e2b4 ftmod_misdn: Fix brown paperbag logic bug in handle_b_channel_event()
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>
2013-01-07 18:04:00 +01:00
Stefan Knoblich 95ac0ecc2f ftmod_misdn: Retry recvfrom() in case of EAGAIN
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>
2013-01-07 13:35:38 +01:00
Stefan Knoblich f2c325bf3e ftmod_misdn: Fix %lx vs.__u64 format string error
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
2013-01-06 13:47:06 +01:00
Moises Silva 56846c02c6 freetdm: ftmod_analog_em: If the destination number DTMF was already generated, do not generate it again
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
2012-12-20 12:18:24 -05:00
Moises Silva 27a8ec93de freetdm: Added Analog E&M outbound call answer supervision
You must add answer-supervision=yes in your freetdm.conf.xml
         Also added dial-timeout parameter which was previously hard-coded
2012-12-18 22:55:14 -05:00
Moises Silva 6e9dc465cc freetdm: ftmod_analog_em: Fix incorrect read length 2012-12-18 14:24:00 -05:00
Moises Silva 6f5438eded freetdm: ftmod_zt:
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
2012-12-18 14:23:31 -05:00
Moises Silva a7f8e4259e OPENZAP-201 --resolve 2012-11-26 14:26:41 -05:00
Moises Silva b64cc02390 freetdm: ftmod_zt - Declare tone mode at the top to avoid compilation errors 2012-11-19 10:24:25 -05:00
Moises Silva db673a043f freetdm: ftmod_zt - Integrated HW DTMF support 2012-11-18 23:57:52 -05:00
Matteo Brancaleoni 8c58a10999 ftmod_libpri: Rework handling of peer-initiated hangup events
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>
2012-11-12 22:54:27 +01:00
Moises Silva 9bc3dfc874 fretdm: little white lie 2012-11-09 16:53:39 -05:00
Michael Jerris 306c2fa205 don't skip sending cid number if there is a + in it 2012-11-05 15:12:38 -05:00
Moises Silva d39269b217 freetdm: ftmod_pritap - Fix memory corruption due to freeing a call
pointer that was still in use
2012-10-29 15:34:08 -04:00
Moises Silva 87a1d78e42 freetdm: ftmod_pritap - Use a single thread per every pair of spans tapping a single line 2012-10-29 15:33:59 -04:00
Moises Silva aeb07172b0 freetdm: ftmod_pritap - Do not print an error when the crv is no longer in use
since this is a valid code path
2012-10-29 15:33:50 -04:00
Moises Silva e4e6fa65d0 freetdm: ftmod_pritap - Lock the channel during call setup
Destroy the peer before the master channel
2012-10-29 15:33:41 -04:00
Moises Silva d88e79e632 freetdm: ftmod_pritap - Use uint8 for flags (I smell a bug somewhere with bitfields) 2012-10-29 15:33:31 -04:00
Moises Silva 7d5a4a7172 freetdm: ftmod_pritap - Destroy call references as soon as possible 2012-10-29 15:33:22 -04:00
Moises Silva 3cb1fd267f Try to fix pritap segfault 2012-10-29 15:33:09 -04:00
Moises Silva 0a92094995 freetdm: ftmod_pritap - Add interface type parameter (cpe/net) 2012-10-29 15:32:57 -04:00
Moises Silva d2a73cc0e4 Updated ftmod_pritap.c to send SIGEVENT_UP when the tapped line is answered 2012-10-29 15:32:16 -04:00
Matteo Brancaleoni 3d090357cf ftmod_libpri: Always send PROGRESS messages with PROGRESS INDICATOR IE
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>
2012-10-29 11:58:22 +01:00
Moises Silva 542e7153fc freetdm: Fix compilation with old libpri.h where AOC is not available 2012-10-23 13:01:40 -04:00
Moises Silva 004ebe4f12 OPENZAP-196 Fix casting issue - Apparently this fixes libpri BRI issues 2012-10-23 13:00:16 -04:00
Stefan Knoblich 1d605ef47b FreeTDM: Add ftdm_clamp_safe()
"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>
2012-10-06 16:50:55 +02:00
Stefan Knoblich 90691b36c4 FreeTDM: Remove trailing whitespace at end of ftdm_{copy,set}_string()
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-10-06 16:50:55 +02:00
David Yat Sin 15ef8925c3 Fix for Q.921 not always recovering 2012-09-27 23:48:18 -04:00
Jeff Lenk b15468d1aa OPENZAP-192 --resolve 2012-09-26 08:11:52 -05:00
Moises Silva fff6e50a9b freetdm: Fix E&M answer procedure for DAHDI 2012-09-19 20:03:09 -04:00
Brian West 98063854c6 This already has a new line in it 2012-09-19 15:54:38 -05:00
David Yat Sin 7018a15bf1 fix for compile warning 2012-09-19 15:25:38 -04:00
David Yat Sin aa8f48c7e3 Fix for compile warning 2012-09-18 23:14:27 -04:00
David Yat Sin 2aa5b78514 freetdm: Fix for DL re-establishment on NFAS 2012-09-18 23:11:05 -04:00
Stefan Knoblich 715c538922 ftmod_misdn: Handle incoming PH_CONTROL_IND messages on b-channels
Also add a few more PH_CONTROL_IND message types.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-09-17 21:43:59 +02:00
Stefan Knoblich bc414df510 ftmod_misdn: Discard incoming audio data if b-channel is not active
Silences the "Device or resource busy" error messages caused by the RX pipe
filling up.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-09-17 21:40:59 +02:00