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>
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>
Because EFR/AMR/HR codecs use dynamic RTP payload types, it is essential
to forward the actual media types between endpoints too. These media
types are used for negotiation of codecs. A dynamic payload type is
used as given by remote peer. Locally generated payload types are used
when offering codecs to remote peer.
Since LCR does not put hands on any RTP frame when directly bridged between
OpenBSC and SIP, it will now allow all speech codecs that are commonly supported
by MS and remote SIP endpoint.
It must be noted that OpenBSC must support forwarding the codec types that
MS and remote SIP endpoints support.
Currently LCR negotiates the following codecs for GSM:
- Full Rate
- EFR
- AMR
- Half Rate
If a bridge is enabled, tones (e.g. hangup tone) will have priority
over the bridge. The bridge will continue to forward audio, after
tone is removed. (e.g after beeing on hold music)
In this case the frame is dropped, but audio of the last frame is repeated
with a reduced level. The level is reduced again an again until a new
valid frame is received. This way there is no silent gap in the audio
stream.
If all ends in a call use mISDN, the bridging is done by mISDN itself.
If one end of a call is not mISDN and there are two parties, the
traffic is bridged via LCR.
Call received on an interface can directly be forwarded to a given
destination interface, instead of routing the call through PBX
application. This way calls can be forwarded without going through
route.conf.
Currently only SIP and GSM destinations are supported. Also there
are no tones generated, if one side provides no tones, but the
other wants to receive them.
The keyword "bridge <output interface>" in interface.conf is used.
Without that keyword, incomming calls are handled as usual.
The dependency on mISDN (loopback interface) is completely removed
from GSM and SIP interfaces.
The built in bridge of LCR now forwards audio data between these
interface instances or between these instances and other instances.
Additionally both GSM BS and SIP support direct forwarding of RTP
traffic between other SIP endpoint and OpenBSC, so no traffic is
forwarded by the LCR itself. This is done by forwarding RTP peer
informations between these interface instances.
This is required to bridge traffic beween non-mISDN handlers,
such as GSM, SIP and voice box. Also it bridges traffic between
mISDN handlers and non-mISDN handlers. It is the fundamental step
to get rid of mISDN (loop interface) for non-mISDN handlers.
This is required to bridge audio e.g. between SIP and GSM without
using mISDN. There will be no limitations on 'b-channels' anymore.
Still GSM and SIP requires mISDN, but this will be changed later.
With that bridge I cleaned up some code and also removed the
MESSAGE_DATA, which is not required anymore.
This support is just a simple peer-to-peer support for basic calls.
Currently it requires mISDN_l1loop interface, as every non-ISDN
interface does. Later it will be possible to use it without.
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>