Commit Graph

556 Commits

Author SHA1 Message Date
Andreas Eversberg 74a7fe54a8 Adding simple bridge application to forward calls without PBX app.
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.
2012-01-16 09:14:22 +01:00
Andreas Eversberg d928442c51 Forward DTMF as message directly from GSM BS to SIP.
In case rtp-bridge is used, tones cannot be generated. Instead,
a message is forwarded to SIP endpoint, so it generates it itself.
2012-01-15 10:51:58 +01:00
Andreas Eversberg 5463e1b62a Added bridgin support for GSM and SIP
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.
2012-01-15 09:42:35 +01:00
Andreas Eversberg 877a2dfd52 Adding bridge between protocol handlers (ports)
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.
2012-01-14 18:36:26 +01:00
Andreas Eversberg 863bc64219 Adding basic SIP support, using Sofia-SIP stack
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.
2012-01-13 06:24:21 +01:00
Andreas Eversberg e9c834b844 Various minor fixes 2012-01-13 05:18:49 +01:00
Andreas Eversberg 57a91e52d4 Adding shutdown option to interface.conf
This way an interface can be disabled by just one keyword
and not by uncommenting all lines of it.
2012-01-13 05:13:30 +01:00
Andreas Eversberg 29ba196ca5 Fixed NULL-pointer bug when unloading of GSM interfaces 2012-01-07 09:34:51 +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
Andreas Eversberg 92b9d54385 Disabled layer2-hold from CCITT#5 interfaces
C5 does not require D-channel.
2011-10-16 08:35:43 +02: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 2106a9212c Adding "fflush" to debug.log.
This is usefull when using "tail -f". The debug will be written to
the debug.log file right when the debug function is called.
2011-10-15 09:29:44 +02:00
Andreas Eversberg c67eb25986 Adding additional debugging to joinremote.cpp
Now it is possible to see the relation between LCR endpoints and
chan_lcr instances.
2011-10-15 09:28:11 +02:00
Andreas Eversberg 41a0668da1 Fixed mncc.h for GSM. Audio works again with latest OpenBSC. 2011-10-02 08:52:13 +02:00
Karsten Keil a5846418d9 Remove unused variable ret
ret is not longer used for the new pid assign method.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
2011-09-28 12:17:00 +02:00
Karsten Keil 7b103167ba Handle MT_L2IDLE
MT_L2IDLE is send by the mISDNuser library when all L2 processes
are gone. We could sent a MT_L2RELEASE if we are the L2 master and
do not want permanent L2 monitoring. This would deactive L2 and also
shutdown L1.

For now we do nothing, only log a debug message.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
2011-09-28 12:09:54 +02:00
Karsten Keil 6336acef6e Bump version to 1.11
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
2011-09-24 09:38:32 +02:00
Karsten Keil 73353997fd New pid handling
The old method was racy, it did use the callback function to deliver the
result, which need special handling because of possible deadlocks.
Now we use a request function which returns the value directely.
The old method is still available, but will get removed soon.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
2011-09-24 09:29:28 +02:00
Karsten Keil 2e383446ad New names for redirection numbers
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
2011-09-24 09:27:43 +02:00
Karsten Keil d19e69fe80 New init and debug interface
Works with the newer mISDNuser library.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
2011-09-24 09:25:41 +02:00
Andreas Eversberg 27ade6eeb9 Increas version number to 1.10 2011-09-07 08:07:37 +02:00
Andreas Eversberg 011ef7a785 Checking for GSM codec to be installed at configure.
Also outputting what is supported and what not.
2011-09-07 08:05:11 +02:00
Andreas Eversberg 590407f7f5 Fixed missing channel IE in some cases.
NT-Mode: channel IE must be included in all cases
TE-Mode: channel IE can be omitted only if any channel is requested.
2011-09-03 15:54:37 +02:00
Andreas Eversberg 97aa0881be Support of GSM uses socket interface for both network and mobile
There is no linking of any osmocomBB source code required. In order
to use osmocomBB or OpenBSC, just enable the interface, as described
in defaults/interface.conf. At osmocomBB/mobile or at OpenBSC, just
use the option "-m" to enable the socket interface.

Enable GSM at LCR with "./configure --with-gsm-ms --with-gsm-bs".
2011-09-02 11:08:56 +02:00
Andreas Eversberg 08bdc61deb Fixed broken timeout condition
A given timeout condition never made the rule match.
2011-09-02 10:01:07 +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 5df02da464 Fixed wrong reference when requesting a channel from chan_lcr.
This caused audio not to be available, for every call or after
some time.
2011-08-11 15:23:01 +02:00
Andreas Eversberg b6eb854786 Minor cosmetic fix of logging output 2011-08-10 21:51:46 +02:00
Andreas Eversberg 8b70a9a5c2 Fixed forking, to prevent LCR to run multiple times
Executing a script caused very weird behaviour, due to forking of LCR.
2011-08-10 21:50:45 +02:00
Andreas Eversberg ca68dbb3a5 Make install now works again. (Missing and required macro defintion) 2011-07-30 09:46:27 +02:00
Andreas Eversberg 132d639333 Make LCR compile with latest osmocomBB code.
Tested with sylvain/traffic branch.
2011-07-28 23:03:51 +02:00
Andreas Eversberg 53eb7f5176 gsm->network must be set != NULL, to make it work correctly
Thanx to Lennart for finding this Bug.
2011-07-25 11:38:50 +02:00
Andreas Eversberg 042a9564c2 Make LCR compile again with OpenBSC
Added missing include. Thanx to Harald for providing this patch.
2011-07-25 11:37:28 +02:00
Andreas Eversberg 39a36cb99a Make LCR compile with latest osmocomBB code.
The libosmocore structure has changed.
2011-07-20 12:59:35 +02:00
Andreas Eversberg d0698802a0 Don't try to install default/gsm.conf as it was removed.
Patch by: Janis
Signed-off-by: Andreas Eversberg <jolly@eversberg.eu>
2011-07-20 09:18:59 +02:00
Andreas Eversberg 69ee0ebc5b Minor fix: remote.c -> remote.cpp in Makefile.am 2011-07-20 09:16:01 +02:00
Andreas Eversberg ad6182c219 Changing version number to 1.9 2011-07-14 16:10:39 +02:00
Andreas Eversberg 1644587004 This was missing at merge:
deleted:    Makefile.in
	deleted:    configure
	modified:   gsm_bs.cpp
	modified:   gsm_ms.cpp
2011-07-14 14:33:22 +02:00
Andreas Eversberg da91d7d85f Merge branch 'develop'
Conflicts:
	Makefile.in
	README
	chan_lcr.c
	configure
	gsm_bs.cpp
	gsm_ms.cpp
	interface.c
	route.c
2011-07-14 14:25:42 +02:00
Andreas Eversberg 2f5c3dc130 [GSM] Replaced strcpy by required macro name. 2011-07-10 19:52:08 +02:00
Andreas Eversberg 34598a3464 [gsm] Make LCR work with current Osmocom-BB.
Osmocom-BB is still developed, and this only works with the jolly/voice
branch. Audio is not yet transmitted, so it is not quite usefull yet.
2011-02-26 16:49:21 +00:00
Andreas Eversberg d4097e3558 [mail] Prevent bustling error message when sending mail without attachment
this cosmetic patch removes a false error message from LCR's mail when
no attachment is wanted.

thanx to bodo for providing this patch!
2011-02-24 10:17:44 +01: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 7798beeab2 Incremented version number of lcr in develop branch. 2011-02-21 09:42:32 +01:00
Andreas Eversberg d5e639588d [gsm] Removed obsolete gsm.conf handling. Fixed minor compiling issues. 2011-02-20 17:34:24 +01:00
Harald Welte 0eebd3a28e don't execve() a shell process but always double-fork and then exec the program directly 2011-02-20 11:33:53 +01:00
Harald Welte 998bb9ca7d GSM MNCC: Make sure to set the MNCC_F_KEYPAD when ACKing DTMF
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.
2011-02-20 11:33:46 +01:00
Harald Welte 0af1aa359f MNCC: refuse any incoming SETUP if there is no MNCC connection 2011-02-20 11:33:40 +01:00
Harald Welte 0345a55ca7 MNCC: Re-connect to the MNCC socket if connection was lost 2011-02-20 11:33:28 +01:00