aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/osmo_bsc_mgcp.c
AgeCommit message (Collapse)AuthorFilesLines
2017-12-27MGCP: Force-send a DLCX to all connections of before any new CRCXlaforge/dlcxHarald Welte1-0/+18
There are some situations in which osmo-bsc releases a call without sending a DLCX to the media gateway. The 'laforge/fsm' has a more proper solution to the problem, this is an interim hack which just sends an unsolicited DLCX before the CRCX. Change-Id: I1a78721d3d0a2f4a99cfddade2d06732f0388c30
2017-12-20mgcp: validate rtp connection data in MGW response (ip/port)Philipp Maier1-2/+18
Currently the pasing results from the RTP ip/port are fed into inet_addr without checking the results. Check the return code of inet_addr to be sure that the IP-Address got properly decoded. Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb
2017-12-20mgcp: cancel transactions on timeoutPhilipp Maier1-0/+9
when a transaction to the MGW times out, then the context information is freed. Unfortunately the client is not informed about this and will try to execute the callback anyway. explicitly cancel the transaction in order to prevent access to already freed data structures. Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf
2017-12-19osmo-bsc: Move user plane/voice related bits into sub-structureHarald Welte1-5/+5
This clarifies which members of the struct are for what. Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412
2017-12-10mgcp: cosmetic fixupsPhilipp Maier1-105/+39
- use unique enum/struct fsm struct names - use macro to shift bits in FSM description - use OSMO_STRINGIFY to generate the state names - remove duplicate logging of states and events - remove unnecessary space in log strings - prefix hexadecimal enpoint ids with - remove unnecessary log messages - rename bsc_mgcp_cause_codes_str to bsc_mgcp_cause_codes_names Change-Id: I663e03046cde3c786af72d15681bf7497330d7f9
2017-12-01cosmetic: use fsm pointer from parameter listPhilipp Maier1-39/+31
the parameter list of osmo-fsm callbacks contains a pointer to the fsm instance. Use this pointer instead of reaching out for mgcp_ctx->fsm. Change-Id: I05ff62e7e2de64c2dbf5ea2736f5e58faf16df0b
2017-12-01cosmetic: correct sourcecode formattingPhilipp Maier1-1/+2
add missing line break Change-Id: Ia117e4099046fefcf35ccb94400554062e667869
2017-12-01cosmetic: add missing log prefixPhilipp Maier1-6/+6
the log messages have prefixes that mark important phases (CRCX/BTS, etc...). Some lines lack the prefix. Add missing prefixes. Change-Id: Iea5ea9e54f4b5c998b1d5fe18a98a94abd7b728b
2017-12-01cosmetic: do not cast void pointerPhilipp Maier1-5/+5
remove the casting of void *data, just assign directly Change-Id: I2e37630e315b3602da2f14e2364bb76be9dd2894
2017-12-01mgcp: do not fail silently on snprintf()Philipp Maier1-2/+1
The snprintf() that is used to compose the fsm name on an assignment request may cause a silent failure. The buffer is large enough to take the string under all circumstances. If snprintf() fails, this would mean we have some other serious problem. use OSMO_ASSERT in case the snprintf() fails, so the failure gets noticed. Change-Id: I3c36df8cfd0880c524244048a993cd136be41f56
2017-12-01mgcp: add missing switch casePhilipp Maier1-0/+8
In the beginning of the CRCX phase for the network does not distinguish between EV_MDCX_BTS_RES and EV_TEARDOWN, so a Teardown due to an error could be misinterpreted as a successful MGW response. Add missing case statement to distinguish CV_MDCX_BTS_RES from EV_TEARDOWN. Change-Id: I9bf49df167d94b33ad65d8b9382a01f160b5aec0
2017-12-01mgcp: use mgw assigned connection identifiersPhilipp Maier1-11/+14
osmo-mgw assigns connection identifiers which are returned with the response to the CRCX. store the assigned connection identifiers and use them to identify the connections. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2648 Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab
2017-12-01mgcp: use hexadecimal digits in endpoint namesPhilipp Maier1-1/+1
The current implementation of osmo-mgw parses the numerical digit inside the endpoint name as hexadecimal number. also use hexadecimal numbers in endpoint names. Change-Id: I64a970d300b7290d50ec84b0640d5a321d903f5e
2017-11-12mgcp: remove unused variablePhilipp Maier1-4/+0
The function handle_error asserts mgcp_ctx->conn to be non null, but it does not access it otherwise. remove unused variable conn Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404
2017-11-12mgcp: add missing out statePhilipp Maier1-1/+1
Even in the very early ST_CRCX_BTS phase, the error handler may decide to go to ST_CALL in order to initate the termination of a possibly half open connection. Add ST_CALL to the out state list in ST_CRCX_BTS Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842
2017-11-12cosmetic: replace term MGCP-GW with MGWPhilipp Maier1-7/+7
The term MGCP-GW is deprecated, use now MGW Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f
2017-11-12cosmetic: reorder case listPhilipp Maier1-2/+2
the switch statement in fsm_send_assignment_complete() has the default case at the beginning. Move the default case to the end to match common coding style rules Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc
2017-11-07mgcp: use osmo-mgw to switch RTP streamsPhilipp Maier1-0/+1136
osmo-bsc currently negotiates the RTP stream directly with the BTS and reports back the RTP IP/Port on the BTS. This works fine for a single BTS, but for Handover the port/ip pointing to the MSC side must not change, so an entity in between the BTSs and the MSC is required. Integrate the mgcp-client and use osmo-mgw to switch the RTP streams. Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a