aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-09-10WIP cc codecs to gsm0808_speech_codec_listneels/mncc_codecsNeels Hofmeyr2-0/+46
Change-Id: I15475b26cdd769add7162f4c2dddeda38174f998
2020-09-10manual: link to new common cs7-config.adoc, remove some dup of thatNeels Hofmeyr1-1/+3
Related: OS#2767 Change-Id: Ie88dd2c7f7318a31ae04fbd6930346d92141fde5
2020-09-10CC: fix sanity expectations for call establishmentNeels Hofmeyr1-0/+4
Recent 'add full SDP codec information to the MNCC...' patch has added a strict CC state sanity check, which is too strict: In tests with 200 concurrent calls, situations came up where the MNCC is faster than the Abis in establishing a call. If that happens, the CC state machine is already in GSM_CSTATE_ACTIVE when the RR channel assignment completes. Also allow GSM_CSTATE_ACTIVE state for accepting an Assignment Complete. Change-Id: I0e0767ec10232615bbf063181fc7f8738ef94f28
2020-09-10add full SDP codec information to the MNCC socketNeels Hofmeyr27-443/+5489
This way osmo-msc can benefit from the complete codec information received via SIP, which was so far terminated at osmo-sip-connector. osmo-sip-connector could/should have translated the received SDP to MNCC bearer_cap, but this was never implemented properly. Since osmo-msc already handles SDP towards the MGW, it makes most sense to pass SDP to osmo-msc transparently. To be able to send a valid RTP IP:port in the SDP upon the first MNCC_SETUP_IND going out, move the CN side CRCX to the very start of establishing a voice call. As a result, first create MGW conns for both RAN and CN before starting. The voice_call_full.msc chart shows the change in message sequence for MO and MT voice calls. Implement cc_sdp.c, which accumulates codec information from various sources (MS, BSS, Assignment, remote call leg) and provides filtering to get the available set of codecs at any point in time. Implement codec_sdp_cc_t9n.c, to translate between SDP and the various libosmo-mgcp-client, CC and BSSMAP representations of codecs: - Speech Version, - Permitted Speech, - Speech Codec Type, - default Payload Type numbers, - enum mgcp_codecs, - FR/HR compatibility - SDP audio codec names, - various AMR configurations. A codec_map lists these relations in one large data record. Various functions provide conversions by traversing this map. Add trans->cc.mnccc_release_sent: so far, avoiding to send an MNCC release during trans_free() was done by setting the callref = 0. But that also skips CC Release. On codec mismatch, we send a specific MNCC error code but still want a normal CC Release: hence send the MNCC message, set mnccc_release_sent = true and do normal CC Release in trans_free(). (A better way to do this would be to adopt the mncc_call FSM from inter-MSC handover also for local voice calls, but that is out of scope for now. I want to try that soon, as time permits.) Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f
2020-09-09Support handling IPv6 Transport Address in Handover Request (Ack)Pau Espin Pedrol1-34/+14
Change-Id: Ie4d07826362d651cd42dc2b4e0af82368a74c774
2020-09-09tests: Fix VTY results after switch to newer libosmo-mgcp-clientPau Espin Pedrol2-2/+3
In this case we are fine with simply updating test result because anyway ABI breakage in some libosmo-mgcp-client structs was needed, so new versions of osmo-msc will require new versions of libosmo-mgcp-client. Change-Id: I1fbdb95f71d3b9a2dc88e1ba79892ae16485aa99
2020-09-08Support handling IPv6 Transport Address in Assignment CompletePau Espin Pedrol1-10/+1
Change-Id: Ib650bb063404a3068b4cf3c376c6080dc29bebfe
2020-09-08Support sending IPv6 Transport Address in Assignment CommandPau Espin Pedrol1-17/+40
Change-Id: Ida43f10a41afbd275233f0ef102287522a2e7099
2020-08-28vty: allow configuring db path from cfg fileKeith Whyte18-126/+146
So far, the cmdline argument was the only way to set a database file. Add a similar config to VTY as 'msc' / 'sms-database'. The cmdline arg is stronger than the 'database' cfg item. DB is not reloaded from VTY command. Change-Id: I18d954c30fcceb0b36a620b927fd3a93dcc79f49
2020-08-24Change default SCTP conn NULL->127.0.0.1 to localhost->localhostPau Espin Pedrol1-2/+3
"127.0.0.1" is changed to "localhost" to let local NSS decide whether to use IPv4 or IPv6. In newish systems, IPv6 ::1 will be selected since IPv6 takes precedence over IPv4. Similarly, the default source addr needs to be changed from NULL to "localhost" since for some yet unknwon reason, getaddrinfo(AF_UNSPEC, NULL) returns first IPv4 "0.0.0.0" and later "::", which is inconsistent with getaddrinfo("localhost") result, resulting in src=IPv4(0.0.0.0) and dst=IPv6(::1), which is incompatible and will fail. In any case, since the default remote address is a local one and it's the client side, there's no real logical change since the kernel would anyway should have taken a local address anyway. Change-Id: I05a5c792ab1d053c6f38ba36d4b9fa6db293fbd0
2020-08-24mncc_builtin: log type of unhandled message in int_mncc_recv()Vadim Yanitskiy1-1/+2
Change-Id: Ie65b2da4c3a13ac36132a2f8c9c85cc420c7a5a6
2020-08-24mncc_builtin: cosmetic: fix coding style in int_mncc_recv()Vadim Yanitskiy1-1/+1
Change-Id: Iffef3c094a5d030663d312a379e846a8eb917942
2020-08-24fix crash for unknown MI during Paging ResponseNeels Hofmeyr1-1/+6
Related: OS#4724 Related: I40496bbccbbd9c496cfa57df49e26f124a2b1554 (osmo-ttcn3-hacks) Change-Id: Ia2c8fa745cfab17ed7114d433f625ddc02ae7b11
2020-08-20Support setting rt-prio and cpu-affinity mask through VTYPau Espin Pedrol5-7/+10
Change-Id: I40cf8a86961c1e350b5cd74d6e2cf64a22b7a2b1 Depends: libosmocore.git Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a Depends: osmo-gsm-masnuals.git Change-Id Icd75769ef630c3fa985fc5e2154d5521689cdd3c Related: SYS#4986
2020-08-20configure.ac: Drop trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: I48dee161f6951777dc86b61da13793d6309b86bb
2020-08-17Send "BSSMAP CommonID" to tell BSC about the IMSIHarald Welte14-14/+195
We're already sending the RANAP CommonID message to the RNC, let's do the same using BSSMAP CommonId towards the BSC. This way the BSC knows about the IMSI of the served subscriber, which is very useful for logging/debugging. Change-Id: I2552736477663adb250c55728093500e8ae83ebb Closes: OS#2969 Depends: libosmocore.git I353adc1aa72377f7d4b3336d2ff47791fb73d62c
2020-08-13debian/control: change maintainer to the Osmocom team / mailing listVadim Yanitskiy1-1/+1
Change-Id: I8c4e1749e6b4903877962b2da87be472e63c8de0
2020-07-29vty: fix vsub reference counting: call vlr_subscr_put()Vadim Yanitskiy1-0/+2
Otherwise, each time the 3GPP TS 44.014 MS test commands (TCH loop) are invoked, both subscriber_mstest_{close,open} functions add +1 to the subscriber's reference count, but never revoke it. Change-Id: I0cefa5b5a0cb712080ba2afd322db329f19608e3
2020-07-29gsm_04_14: fix off-by-one error in create_gsm0414_msg()Vadim Yanitskiy1-1/+1
This byte is redundant, and must not be allocated in this function. A consequence of this error is that the MS alwats interprets the "Sub-channel" IE as test loop A regardless of the specified type. Here is an example of malformed Close TCH loop (type C) message: 0f 00 00 04 x. .. .. .. - Skip indicator (see 3GPP TS 24.007) .x .. .. .. - Protocol discriminator (see 3GPP TS 24.007) .. xx .. .. - Message type (CLOSE_TCH_LOOP_CMD) .. .. !! .. - (!) Redundant byte from create_gsm0414_msg() .. .. .. xx - (!) The actual "Sub-channel" IE (loop C, X=0) Change-Id: Ia47225b884439dcd43be307e7351994e55fcd50d
2020-07-28Clear Command: set cause value to "Call Control"Neels Hofmeyr1-0/+3
So far, by failing to initialize the cause value, we always send a Clear Command cause == 0, which actually means "Radio Interface Message Failure". This is seen in all my logged network traces of osmo-msc lab testing. "Call Control" seems to be the only cause value that remotely fits a normal release procedure, even if it was not voice call related, see 3GPP TS 48.008 3.2.1.21. Related: OS#4664 Change-Id: I1347ed72ae7d7ea73a557b866e764819c5ef8c42
2020-07-12manuals: generate vty reference xml at build timeNeels Hofmeyr3-3255/+6
Move 'doc' subdir further down to "make sure" the osmo-msc binary is built before the docs. Remove msc_vty_reference.xml from the source tree. In manuals/Makefile.am use the new BUILT_REFERENCE_XML feature recently added to osmo-gsm-manuals, and add a build target to generate the XML using the new osmo-msc --vty-ref-xml cmdline switch. Depends: I613d692328050a036d05b49a436ab495fc2087ba (osmo-gsm-manuals) Change-Id: Ib872e7979c5b5a9da1347a3f326307844cf76536
2020-07-09is_reset_msg: use proper enum for rc valueNeels Hofmeyr1-5/+5
Change-Id: I88b6204bc3ffac06f92bfc87639ce503b2da24bc
2020-07-01sgs_tx_loc_upd_resp_cb(): fix error handling for MI encodingNeels Hofmeyr1-2/+8
new_id_ptr should be passed as NULL if encoding the TMSI failed, so initialize it accordingly. Also add some bloat to better handle the case of an encoding error, even though from code analysis that should not be possible here: there is enough buffer, the MI is a TMSI encoded from a uint32_t... The problem was introduced by Idfc8e576e10756aeaacf5569f6178068313eb7ea, before which new_id_len was always 0 when no TMSI was present. Related: CID#210894 Change-Id: I800c5dca3fdbdedf70a64d9fd5a1bdfd1397f431
2020-07-01refactor: move RESET Osmux TLV parsing to ran_msg_a.cNeels Hofmeyr6-26/+60
ran_peer.c is not the proper place to parse messages, because it should be RAN agnostic. All parsing and encoding belongs in ran_msg_a.c and ran_msg_iu.c. Move the Osmux TLV parsing into the is_reset_msg op: add supports_osmux out-parameter (and add a logging fi pointer). To be able to modify msg->l3h, also make the msgb arg non-const. In ranap_is_reset_msg(), always return non-support for Osmux. In bssmap_is_reset_msg(), return 0 if no TLVs were parsed, 1/-1 if an Osmux TLV was present/not present. Update the osmux support flag directly where the ConnectionLess message is received, so that there is only one place responsible for that. Related: OS#4595 Change-Id: I1ad4a3f9356216dd4bf8c48fba29fd23438810a7
2020-06-25make vty-transcrip-test: use $VTY_TEST var like osmo-bscNeels Hofmeyr1-1/+4
Adopt the same way to run manual vty transcript tests as in osmo-bsc/test/Makefile.am. There are different ways to select a specific test to run in osmo-bsc and here in osmo-msc. The osmo-bsc way is more convenient when building outside the src tree, because it does not need the full absolute path of the test file. Change-Id: If1e2abfa321a5e9fb60358d1f0e4e448b33184af
2020-06-24propagate Compl L3 Info Cell ID to the VLR subscriber recordNeels Hofmeyr1-0/+6
As soon as the subscriber is authenticated, update the VLR entry with the MSC-A's full CGI, including the Cell Id received from the Complete Layer 3 Information. Thus the Cell Id will be shown by vty 'show subscriber cache' and 'show connection'. This is tested by osmo-ttcn3-hacks Ie410714a96353f74a52a104c56fa0a08683e0004. Related: OS#4627 Change-Id: Iee1781985fb25b21ce27526c6a3768bf70d4dc9a
2020-06-24vty 'show connection': show msc_a->via_cell instead of vsub->cgiNeels Hofmeyr1-1/+1
For 'show subscriber cache', we print vsub->cgi. For 'show connection', it makes more sense to print msc_a->via_cell. This is tested by osmo-ttcn3-hacks Ie410714a96353f74a52a104c56fa0a08683e0004. Related: OS#4627 Change-Id: I194271af2acb37b4f8cc2d106ab2fd2b0d443589
2020-06-24add comments to clarify some complete l3 detailsNeels Hofmeyr2-1/+9
Change-Id: I6e289900d38d97c346d615b71d36656254e6f2b5
2020-06-23osmo-msc.spec.in: Use %config(noreplace) to retain current config fileHarald Welte1-1/+1
Change-Id: I00c3152b774a826230a112eae93b0e7c4d4f4c7a
2020-06-23add osmo-msc --vty-ref-xml: dump VTY ref XML to stdoutNeels Hofmeyr1-8/+20
Add only a long option to not clutter the cmdline namespace. To add a long option without a short letter is slightly complex: use the 'flag' and 'val' mechanism as in 'man 3 getopt' to write an option index to long_option. Make sure that all VTY commands have been added before parsing cmdline options: move various VTY init further above. For msc_vty_init(), the global msc_network already needs to be allocated, so also move that. Depends: Ic74bbdb6dc5ea05f03c791cc70184861e39cd492 (libosmocore) Change-Id: I9146d5a44427509265420f52ae6540ad93eb14fc
2020-06-22msc_ho: fix CALL IDENTIFIER in HANDOVER REQUESTPhilipp Maier2-0/+4
When msc_ho_send_handover_request() generates the HANDOVER REQUEST message, it does not populate the call_id struct member. In ran_msg_a.c the struct member call_id is used, but the call_id_present flag is not set, which also prevents the call_id being added to the message Change-Id: I6b1b55b3f5a3092d9557dc2512020c766a9ff744 Related: OS#4582
2020-06-22msc_a: add callref as call id to ASSIGNMENT REQ.Philipp Maier3-1/+9
The BSSMAP message ASSIGNMENT REQUEST may contain an optional CALL IDENTIFIER IE. While this IE is optional some BSC implementions may require it. Change-Id: I4288f47e4a6d61ec672f431723f6e72c7c6b0799 Related: OS#4582
2020-06-22remove empty + unused ran_up_l2.cHarald Welte1-0/+0
Change-Id: I5a0fa6a78dd8f32912afc69f4b154caad44a9e78
2020-06-19add rudimentary NRI support for MSC poolingNeels Hofmeyr17-122/+217
This patch served for a manual testing counterpart for osmo-bsc to implement MSC pooling. This enables a basic MSC pooling setup, but for a production setup, osmo-msc would still lack various features related to unloading subscribers to another MSC as explained in 3GPP TS 23.236. Change-Id: Iafe0878a0a2c8669080d757b34a398ea75fced36
2020-06-19use new osmo_mobile_identity API everywhereNeels Hofmeyr21-255/+233
Depends: Ic3f969e739654c1e8c387aedeeba5cce07fe2307 (libosmocore) Change-Id: Idfc8e576e10756aeaacf5569f6178068313eb7ea
2020-06-18msc_vty: remove emergency-call command from networkPhilipp Maier1-5/+0
when the VTY write the config file ist prints the configuration line for emergency-call in network and in msc, however the presence of the configuration line in network leads to a parsing error on msc startup. The vty command probably got moved to node msc and it was forgotten to remove the printing from network. Change-Id: I4f3dac27723e7852f8f049fcfca5cccdc027734d Related: OS#4548
2020-06-15msc_vlr_test_gsm_ciph.c: fix IMEISV MI: even number of digits, clear odd bitNeels Hofmeyr2-2/+2
There is an invalid Mobile Identity in the msc_vlr_test_gsm_ciph test data. This became apparent when applying the new osmo_mobile_identity API (in a following patch). Current Mobile Identity API ignores the error. Change-Id: Ib1d54c59acc8b716de471ca275f54f9d22da3574
2020-06-13contrib/osmo-msc.spec.in: Enable SMPP in RPM buildsHarald Welte1-0/+1
The SPEC file already included a build dependency to libsmpp34, but then the compilation of osmo-msc didn't actually pass --enable-smpp along, resulting in binaries without SMPP support - unlike the Debian binaries, which do contain that part. Change-Id: I223be7a735e97b32f7c0ff246cf826f109b0f686
2020-06-03vlr_subscr_rx_id_resp(): dont assert on received MI typeNeels Hofmeyr1-2/+3
The Mobile Identity type is received on the wire, we asserting on its type constitutes a DoS vector. Change-Id: I2b2e25ef8e878e91a165018ba49f1609cfb5cbd0
2020-06-03manual: link to new common cs7-config.adoc, remove some dup of thatNeels Hofmeyr3-23/+21
Related: OS#2767 Depends: Ia2508d4c7b0fef9cdc57e7e122799a480e340bf7 (osmo-gsm-manuals) Change-Id: Ie88dd2c7f7318a31ae04fbd6930346d92141fde5
2020-05-26manual: Multiple Instances: tweak MNCC, add missing SGs docNeels Hofmeyr1-3/+19
Change-Id: Ice610e3db132dc50b7ddc3f3e324e8ad1bba5864
2020-05-22Makefile.am: EXTRA_DIST: debian, contrib/*.spec.inOliver Smith1-1/+7
Change-Id: I83cf6ee3f974733e45b01c79242214fa32479416
2020-05-20contrib: integrate RPM specOliver Smith3-6/+10
Remove OpenSUSE bug report link, set version to @VERSION@, make it build with CentOS 8 etc. Related: OS#4550 Change-Id: If5499e11d872e629a018fc77d5adf5d0cb863d48
2020-05-19ran_msg_iu.c: Avoid redefining osmo-iuh global variablesPau Espin Pedrol1-10/+0
From ASAn on gcc 10.1.0: +================================================================= +==269368==ERROR: AddressSanitizer: odr-violation (0x559114a5b880): + [1] size=4 'asn1_xer_print' /git/osmo-msc/src/libmsc/ran_msg_iu.c:50:5 + [2] size=4 'asn1_xer_print' /git/osmo-iuh/src/iu_client.c:85:5 +These globals were registered at these points: + [1]: + #0 0x7f6208d3869a in __asan_register_globals /build/gcc/src/gcc/libsanitizer/asan/asan_globals.cpp:341 + #1 0x55911456d221 in _sub_I_00099_1 (/build/new/tmpdir/osmo-msc/tests/msc_vlr/msc_vlr_test_hlr_timeout+0x48d221) + #2 0x5591145e8e9c in __libc_csu_init (/build/new/tmpdir/osmo-msc/tests/msc_vlr/msc_vlr_test_hlr_timeout+0x508e9c) + + [2]: + #0 0x7f6208d3869a in __asan_register_globals /build/gcc/src/gcc/libsanitizer/asan/asan_globals.cpp:341 + #1 0x7f6207d8db91 in _sub_I_00099_1 (/build/new/out/lib/libosmo-ranap.so.3+0x47db91) + #2 0x7f62096eb0f1 in call_init.part.0 (/lib64/ld-linux-x86-64.so.2+0x110f1) + +==269368==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0 +SUMMARY: AddressSanitizer: odr-violation: global 'asn1_xer_print' at /git/osmo-msc/src/libmsc/ran_msg_iu.c:50:5 +==269368==ABORTING Related: OS#4556 Change-Id: I702e9748eaaf2279c3764ba67f80f00ae9f2526f
2020-05-14contrib: import RPM specOliver Smith1-0/+117
Copy the RPM spec file from: https://build.opensuse.org/project/show/home:mnhauke:osmocom:nightly Related: OS#4550 Change-Id: Ief0917ad6e7ce193a54fd0d2a5e665b56ff8bbea
2020-05-09Use OSMO_FD_* instead of deprecated BSC_FD_*Pau Espin Pedrol2-11/+11
New define is available since libosmocore 1.1.0, and we already require 1.3.0, so no need to update dependenices. Let's change it to avoid people re-using old BSC_FD_* symbols when copy-pasting somewhere else. Change-Id: Ifc89fffac0443d94f3e49555684975b293ef90fb
2020-04-26SMS-over-GSUP: notify sender in case of RPL delivery failureVadim Yanitskiy1-1/+1
Change-Id: I8436601c4314395e28829960dc753778c37b1125
2020-04-26SMS-over-GSUP: notify sender about malformed GSUP messagesVadim Yanitskiy1-4/+3
Change-Id: I27f00e69ff045cbf641ef21adf44fcd55cb8f889
2020-04-26SMS-over-GSUP: notify sender about unhandled GSUP messagesVadim Yanitskiy1-0/+1
Change-Id: I7970349bd9d5c56a64c409e619e8b581682fef0b
2020-04-26SMS-over-GSUP: respond with error if net->sms_over_gsup is falseVadim Yanitskiy1-1/+1
Change-Id: If14f8a394e691f86e0acbffb283c3862fe62ffd2