Commit Graph

129 Commits

Author SHA1 Message Date
Andreas Eversberg f6aea744f8 Removed complete bchannel handling from chan_lcr
The remote application interface does not allow any bchannel to be
exported or imported. Audio traffic via socket interface is used instead.

The joinremote instance became obsolete and is removed.

The remote action (routing) became obsolete, use interface.conf instead.

The handling of loopback device became obsolete and was removed

The chan_lcr does not rely on mISDN anymore, that means:
- can be used with GSM and without mISDN at all.
- chan_lcr can be used as internal extension of LCR (e.g. SIP phone)
  (chan_lcr can be handled as any other interface)
- no loopback device to be used anymore.
2012-12-16 10:10:32 +01:00
Janis Ruksans 61c1f38082 The third parameter to ast_channel_tech.requester is const qualified,
causing GCC to emit a warning about incompatible pointer types when
initializing lcr_tech. Fix this by adding necessary const's to lcr_request.

Signed-off-by: Andreas Eversberg <jolly@eversberg.eu>
2012-06-28 08:02:55 +02:00
Janis Ruksans ad9a780ce7 If ast_channel struct is not declared before ast_register_application2,
gcc thinks that the implicit declaration in module.h is different from
the one in channel.h, and issues a warning about incompatible pointer
types. A forward declaration before including module.h fixes this.

Due to some brain-deadness in Ast, including channel.h before module.h
causes the compilation fail altogether.

Signed-off-by: Andreas Eversberg <jolly@eversberg.eu>
2012-06-28 08:01:25 +02:00
Janis Ruksans 1c32d75c7e Use AC_CHECK_TYPE and correct quoting for Asterisk struct checks, and add
case for ind_tone_zone_sound (Asterisk 1.6.0).

Signed-off-by: Andreas Eversberg <jolly@eversberg.eu>
2012-06-28 07:59:48 +02:00
Birger Harzenetter 14da759465 Changes needed for Asterisk TRUNK 357721 2012-06-24 08:33:59 +02:00
Birger Harzenetter 9f9b721735 Changes for Asterisk TRUNK r357721
Signed-off-by: Andreas Eversberg <jolly@eversberg.eu>
2012-04-17 12:56:49 +02:00
Birger Harzenetter 9efd4aed44 Make chan_lcr compile with latest Asterisk. 2012-03-01 08:47:13 +01:00
Andreas Eversberg 9464c059e6 Fixed chan_lcr unload bug, found by Patrick 2012-03-01 08:40:28 +01:00
Wimpy 65ce8fa13a Added support to chan_lcr for Asterisk version > 10 2012-02-21 11:42:20 +01:00
Andreas Eversberg e9dd99a401 chan_lcr: Minor fix for Asterisk versions >= 10
subclass.codec or subclass is not part of frame anymore.
2012-01-03 11:29:43 +01:00
Arnold Schulz 77bacac2bd For chan_lcr with Asterisk 1.8, set the codec type of a frame into the correct
union member ast_frame_subclass::codec (instead of ast_frame_subclass::integer).

The old code caused an error in some environments, eg big endian Arm (armeb):
"__ast_read: Dropping incompatible voice frame on lcr/1 of format alaw ..."

Signed-off-by: Arnold Schulz <arnysch@gmx.net>
Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
2011-11-08 16:14:57 +01:00
Gregory Nietsky affef8c1e1 Patch to allow chan_lcr to work with asterisk 10
The patch tries to maintain backward compatibility i have not tested this.

Have tested inbound outbound and T.38 gw call accross it.
2011-10-15 09:34:06 +02:00
Andreas Eversberg 9f505bd729 Additionally adding output of bchannel "ref" at some debug output. 2011-08-11 15:23:23 +02:00
Andreas Eversberg 03f26ba386 [chan_lcr] Unloading chan_lcr is now possible
Hi,

I tried to tackle the issue that 'core stop|restart when convenient' won't
work because unloading chan_lcr does not work.

The issue is that the thread blocks in select().

I tried to move the clean-up work from after the main select loop to the
module unloading code, make that loop a real infinite loop and replaced
pthread_join() by pthred_cancel().

The result seems to work.
Proposed patch attached.

Unloading chan_lcr while it has open channels is fatal, with or without
that patch.

   Greetings,
     WIMPy
2011-02-24 08:59:17 +01:00
Andreas Eversberg b8ba879d97 [chan_lcr] Fixed broken communication with chan_lcr
There are two modes:

The remote mode is used to route a call directly to Asterisk or route a
call from Asterisk to an ISDN interface. (the old way)

The interface mode is used to handle chan_lcr as an interface, so calls
from Asterisk can be routed and behave like they come from an ISDN
interface. (documentation for that will follow)
2011-02-20 10:23:03 +01:00
Andreas Eversberg b787bfbf47 [chan_lcr] Fixed caller ID for calls from AST->LCR 2011-02-20 09:33:31 +01:00
Andreas Eversberg 5705b3e17b Improved and applied Wimpy's Asterisk 1.8.x support.
configure script will automatically detect new asterisk API, so there is
no need for different chan_lcr.c source codes.

'type', 'presentation', and 'screening indicator' are now transcoded.
2010-12-14 10:56:09 +01:00
Andreas Eversberg 3a8f58ec89 Adding interface support for remote app (chan_lcr).
chan_lcr can be handled as an interface. This way it is possible to (e.g.):
- make a SIP phone become an LCR extension with all LCR features.
- make conference calls. (untested)
- perform parallel ringing. (ISDN phone and SIP phones can ring in
  parallel.)
- do voice recoding.

It is still also possible to link chan_lcr directly without interface
(as before).

Documentation/howto for that will follow.
2010-12-13 09:22:49 +01:00
Peter Schlaile 3fd79822b1 Workaround for "noise" problems with app_rxfax in current LCR.
The problem: for some reason, asterisk silently switches write_format
from SLINEAR to ALAW when using app_rxfax, thereby effectively disabling
automatic conversion SLINEAR->ALAW and thereby breaking app_rxfax after
the first call to ast_write(). Read: instantly, after the first data frame.

Older versions of LCR work flawlessly, until we find out, what really triggers
the problem, we at least switch the channel back, since it never makes
sense to send something different than ALAW to chan_lcr.
2010-12-13 09:13:04 +01:00
Andreas Eversberg c62fe17ee3 See commit 728d... It was not applied correctly. 2010-12-13 09:12:15 +01:00
Andreas Eversberg 2b9a46d542 Remove the last commit, because it was in the wrong branch. 2010-12-13 09:06:54 +01:00
Andreas Eversberg 8a041720cb [chan_lcr] Fixed caller ID by clearing ast->cid first
Tests with asterisk 1.6.2.13 showed that callerid did not work
unless the ast->cid structure is set to zero.

Thanx for Marcello for prividing this fix.
2010-10-30 17:24:20 +02:00
Andreas Eversberg a71c27047b [chan_lcr] Fixed uninitialized variable in ast_read()
Thanx to Martin for this bug report.
2010-09-28 08:55:29 +02:00
Andreas Eversberg 6b858efdae [chan_lcr] Added second caller ID (ANI) in case the caller ID is user provided. 2010-09-28 08:50:55 +02:00
Andreas Eversberg 1732b615a1 Removed debugging output from chan_lcr 2010-08-04 15:12:05 +02:00
Andreas Eversberg db5c235146 Removed ast_log again for testing. Seems that it also causes dead-locks when it is used this way. 2010-07-26 08:44:07 +02:00
Andreas Eversberg 6fa1349ce7 Enabled ast_log again and changed usleep during trylock to 1. 2010-07-21 11:42:04 +02:00
Andreas Eversberg 0b497a7473 Removed the lock-debugging for chan_lcr.
Apply reverse for future debugging.

	modified:   chan_lcr.c
	modified:   select.c
2010-07-21 11:27:58 +02:00
Andreas Eversberg 5a7b2b5200 Another test patch. 2010-07-09 11:53:46 +02:00
Andreas Eversberg f16d257c5a Since this banch only is for debugging the chan_lcr deadlock problem, i will commit from now on without comments. 2010-07-08 09:47:08 +02:00
Andreas Eversberg 86dda4048a Another "trylock" test. 2010-07-07 09:14:21 +02:00
Andreas Eversberg ec4c180567 The "trylock" test patch. 2010-07-06 17:53:21 +02:00
Andreas Eversberg 46d07c5968 Disabled log_ast and replaced it by simple printf. 2010-07-05 09:42:53 +02:00
Andreas Eversberg 443a7c9eb2 Hopefully fixed the double log bug that causes so much trouble. 2010-06-30 11:48:11 +02:00
Andreas Eversberg 7b14ecc400 More debug. 2010-06-24 09:23:27 +02:00
Andreas Eversberg 8155a3b252 More debug 2010-06-22 09:47:56 +02:00
Andreas Eversberg 69ad78e230 Added more detailed debugging for the locking problem. 2010-06-14 12:31:52 +02:00
Andreas Eversberg 91601aaa42 Added additional debug logging to lcr_read. 2010-06-09 09:58:34 +02:00
Andreas Eversberg 6e5729bfa4 Removed LF from debug code. 2010-06-09 09:37:28 +02:00
Andreas Eversberg 5c120fb508 Updated debugging patch. 2010-06-08 16:33:00 +02:00
Andreas Eversberg 513e12ace5 Test patch #1 for chan_lcr, to debug the Asterisk freeze problem. 2010-06-04 10:27:17 +02:00
Andreas Eversberg 6d4a65705a Added patch to play ringing tone when connected but the call is forwarded
and ringing again. Thanx to Jacek for this patch.
2010-05-28 08:36:00 +02:00
Andreas Eversberg a498faceb2 Fix for redirection number. Thanx to Dennis for this bugfix.
I changed it a bit, so the redirection number is converted from
national/international format into numerical format. (adding prefixes)

If there is still a problem with it, let me know.
2010-05-28 08:19:30 +02:00
Andreas Eversberg 00c52acce5 Fixes a locking bug in chan_lcr. Thanx to WIMPy for that report.
modified:   chan_lcr.c
2010-04-30 13:29:15 +02:00
Andreas Eversberg 2732c3ce40 Fixed output problems of error messages while parsing options.conf / gsm.conf.
modified:   Makefile.in
	modified:   bchannel.c
	modified:   chan_lcr.c
	modified:   genext.c
	modified:   gsm.cpp
	modified:   gsm.h
	modified:   gsm_conf.c
	modified:   lcradmin.c
	modified:   main.c
	modified:   options.c
	modified:   options.h
2010-03-17 08:31:07 +01:00
Andreas Eversberg 0c65074b5b Fixed compiler warnings when compiling with gcc 4.3.4.
Fixed names of moved include files (OpenBSC).

	modified:   Makefile.am
	modified:   Makefile.in
	modified:   README
	modified:   chan_lcr.c
	modified:   configure
	modified:   configure.ac
	modified:   genrc.c
	modified:   gentones.c
	modified:   genwave.c
	modified:   gsm.cpp
	modified:   mISDN.cpp
	modified:   main.c
	modified:   port.cpp
	modified:   tones.c
	modified:   trace.c
2010-03-11 14:07:20 +01:00
Andreas Eversberg 8fb861ef9e - Fixed HLC (higher layer capability) modification to LCR routing.
- Fixed chan_lcr fax queue buffer. Added LCR_TRANSFERCAPABILITY environment.

-> use options "n:t:q250" for sending/receiving faxes with asterisk and chan_lcr.

	modified:   README
	modified:   action.cpp
	modified:   bchannel.c
	modified:   chan_lcr.c
	modified:   route.c
	modified:   route.h
2010-01-24 19:41:32 +01:00
Andreas Eversberg 34b17bad86 Added queue buffer for chan_lcr sending faxes without interruption.
Use options "t:q250" for disabling mISDN_dsp and adding a 250ms delay.

	modified:   README
	modified:   bchannel.c
	modified:   bchannel.h
	modified:   chan_lcr.c
	modified:   chan_lcr.h
	modified:   select.c
2010-01-24 14:22:34 +01:00
Andreas Eversberg b0bd74e35e Replaced polling loop for LCR and chan_lcr with select based event loop.
Now LCR and chan_lcr will not use any CPU until there is work to do.
2010-01-16 11:20:23 +01:00
Andreas Eversberg baade79961 Test fix for lcr and dtmf.
modified:   chan_lcr.c
2010-01-15 21:28:33 +01:00