aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-03-09IuCS: don't remove Iu conn until release FIXMENeels Hofmeyr1-0/+6
Don't remove the gsm_subscriber_connection without an Iu Release. The 2G paradigm is to close a subscriber connection as soon as nothing else is pending. In 3G however, the conn is often discarded even though the IuCS stays open and valid, which confuses the situation: before the UE releases a bit later, we would try to page the subscriber unsuccessfully, because the UE expects to already be connected. To first fix the discrepancy of Iu vs. subscr release, never discard gsm_subscriber_connections when msc_release_connection() is called. This creates a "lazy" CN that keeps connections open as long as the UE will tolerate. It is really fast in sending many SMS in close succession, but is certainly a bad CN design choice: we should rather stay lean on connections. A subsequent commit will change this, but I decided to keep this commit as a reference, for when we'd like to test situations that should re-use an established connection. Change-Id: I012378cfa432d791146db387554ec1909de05297
2017-03-09mgcp dbg logNeels Hofmeyr2-6/+98
Change-Id: I56fda48edaa92abfc6e3886cdfce733bb0686f73
2017-03-09sgsn_ranap_iu_event: handle some events without valid MM contextNeels Hofmeyr1-5/+13
Change-Id: Ia7e74087d56996104b6d3935b1cf12166ff67f3a
2017-03-09IuCS: store assigned rab_id in gsm_subscriber_connectionNeels Hofmeyr2-2/+4
Change-Id: I7fda4304631fc24bbd1bebe911b8403a942fcf53
2017-03-09bridge calls via mgcpgwNeels Hofmeyr4-2/+35
Change-Id: Ie259e30bc532fe9817c96562022ac33443d5747a
2017-03-09also do call assignment for MT calls, upon Call ConfirmedNeels Hofmeyr1-0/+2
Change-Id: I863fa73948f61aaffd7f4472f3abc3e44228e31f
2017-03-09IuCS: implement msc_call_assignment() for IuCSNeels Hofmeyr4-1/+110
Send IuCS RAB Activation upon MNCC_CALL_PROC_REQ. Implement function msc_call_assignment(): decide between sending A-iface BSSMAP Assignment Request or IuCS RAB Assignment Request. Implement iu_rab_act_cs() to send the IuCS RAB Assignment Request. The IP address and port of the MGCPGW sent in the RAB Assignment are still hardcoded. The A-interface extension is not implemented yet. Declare ranap_new_msg_rab_assign_voice() to avoid including ranap_msg_factory.h, which would require adding ASN1 CFLAGS to Makefile.am. The mgcpgw_client as well as some more osmo-iuh functions are now linked from libmsc, hence add some dummy stubs to libiudummy and db_test.c. Change-Id: Iaae51d1fbbfc28fad1c0b85e161d53d80a420a19
2017-03-09msc: add mgcpgw client (with dummy read cb so far)Neels Hofmeyr4-0/+28
Store the mgcpgw client data in struct gsm_network. Initialize VTY and bind the client. Change-Id: Ifc4efb1ca44fa34c29bf23b35addb54155296d68
2017-03-09libmgcp: add mgcpgw client APINeels Hofmeyr5-0/+475
Add an API to send MGCP messages to an MGCP GW, from the perspective of an MSC instructing the GW to setup RTP streams. Rationale: the mgcp_protocol.h is mostly for the MGCP GW itself, other implementations forward incoming MGCP messages. So a simpler approach for an MGCP GW client is useful. Add general VTY commands that can be used to configure mgcpgw_client. osmo-msc is going to use this to route RTP streams (for 3G at first). Change-Id: I6fe365c4c89207f2172943cc456b508a207b1135
2017-03-09libmgcp: add value strings for mgcp_connection_modeNeels Hofmeyr3-0/+40
Add file mgcp_common.c to implement the value strings for the mgcp_connection_mode. Add in a separate file because of the upcoming mgcpgw_client.c implementation, introducing a file that contains implementations commonly used in MGCP GW as well as its clients. Change-Id: I6fe365c4c89207f2172943cc456b508a207b1135
2017-03-09libmgcp: move mgcp_connection_mode to public headerNeels Hofmeyr2-8/+8
mgcp_connection_mode will be used by the upcoming mgcpgw_client.h API. Change-Id: I7a3f8905723320d968f1a53c1036904107b4fb2d
2017-03-09IuCS: cosmetic prep for msc_call_assignment()Neels Hofmeyr3-3/+15
Rename gsm48_cc_tx_call_proc() to gsm48_cc_tx_call_proc_and_assign() to mark the place where the A-interface will send a BSSAP Assignment Request / where the IuCS-interface will send a RAB Assignment Request. Add function msc_call_assignment() to decide between A-iface and IuCS assignment, to be implemented in subsequent commit. Change-Id: I0695e233d57d13658793b0e63bb7c3ff224909a0
2017-03-09IuCS: send RANAP CommonIDNeels Hofmeyr6-0/+50
Add libiu function to send a CommonID message down a UE connection, iu_tx_common_id(); add also a corresponding stub to libiudummy for linking with tests. Add libmsc function msc_tx_common_id() to call the above. Add this mostly to clearly indicate in msc_ifaces.h that libmsc is calling out of the MSC; also to do conn->via_iface checking. Call msc_tx_common_id() after ciphering is established, in _gsm48_rx_mm_serv_req_sec_cb()'s GSM_SECURITY_SUCCEEDED case. Change-Id: I576ddd5bbabfc989149debd2f8a9743db6d26043
2017-03-09cosmetic: msc_handler, bsc_handler: drop extra whitespaceNeels Hofmeyr1-1/+1
The extra ws made me not find these lines when grepping for 'dtap ='. Change-Id: I45e5c9e7df4704546872aab15adf407298943435
2017-03-09SGSN: Don't indicate GERAN in Iu mode PDP CTX ACT REQ to GGSNHarald Welte1-10/+20
2017-03-09cosmetic: make gsm0408_loc_upd_rej() staticNeels Hofmeyr1-1/+1
2017-03-09LU counters: count completion and failure, not messages sentNeels Hofmeyr3-12/+8
From a human admin viewpoint it doesn't make sense to count the messages sent: When we use TMSIs, we first send a LU Accept with a new TMSI, and then expect the MS to respond with a TMSI Realloc Complete message. When that fails to come through, the LU actually ends in failure, even though a LU Accept was sent. In 3G, if a UE sends an Iu Release during LU (e.g. user enables flight mode), we cancel the LU without sending any reply at all, so nothing would be counted. Instead, count Location Updating results, i.e. completion and failures.
2017-03-09remove handle_abisip_signal()Neels Hofmeyr1-71/+0
Change-Id: I9cf80f9c2c8a53a29e42f000029e680a9922cb41
2017-03-09gsm0408_clear_request(): actually free the released connNeels Hofmeyr1-0/+2
By having conn->in_release == 1, calling msc_release_connection() has no effect and thus never frees the conn. So, after all pending requests have been discarded, also discard and free the unused connection.
2017-03-09add iu.h to gsm_subscriber.cNeels Hofmeyr1-0/+1
Change-Id: I398aaa4a7328a58fb0d563725f3bea26482929ef
2017-03-09gsm_04_08.c: iu.hNeels Hofmeyr1-0/+1
Change-Id: I624612b5d5cd70770326347634aee2a42ba88945
2017-03-09temporary dev: set debug log level almost everywhereNeels Hofmeyr1-17/+17
Change-Id: I0d5a36560e7edde27497de57e579f5b1d00eb525
2017-03-09comment on mscsplit, indent commentNeels Hofmeyr2-0/+8
2017-03-09move to libbsc: lchan_next_meas_rep() -- TODO really?Neels Hofmeyr3-14/+13
Change-Id: I4ea799c5fa61f81c404e6ef1b9ac86a8faa1fb49
2017-03-09move to libbsc: gsm_bts_neighbor() -- TODO really?Neels Hofmeyr3-23/+21
Change-Id: I63d4835dc7aabdf176e0ca634a6a4ca527612693
2017-03-09gsm0408_test: use NULL for root ctx -- TODO really?Neels Hofmeyr1-2/+2
2017-03-09gsm_04_08: remove apply_codec_restrictions() -- TODO really?Neels Hofmeyr1-28/+0
This function is wrongly placed on the MSC level. Unfortunately I cannot remember the very plausible details that hwelte had back in the days to argue for this change. (Refactoring an old commit that fails to explain in more detail.) Change-Id: I82623847e652a59a921d2fb142b77cf22420a746
2017-03-09move to libmsc: osmo_stats_vty_add_cmds() -- todo MSCSPLITNeels Hofmeyr2-1/+2
2017-03-09include msc_ifaces.h in gsm_04_08.cNeels Hofmeyr1-0/+2
Change-Id: I11be1bdfe6993f89b34319e7d1526c729d6e0cde
2017-03-09complete IuCS paging implementationNeels Hofmeyr2-32/+82
Add paging timeout to struct gsm_subscriber. Previously, paging timeout was implemented only on BSC level, where each request has its own timeout value. The MSC will still send individual requests to BSC or RNC level, where they timeout individually. However, the MSC must also have an own timeout to be sure to discard stale pagings that the BSC or RNC never replied for. Add handle_paging_resp(), copying the few libmsc relevant parts of gsm48_handle_paging_resp().
2017-03-09paging: add todo comments for paging and mscsplitNeels Hofmeyr2-0/+7
Change-Id: I7e72c9db2837ea5edf45f6037cb0288a264d492c
2017-03-09paging: actually verify subscriber authorizationNeels Hofmeyr1-1/+8
Before this, any paging response would be accepted by the CN, without checking the database whether the subscriber is in fact authorized. The probability that a subscriber would be able to take unauthorized action is slim, nevertheless checking authorization status with the database should happen before we accept a connection.
2017-03-09paging: change subscr_paging_cb() into subscr_rx_paging_response()Neels Hofmeyr2-26/+7
Remove one layer of callback indirection in paging. When a paging response arrives, we always want to first secure the connection, thus a fixed subscr_rx_paging_response() function is more appropriate and avoids having to store a cbfn. The actual actions to be taken upon successful paging are of course still in callback functions stored with each subscriber. Remove paging_request_stop() call from subscr_paging_dispatch(), which stops paging on all BTSs, which is not the responsibility of libmsc. Change-Id: Ic2c785c9cc48b2c2c6557cbe1060d25afa89e38d
2017-03-09Iu auth wipNeels Hofmeyr1-0/+25
Change-Id: I44effcca80dc6850178174dc957bcd5608b0ae14
2017-03-09subscr_request_channel() -> subscr_request_conn()Neels Hofmeyr3-6/+10
Change-Id: Ife8e10b240693a8d369139881774f1892044aa65
2017-03-09move subscr_request to gsm_subscriber.hNeels Hofmeyr2-17/+14
Change-Id: Idbbd39b0e068da17aafa97e315143509c69c50ea
2017-03-09add gsm_encr to subscr_connNeels Hofmeyr1-0/+1
Change-Id: Id5797cd1f1bfa2cca2d3fbabc1981aa75546421b
2017-03-09osmo-nitb becomes osmo-mscNeels Hofmeyr8-98/+374
Change-Id: I3787050b524954d8a4dd13495c458f3ee293807b
2017-03-09remove unneccessary linking from some testsNeels Hofmeyr3-4/+0
The recent shifts and cuts have made some library linking for bsc, channel and db tests unnecessary.
2017-03-09cut off libbsc paging, pending paging in libmscNeels Hofmeyr4-1/+19
Temporarily disable all paging to be able to link libmsc without libbsc. Skip the paging part of channel_test because the paging is now disabled. In osmo-nitb, paging is done on BSC level and MSC level "at the same time". When the new MSC is fully operational, paging will be controlled separately on the MSC level, and the BSC (RNC) level will be instructed over an IuCS or A-interface to negotiate paging with the MS (UE). This MSC level paging does not yet exist and will be added in subsequent commits. Change-Id: I8b6920ddc54fc3f2876a59664e6722666d8a8a4a
2017-03-09libmsc: duplicate gsm0808 / gsm48 functions (towards BSC)Neels Hofmeyr4-6/+59
In osmo-nitb, libmsc would directly call the functions on the BSC level, not always via the bsc_api. When separating libmsc from libbsc, some functions are missing from the linkage. Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also add a _tx to gsm0808_cipher_mode(): * add msc_gsm0808_tx_cipher_mode() (dummy/stub) * add msc_gsm48_tx_mm_serv_ack() * add msc_gsm48_tx_mm_serv_rej() Call these from libmsc instead of * gsm0808_cipher_mode() * gsm48_tx_mm_serv_ack() * gsm48_tx_mm_serv_rej() Also add a comment relatd to msc_gsm0808_tx_cipher_mode() in two places. Change-Id: I5b276853d3af71f5e3f0a031fd17b4fff0580020
2017-03-09Use new msc_tx_dtap() instead of gsm0808_submit_dtap()Neels Hofmeyr4-8/+10
Aim: msc_tx_dtap() shall redirect to IuCS or A interfaces depending on subscr conn. Change-Id: I30d961f16eb7b9c0ab9cc3f43198098d3f1a909f
2017-03-09add libiudummy, to avoid linking Iu deps in testsNeels Hofmeyr6-0/+56
Change-Id: I4a66c4122011dbc87c6fcb336ab0461b86522c98
2017-03-09move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi() -- TODO ↵Neels Hofmeyr2-24/+24
move to libfilter instead? Change-Id: I00ca0caf8224de029f53f4dedb1146e3cf7650ec
2017-03-09msc_compl_l3(): publish in .h, tweak return valueNeels Hofmeyr2-10/+20
Use new libmsc enum values for return val, to avoid dependency on libbsc headers. Make callable from other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c Change-Id: If24007445899e9c75553a0dbf843ada3566b3380
2017-03-09add msc vty, remove nitb vtyNeels Hofmeyr4-10/+177
Change-Id: I8f8980d6cfbf26f1b0e0197939833e55dbe521fb
2017-03-09add iucs.[hc]Neels Hofmeyr4-0/+206
Change-Id: I88e981f4c31393a98ae8d61176c65c9251a6f28b
2017-03-09add DIUCS debug log constantNeels Hofmeyr2-0/+6
Change-Id: Id347a3024fa495a1ab680db7320648d933a4018b
2017-03-09gsm0408_loc_upd_rej(): remove bts use (used only for debug log)Neels Hofmeyr1-4/+2
Change-Id: I3ac38f4b701ad8308470573260fa91a4b04c2f18
2017-03-09gsm_04_08, gsm_subscriber: decouple lac from btsNeels Hofmeyr2-3/+2
The idea is to not have a direct pointer to a bts struct (into BSC land), but a LAC to resolve the BSC or RNC depending on the appropriate A or IuCS interface. subscr_update(): remove bts arg, add lac arg. Pass conn->lac to gsm48_generate_lai() instead of bts->location_area_code. Change-Id: I9f2b298a785bf4b2a1b3fcdd91b8256106b2d9de