Commit Graph

13 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther fe86d3c9f8 [mgcp] Introduce a policy CB for the MGCP protocol
The are three policies. Accept, Reject and Defer. This will
allow to handle network connections and such from the policy
callback instead of directly acting on it.
2010-02-26 13:37:05 +01:00
Holger Hans Peter Freyther a820c5f89d [mgcp] Fix two bugs in the protocol handling
In case of a wrongly formatted AUEP, CRCX, DLCX, MDCX the
transaction id pointer was a dangling pointer... Initialize
the transaction id to a static string..

Also fix a off by one bug. We want to extract four elements
from the MGCP message and not only 3... So a short AUEP message
made it us read too many things.
2010-02-26 13:32:55 +01:00
Holger Hans Peter Freyther 63f2db2ec9 [mgcp] Switch logging from notice to debug 2010-02-26 13:31:46 +01:00
Holger Hans Peter Freyther 154b9553f7 [mgcp] Add a method to free the endpoint. 2010-02-26 13:30:23 +01:00
Holger Hans Peter Freyther 1b0ea97457 [mgcp] Move the network bits to a separate file...
This change separates the protocol from the actual network code
(bind, forward data). This will allow to more easily hook up the
RTP code from OpenBSC and to not use local sockets at all.
2010-02-22 12:09:41 +01:00
Holger Hans Peter Freyther 6414a0cb22 [mgcp] Make the creation of the mgcp message public. 2010-02-22 12:09:41 +01:00
Holger Hans Peter Freyther 8d188eda15 [mgcp] Cleanup the code. send_ was a misleading name
The send_ methods stopped to send the MGCP messages but was
changed to actually just create a msgb_ that can be sent to
a mediagateway. Rename the methods now.
2010-02-22 12:09:39 +01:00
Holger Hans Peter Freyther 7bdc637aae [mgcp] Move away from global variables and split out VTY code
In separation of using the MGCP parsing in another context, refactor
the code to operate on a struct mgcp_config, split out the vty code
from the mgcp_protocol.c, and move the callbacks into the mgcp code.

There should be no functional changes.
2010-02-22 12:09:24 +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