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
TS 04.08 has a _mandatory_ KEYPAD FACILITY IE, and unless we set
the MNCC_F_KEYPAD, some phones will (legitimately) reject the
04.08 DTMF KEYPAD_ACK without that IE.
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)
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.
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.
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.
On a multipoint bus, it is required to assign a channel with no other
alternative allowed. This is required, because an individual phone on the
bus may not choose a different channel, while other phones accept the
indicated channel. Also an individual phone does not have the information
about other available channels. On a point-to-point configuration it is
possible anyway.
In this multipoint case, the channel assignment is now forced automatically,
even if the 'force' keyword is not specified in the "out-channel" of
interface.conf.
Additionally "lcradmin portinfo" shows the channel selection settings now.
This is needed for peers that require DTMF messages, rather than tones:
- GSM mobile stations
- Asterisk channel API
modified: apppbx.cpp
modified: apppbx.h
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.
On a multipoint bus, it is required to assign a channel with no other
alternative allowed. This is required, because an individual phone on the
bus may not choose a different channel, while other phones accept the
indicated channel. Also an individual phone does not have the information
about other available channels. On a point-to-point configuration it is
possible anyway.
In this multipoint case, the channel assignment is now forced automatically,
even if the 'force' keyword is not specified in the "out-channel" of
interface.conf.
Additionally "lcradmin portinfo" shows the channel selection settings now.