Holger Hans Peter Freyther
45c2184c7e
mgcp: Return with NULL if we fail the size check.
2011-01-07 11:36:54 +01:00
Holger Hans Peter Freyther
f43f2fce82
mgcp: We want to count trunks starting from one.
2011-01-07 11:34:50 +01:00
Holger Hans Peter Freyther
9f239a2a0f
mgcp: Parse a Digital Trunk endpoint name.
2011-01-06 19:35:10 +01:00
Holger Hans Peter Freyther
6adac17a10
mgcp: Include a MGCP Response String in the response
...
Switch to a \r\n at the end of the query. Both \n and \r\n
are valid according to the spec but this makes us match
responses of other equipment.
2011-01-06 19:35:10 +01:00
Harald Welte
9af6ddfcec
License change: We are now AGPLv3+ instead of GPLv2+
...
The reason for this is quite simple: We want to make sure anyone
running a customized version of OpenBSC to operate a network will
have to release all custom modifiations to the source code.
2011-01-01 15:39:34 +01:00
Holger Hans Peter Freyther
8b19dee437
mgcp: Send data from the network to the transcoder too
...
We now should be able to transcode in both directions.
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther
bd7b3c5e45
mgcp: Introduce trans_bts and send BTS packets from this port
...
Introduce the trans_bts. Right now only a port is allocated
and the packets from the BTS are sent from this socket.
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther
e97155a2af
mgcp: Keep the local_port like it was set on allocation
...
Do not reset statically allocated local_port. The port
might be different to the calculation of endpoint number
and base port. This might be the case for the coming remote
transcoding.
2010-11-02 19:06:13 +01:00
Holger Hans Peter Freyther
2126233590
mgcp: Rename transcoder_end to trans_net
...
Packets arriving for trans_net will be send out to the
networking. We will introduce a trans_bts in a second.
2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther
b54048fe25
mgcp: Make transcoding a per Endpoint configuration
...
This allows to switch off transcoding on the fly, or only enable
it for certain vessels with known problems.
2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther
fbca4ea117
mgcp: Fix the indetion of this code. it should use tabs
2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther
cf1c8777a4
mgcp: Return 0 in case transcoding is disabled.
...
In case transcoding is disabled no error has happened, return
a zero. This is fixing starting the nat without transcoding.
2010-09-24 04:41:28 +08:00
Holger Hans Peter Freyther
557b1ab15b
mgcp: Remove code duplication for filling out the sockaddr_in
...
Share the send to transcoder sockaddr sending routines.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
f2eedff052
nat: Send a transcoder reset on start up.
...
The transcoder RESET is using the same extensions to reset all
endpoints on a remote site. This makes sure that all allocations
can be made in a properly configured network.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
b98ba72e0a
mgcp: Make the base port of the transcoder configurable
...
The code assumes a static mapping from endpoint to RTP port,
be able to configure the start of such a mapping.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
3b5e3c4d6f
mgcp: Prepare the CRCX/MDCX/DLCX messages for the transcoder.
...
Send CRCX/MDCX/DLCX to the transcoder, fill out transcoder_end with
the interesting data and hope that it is going to work.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
218f8564e1
mgcp: Forward data from the BTS-in to the transcoder
...
Bind a new port for the transcoder, forward data from the BTS
to the transcoder, and from the transcoder to the network. Leave
BTS-IN where it is, BTS-OUT can now be after the transcoding took
place. We send the data from the BTS RTP port.
This whole route will be guarded by the transcoder_ip and if it is
NULL (current default) it will not go through the transcoder.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
e02860af00
mgcp: Be able to parse 'sendonly' for the connection mode.
2010-09-20 02:49:09 +08:00
Holger Hans Peter Freyther
0e940e65c7
mgcp: Switch the default audio codec to AMR
2010-09-20 02:48:59 +08:00
Holger Hans Peter Freyther
adb6e1cce1
janitor: Move the * to the variable name
2010-09-18 06:44:24 +08:00
Holger Hans Peter Freyther
9e9392d5b3
mgcp: Use transient errors in more cases...
2010-08-08 16:24:48 +08:00
Holger Hans Peter Freyther
e378cb1341
mgcp: Reduce the log level to debug for these calls.
2010-08-06 20:22:23 +08:00
Holger Hans Peter Freyther
39a97e24fb
mgcp: Remember if the endpoint was allocated...
...
Do not use the CI_UNUSED to decide if an endpoint is allocated
but introduce a new flag. This way only the CRCX and free_endp
play with the allocated field.
2010-08-06 18:03:11 +08:00
Holger Hans Peter Freyther
869e38eced
mgcp: Add a callback to inform the client that an endpoint got reallocated
2010-08-06 17:54:27 +08:00
Holger Hans Peter Freyther
4634013cde
mgcp: Make the CI uint32_t all the way to avoid mismatch
2010-08-06 08:29:37 +08:00
Holger Hans Peter Freyther
414bf401c7
mgcp: Move the mgcp_free_endp into the right path for the CRCX failure
2010-08-06 07:05:13 +08:00
Holger Hans Peter Freyther
260d6ed02c
mgcp: Add a call tap feature to forward audio to another forward port
...
For debugging it is useful to forward (tee) UDP packets to another
system and use gstreamer to inspect the rtp stream. This is untested
code and might contain bugs.... and of course only tap your own calls.
2010-08-06 01:12:21 +08:00
Holger Hans Peter Freyther
6357a8e311
mgcp: Patch RTP packets again if that is allowed.
2010-08-05 20:08:22 +08:00
Holger Hans Peter Freyther
a39ddd5654
mgcp: Get the for network/for bts flag right.
2010-08-05 19:35:44 +08:00
Holger Hans Peter Freyther
f138f917ec
mgcp: Allow to dynamically allocate ports from a range..
...
Allow to switch to a dynamic port allocator and not reuse
the ports for a long time... This should help with a crazy
network sending two streams at the same time.
2010-08-05 08:08:17 +08:00
Holger Hans Peter Freyther
15e7389cf0
mgcp: Prepare to have different port allocation strategies.
2010-08-05 07:10:56 +08:00
Holger Hans Peter Freyther
314584ab44
mgcp: Allocate a different port for the networking...
...
Use the right source port when sending the message.
2010-08-05 06:12:02 +08:00
Holger Hans Peter Freyther
196349dda1
mgcp: Rename the base port to bts_base as it will be used for the bts
2010-08-05 06:10:58 +08:00
Holger Hans Peter Freyther
c49212778f
mgcp: Move the bfd for rtp/rtcp into the port
...
Stop using the memset in the mgcp_rtp_end_reset as we
will reset the list pointers and then have a mess..
2010-08-05 06:10:58 +08:00
Holger Hans Peter Freyther
f1a168dc20
mgcp: Only use early bind for the BTS socket.
...
Simplify the code by onlt allowing one way to allocate
a socket.
2010-08-05 06:10:57 +08:00
Holger Hans Peter Freyther
58ff219c85
mgcp: Attempt to separate the RTP/RTCP port for the Network and for the BTS
...
We plan to have two different ports for the network and for the
BTS to avoid detecting the BTS and to dynamically allocate the
port to have old data not go to a new socket.
2010-08-05 06:10:57 +08:00
Holger Hans Peter Freyther
a17d701a70
mgcp: Group the state for bts/net into a struct and have two instances
...
Group the data that each end (network/bts) have into a struct and use
this struct throughout the sourcecode.
2010-08-05 06:10:54 +08:00
Holger Hans Peter Freyther
89976e8285
mgcp: Style issue... add a space.
2010-08-03 23:57:16 +08:00
Holger Hans Peter Freyther
3186892771
mgcp: Move the rtp state into a struct
...
Use a struct to group the rtp state for the up and the down
link of the bts.
2010-08-03 23:57:16 +08:00
Holger Hans Peter Freyther
c597a4eba1
mgcp: Allow to change the receive (the loopback part) via the VTY
2010-08-03 03:04:31 +08:00
Holger Hans Peter Freyther
98a3877e97
mgcp: Implement the "loopback" mode for a connection endpoint.
2010-08-03 02:27:21 +08:00
Holger Hans Peter Freyther
380b8711a2
mgcp: Attempt to count missing RTP packets with a basic calculation
...
This code compares the UDP sequence numbers of two RTP messages
and guesses if packets are missing. It is guessing in two ways:
1.) by default the sequence number is 0, so on the first
value we ignore the jump... we might ignore a real issue
in case of a wrap around which is easily possible as the
sequence should be a random number.
2.) the UDP stream might have been reordered on the network
and we would see the jump...
In any case these two shortcomings are acceptable for the feature
that is meant to provide some basic analysis..
2010-07-29 02:41:38 +08:00
Holger Hans Peter Freyther
32d4e50d46
[mgcp] Possible memleak fix for the allowed reallocation case
...
When allowing to reallocate an allocated endpoint we will need
to free it first. When freeing we will free the call id and other
ids that we would have leaked otherwise.
2010-04-25 23:02:55 +08:00
Holger Hans Peter Freyther
e3d16bb775
[mgcp] Protocol extension to not generate answers.
...
For the NAT we want to send requests in a send and forget
way and we are not interested in seeing the answers, so tell
the gateway to not answer them.
2010-04-25 23:02:17 +08:00
Holger Hans Peter Freyther
74076934fb
[mgcp] Print a Deleted endpoint message again.
2010-04-25 23:02:05 +08:00
Holger Hans Peter Freyther
408cc4ace9
[mgcp] Add an option to allow using reallocing an endpoint
...
For some mode of operation it can be acceptable to reallocate
an already allocated endpoint. This can be the case when we
only deal with one call agent that is keeping track of the
endpoint but slightly confused.
2010-04-07 22:52:25 +02:00
Holger Hans Peter Freyther
b4b135efbf
[mgcp] Count incoming RTP packets from the BTS and remote
2010-04-07 22:51:59 +02:00
Holger Hans Peter Freyther
b4c7b274a1
[mgcp] Reset the the address when freeing the endp as well
2010-04-06 12:13:19 +02:00
Holger Hans Peter Freyther
f2f1591ce7
[mgcp] Export header parsing via mgcp internal
...
This will be used by the NAT code to implement custom protocol
handling on top of that.
2010-04-05 22:02:54 +02:00
Holger Hans Peter Freyther
f36a11a35d
[mgcp] Do not operate on the ->data pointer, use ->l2h instead
...
This would have been broken once we attempt to parse encapsulated
MGCP messages.
2010-04-05 22:02:47 +02:00