Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Print some more information, e.g. when a BSC is connected
and authenticated, print the SCCP ref number.
|
|
This message can get in the way during a re-establishment
of the MSC connection while the MSCs gateway is still sending
data to us.
|
|
The SCCP might have been freed by the error case already
so we need to check this one for zero.
|
|
|
|
Extract the port from the BSS's MGCP Gateway so we know
where to forward the data to.
|
|
|
|
|
|
|
|
Instead of checking the token for NULL we need to check if running
was set to null. Look at the data of the token and check if the line
was ending with a \r\n or \n and then when rewriting a line use that
line ending as well. Add a new test for that.
|
|
we will need the call identifier for the MDCX and DLCX message
for now we were just assuming it would increment, use som python
to extract the CI from a possible response, also switch back to
a blocking read to test the BSC nat.
|
|
The length field of the IPA header allows to have 16bit numbers
and I just ran into the 300 byte limit with MGCP messages. Make it
three times the size and see how long this is going to be enough.
|
|
The endp is part of an array allocated by talloc and simple
array members do not qualify as a context start address.
|
|
The MGCP protocol parsing is adding '\0' to make sure we do not
parse beyond where we should parse. This does not mix with strtok
or similiar routines.
For now we will read the msg into a global array first, then copy
it to the msgb for mgcp protocol handling and if we are required
to forward it to the MGCP we have a untouched copy we will modify
into our own msgb.
|
|
|
|
|
|
we need to set the msgb l2h to the right position otherwise
when trying to dump it we will have a nice crash.
|
|
len contains the actual length of the message and data_len
contains the size of the message. We want to read up to
data_len and not up to 0 bytes.
|
|
|
|
|
|
The autobind is not working as I wanted it to work. So we will
revert this for now and then try something else.
This reverts commit fd876b7488a8ae924f1a09144265d4474495408f.
|
|
When moving it up here the code started to reject
the identity responses of the bsc and we would
never authenticate. Move it back down.
|
|
When reading MGCP is failing (e.g. because the udp socket
is not connected yet) we would have freed the msgb but we
didn't return and then executed msgb_put on a dead buffer.
|
|
Attempt to find the message by transaction id, then patch
the response and use the IP/PORT of the local network, update
the ci with the one from the BSC.
This is currently not tracking any state of the MGCP and will
not handle two bsc's... this will need to happen later.
With this in we should be feature complete and now enter the
mode of making all of this work reliable and fixing thinko's
and other bugs.
|
|
|
|
* Forward a rewritten msg to the BSS. We change the IP and port
to point to the NAT instead of the core network. We also keep
track of the BSC and the transacition id.
* Handle the case where we have not found a SCCP connection and
need to send a response ourselves.
|
|
This will allow to discover the ports of a bts when we only know
the addr and have multiple bts's to handle.
|
|
Add code to change the ip and port for audio data inside
MGCP messages. This is needed because the BSS might be
behind the NAT and can not reach the network directly and
might be behind a nat so the announced sourceport is not
the one as we see it.
|
|
|
|
This will be used by the NAT code to implement custom protocol
handling on top of that.
|
|
This would have been broken once we attempt to parse encapsulated
MGCP messages.
|
|
|
|
Listen on the MGCP gateway port and let our protocol stack
handle everything for now. We will need to have some more
control over things though.
|
|
|
|
|
|
In the case of the nat we only want to communicate with one
upstream call agent and this can now be configured.
|
|
|
|
Move the conversion of GSM0808 timeslot and multiplex from
the bssap.c into the mgcp.h so it can be reused by multiple
users. The weird math comes from the mapping of the MSC...
|
|
When losing the SCCP connection make sure that we free all
endpoints. The disconnection of the BSC should already make
sure they are closed but this makes sure everything is
properly reset.
|
|
No need to call it twice... All endpoints should be properly
freed as part of the SCCP disconnection.
|
|
We do not care about the source port for the callagent relay
and can use the autobind functionality of the kernel to pick
a port for us...
|
|
Attempt to bind to the local callagent port and send messages
from the MSC TCP connection to the MGCP and do it the otherway
around as well.
|
|
Make sure the MGCP attached to the BSC is resetting all
endpoints whenever the BSC is connecting to us as we assume
that all endpoints are available.
|
|
We could change that the message came from a special ip
address/port to secure this service in general but we don't
do that right now.
|
|
This will just call a callback and leave all the handling
to the application.
|
|
This was removed when sending the RSIP was
removed from the code.
|
|
|
|
This message is ignored by the call agent and we were
sending this on the first request which we maybe should
not ignore...
|
|
When we have assigned the cn we will use mempcy to copy the one
byte into the target. Use a static assert to assure that the type
have the same size.
warning: dereferencing type-punned pointer will break strict-aliasing rules
|
|
|