Commit Graph

1426 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther a49ffb4cb4 Create a liblaforge with OpenBSC utility functions to be used for other projects 2010-02-09 21:51:44 +01:00
Holger Hans Peter Freyther 701d175653 [tlv] Implement a variant for the IDTAG list for the IPA
Implement a helper that will allow to easily fill the
tag list with data.
2010-02-09 17:40:59 +01:00
Holger Hans Peter Freyther fb0b6fcaea [bsc] Allow to set a EGSM900, RGSM900 ARFCN
For R-GSM900 the channels 955-1023 are within the 900er band. The
System Information Type generation can not cope with these channels yet.
2010-02-09 17:40:49 +01:00
Holger Hans Peter Freyther d3d5be1cde [ipaccess] Make the IPA version of LTV public. 2010-02-09 17:40:37 +01:00
Holger Hans Peter Freyther 3bc856bc16 [ipa] Make sending of ID REQ public...
Make sending of the ID Request message public. We are going
to use this in the BSC NAT code to ask for querying the BSC.
2010-02-07 13:21:51 +01:00
Holger Hans Peter Freyther 301e628761 [ipaccess] Create a method to send the ID ACK messages 2010-02-07 13:21:40 +01:00
Holger Hans Peter Freyther f5b36cac6b [telnet] Remove ancient #define... 2010-02-07 13:19:54 +01:00
Holger Hans Peter Freyther 9377528c70 Merge branch 'on-waves/mgcp' 2010-02-03 18:11:22 +01:00
Holger Hans Peter Freyther 92026f1cef [mgcp] Refer to the right Company in the Copyright/Copyleft line
Use On-Waves instead of the name I made up from the domain name.
2010-02-03 18:10:07 +01:00
Holger Hans Peter Freyther 62e836c533 [mgcp] Make the mgcp_protocol generate a struct msgb*
Do not directly send data from inside the mgcp_protocol.c
implementation. Instead allocate and return a struct msgb*. The
caller can then either wrap that into the IPA protcol or directly
send it over the UDP socket.
2010-02-03 11:03:45 +01:00
Holger Hans Peter Freyther 77f7afe08e [mgcp] Prepare the in process MGCP handling by adding callbacks
* Call a callback when the endpoint was created, modified or deleted. This
  can be used by the BSC MUX to send a MGCP packet over TCP to the right
  the BSC to allocate the endpoint there with the right data, or it can be
  used in the BSC to send the right commands to the BTS.
2010-02-03 09:54:43 +01:00
Holger Hans Peter Freyther 2ada71de64 [mgcp] Replace DEBUGP with the LOGP statement
* Classify messages as LOGL_INFO or LOGL_ERROR
2010-02-03 09:13:10 +01:00
Holger Hans Peter Freyther e0955029a1 [mgcp] Prepare to do MGCP over TCP and inside the bsc_msc_ip process
* Separate main process and protocol handling into two parts.
* Change the protocol handling to work with UDP and TCP connection
* This will allow to speak MGCP over TCP between the BSC MUX and
  the real BSC.
2010-02-03 08:50:33 +01:00
Holger Hans Peter Freyther 89f3cb8606 [mgcp] Rename the source to mgcp_main.c 2010-02-02 12:07:21 +01:00
Holger Hans Peter Freyther a18445d262 [mgcp] Move the MGCP procoess into a sub directory 2010-02-01 14:00:07 +01:00
Holger Hans Peter Freyther e01ee97cd3 [mgcp] In forward mode we need to rediscover the BTS more often
In plain forward mode we don't have DLCX which will clean
and reset the configuration. We will need to remember the
last GSM BTS port and send data to it.
2010-02-01 13:17:04 +01:00
Holger Hans Peter Freyther 9100e1dea4 [mgcp] Handle BTS and NET being on the same host
* Do not only check the IP but also the port to figure out
  where to send the data
* Do not memset the endp->remote inside the bind_rtp but from
  inside the crcx as this will be modified by the MDCX
2010-02-01 13:16:53 +01:00
Holger Hans Peter Freyther 9b28fc8be2 [mgcp] Warn about unknown messages... 2010-02-01 13:16:44 +01:00
Holger Hans Peter Freyther bd5130d3c1 [mgcp] Allow to forward to a different port 2010-02-01 13:13:31 +01:00
Holger Hans Peter Freyther 6c79646089 [mgcp] Rename rtp and rtcp variables to net_rtp and net_rtcp
Rename the variables to refer to the fact that they are
the ports of the remote.

So we have:
    rtp_port as the local address we are binding to
    net_rtp  for the network rtp
    bsc_rtp  for the bsc rtp
2010-02-01 13:13:21 +01:00
Holger Hans Peter Freyther 601a67e274 [mgcp] Make it possible to not specify a bts ip
This way the mgcp will allow anyone to be the BTS..
in the future we might need to communicate things
properly between BSC and MGCP.
2010-02-01 13:13:11 +01:00
Holger Hans Peter Freyther 1b891fd7ba [gsm48] Use optional Chan Mode 1 for the assignment command
Specify how we intend to use the assigned channel. This is
needed to make CC with early assignment work properly.
2010-01-28 12:46:04 +01:00
Holger Hans Peter Freyther 550197fd8c [gsm48] Allow to send the assignment command on a different lchan
Change the signature to take the lchan were the message is supposed
to be sent and the lchan which is supposed to be assigned.
2010-01-28 12:45:57 +01:00
Holger Hans Peter Freyther 93b6c6555c [rsl] Send the MultiRateConfig in the RSL Channel Activate msg
If the lchan has AMR as speech codec we also need to send the
multirate config IE in the channel activation. This is already
done for the RSL Channel Modify message.
2010-01-28 10:23:34 +01:00
Andreas Eversberg 1e1c6aa5a3 Make sure select() callbacks are not called multiple times
the unix select function returns a set of file descriptors to be
handled. the result-loop (the loop after the select()) is called again,
if more than one descriptor is removed by the callback funtion. this may
lead to a another call to the callback function, because the bits of the
FD_SETs do not change and still set.

i think we must clear these bits, if they are handled, so the handler
will not be called twice in case of a "restart" of that loop.
2010-01-23 10:52:38 +01:00
Daniel Willmann 604d851b89 Register GSM_BTS_TYPE_UNKNOWN in bsc_hack.c
The way the VTY configuration sytem works is that it first registers a
BTS of type GSM_BTS_TYPE_UNKNOWN and then sets the type correctly (after
encountering the type statement). This makes sure that registering a BTS
of type UNKNOWN succeeds.
2010-01-14 21:52:34 +01:00
Daniel Willmann f15c276382 [vty_interface.c]: Warn if no BTS could be allocated 2010-01-14 21:52:26 +01:00
Harald Welte 0677061757 update copyright statements
* include 2010
* add Andreas Eversberg and Sylvain
2010-01-12 10:46:27 +01:00
Harald Welte 714e1a29cc Merge remote branch 'goeller/master' 2010-01-12 10:46:03 +01:00
laforge 6af56d1501 Fix allocation of BTS from VTY
In 39315c4798 we introduced
per-bts OML attribute parser definitions and disallowed
a BTS of type unknown.

However, the VTY code first allocates a BTS with unknown type.
2010-01-12 10:46:27 +01:00
Holger Hans Peter Freyther ca8dc141eb Merge branch 'on-waves/mgcp' 2010-01-11 17:10:19 +01:00
Holger Hans Peter Freyther 620961983c [bsc_mgcp] Set the right remote rtp and rtcp port
* It is the same as local endpoint port
2010-01-11 16:58:08 +01:00
Holger Hans Peter Freyther 2c492ed276 [bsc_mgcp] Fix writing of the config file...
* Add the new forward audio option
2010-01-11 16:57:58 +01:00
Holger Hans Peter Freyther f986cfc508 [bsc_mgcp] Print a message which mode is configured 2010-01-11 16:57:51 +01:00
Holger Hans Peter Freyther 14083bef0f [bsc_mgcp] Add a new forward only mode to the bsc_mgcp
With forward IP in the config and early bind on we will
simply forward RTP data on the endpoints from BTS to the
forward IP address.

This is implemented by disabling MGCP functionality when
a forward IP address was specified, setting the forward IP
in the endp->remote and assigning a ci != CI_UNUSED.

Early bind will make sure the sockets are created, the BSC FD's
are registered and then the normal dispatch code will
do the forwarding.
2010-01-11 16:57:40 +01:00
Holger Hans Peter Freyther 98657d5dee misc: Fix compilation of the test cases. 2010-01-11 16:42:07 +01:00
Harald Welte a855d1f846 fix ipaccess-config, call missing nanobts initialization
FIXME: We really need to have some libbsc and libmsc initialization
functions that clean up this mess.
2010-01-10 18:37:38 +01:00
Harald Welte 202259c31e add sylvain and andreas as authors 2010-01-10 18:21:33 +01:00
Harald Welte 39315c4798 [OML] parse attributes depending on BTS type
Some NM attributes are defined differently depending on
the BTS type.  Having one big nm_att_tlvdef[] table for
all BTS types is no longer sufficient.  This patch

* introduces 'struct gsm_bts_model' to describe a BTS model
* adds definitions of gsm_bts_model for BS-11 and nanoBTS
* changes the abis_nm_tlv_parse() function: include a bts pointer
2010-01-10 18:01:52 +01:00
Harald Welte 5078148829 TLV: add function to patch a tlv definition table 2010-01-10 17:45:23 +01:00
Harald Welte 6e670aab5a introduce new gsm_bts_trx_by_nr() function 2010-01-07 20:45:42 +01:00
Harald Welte 2ef156db43 bis_nm_ipaccess_set_nvattr() executes on a TRX, not a BTS 2010-01-07 20:45:41 +01:00
Holger Hans Peter Freyther cbcfe24fee [vty] In case of handover only warn about the proxy mode when it is enabled
Do not warn if the user has put "handover 0" in his configuration
as this will not enable handover, only warn if it is going to be
enabled.
2010-01-07 16:14:38 +01:00
Holger Hans Peter Freyther d0c540210a Initialize reject_cause to a valid number
Currently starting with the opencfg.cfg.nanobts and writing it out
and then trying to start again will not work. The network reject_cause
is initialized to 0 which is not a valid reject reason and when writing
this to the config file and trying to parse it will fail.

Pick roaming not allowed as a harmless option to those phones
accidently trying to connect to the BTS.
2010-01-07 16:08:42 +01:00
Holger Hans Peter Freyther 17d81e2f95 [system_information] Initialize the buffer before moving it
In the case of ipaccess we are doing a ++output but then still
try to write 23 bytes into it and on my system this is leading
to a stack corruption.
2010-01-07 15:48:28 +01:00
Holger Hans Peter Freyther 7ec448d031 [system_information] Return how much byte were written into output 2010-01-07 15:48:28 +01:00
Holger Hans Peter Freyther caa14869c0 [rest_octets] Return bv.data_len to indicate how was written
Return the used data_len for the bitvector. This indicates
how much data might have been written.
2010-01-07 15:48:28 +01:00
Holger Hans Peter Freyther 4cffc45cbc [rest_octets] Change data_len to the sizes of the spec
Is that right?
2010-01-07 15:48:27 +01:00
Daniel Willmann 6a9fa7308d [bs11_config] Add pll-setvalue and pll-workvalue commands
These commands let you change the PLL set and work values. Many thanks
to Dieter Spaar for figuring out how to do this!
Now you can just reset your PLL work value if it drifts away due to your
E1 card.
Use it like this: bs11_config pll-workvalue 1000
2010-01-07 14:03:22 +01:00
Daniel Willmann f904fa80ee [bs11_config] Whitespace changes so the help text looks nice 2010-01-07 14:03:22 +01:00