aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-04-15deprecation: use new log_set_print_timestamp2()neels/codecsNeels Hofmeyr4-4/+4
Change-Id: I9df7c704d3d935400218ed92c61cdd909d958021
2023-04-15more verbose MNCC loggingNeels Hofmeyr5-113/+163
It is pretty unclear what codec items MNCC sends and receives exactly when: * Bearer Capabilities speech versions, * 'payload message type' and * the new SDP information Include these items in MNCC rx and tx logging. In msc_log_to_ladder.py, in sequence charts generated from an actual osmo-msc log, also show all MNCC codec items. Change-Id: I19ccffa2f9b627ad51fffd344ee6e75908d30295
2023-04-15TODO-RELEASE: add note on osmo-sip-connector and SDPNeels Hofmeyr1-0/+1
Change-Id: I37fb5e18f06a5379d0320ee7d47885c9283cbd06
2023-04-14tests: $(BUILT_SOURCES) is not defined, depend on osmo-mscVadim Yanitskiy1-6/+6
Change-Id: I3676a744bbe13d5d17caa94e9bd9e21c5c53de87
2023-04-053G: decapsulate IuUP to AMR at the MGW; allow 3G<-AMR->2GNeels Hofmeyr2-58/+65
For all 3G calls, convert IuUP <-> plain AMR/RTP on the MSC's MGW hop like this: Before this patch: hNodeB <--IuUP--> MGW@hnbgw <--IuUP--> MGW@msc <--IuUP--> other call leg After this patch: hNodeB <--IuUP--> MGW@hnbgw <--IuUP--> MGW@msc <--AMR--> other call leg ^ This allows, in principle, 2G to 3G calls without expensive transcoding, like this: hNodeB <--IuUP--> MGW@hnbgw <--IuUP--> MGW@msc <--AMR--> MGW@msc <--AMR--> MGW@bsc <--AMR--> 2G-BTS ^ (So far only proven to work with AMR-FR at 12k2.) 3G to 3G calls now look like this: hNodeB <--IuUP--> MGW@hnbgw <--IuUP--> MGW@MSC <--AMR--> MGW@MSC <--IuUP--> MGW@hnbgw <--IuUP--> hNodeB ^ Implementatino: get rid of the shim that was put in place to still send IuUP (VND.3GPP.IUFP) to the CN. So now, for all 3G voice, the IuUP gets decapsulated to plain AMR/RTP at the MSC's MGW hop. What is proven to work with this patch: successful voice call between 2G and 3G with these conditions: - a hNodeB that stubbornly accepts only 12k2 AMR; - a 2G BTS configured to use only TCH/F and only FR3, with only 12k2 as allowed AMR rate. We have not yet seen a call working for TCH/H HR3 <-> 3G, because of the lab hNodeB's limitation to 12k2. Future work we probably need: - properly request and negotiate AMR rates via SDP fmtp:mode-set. - request more RFCIs in our RANAP RAB Assignment requests (see I61e0e9e75e3239662846fd797532acdefa9f73dc). - Convert IuUP to AMR already at the HNBGW's MGW? Solving this is not part of this patch. Related: SYS#5092 Change-Id: I386a6a426c318040b019ab5541689c67e94672a1
2023-04-05msc_main: close SMS db on startup errorOliver Smith1-10/+21
When the SMS sqlite db is opened and not closed properly, sqlite will print a trace on the next OsmoMSC startup while restoring the database. This happens when e.g. attempting to bind OsmoMSC on an IP that is not available (yet) and then restarting OsmoMSC. db.c:521 Init database connection to 'sms.db' using SQLite3 lib version 3.34.1 db.c:318 SQLITE3: (283) recovered 37 frames from WAL file /var/lib/osmocom/sms.db-wal backtrace.c:42 backtrace() returned 22 addresses backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0x36a56) [0x7f1518c00a56] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(sqlite3_log+0x9e) [0x7f1518c00b3e] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0x5f4f4) [0x7f1518c294f4] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0x5fbb3) [0x7f1518c29bb3] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0x7ee02) [0x7f1518c48e02] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0x7f908) [0x7f1518c49908] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0xb9a5f) [0x7f1518c83a5f] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0xcddac) [0x7f1518c97dac] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0xcddef) [0x7f1518c97def] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0xf537d) [0x7f1518cbf37d] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0xb479e) [0x7f1518c7e79e] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0xb79b6) [0x7f1518c819b6] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0xb8116) [0x7f1518c82116] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(+0xb853f) [0x7f1518c8253f] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(sqlite3_prepare_v2+0x16) [0x7f1518c826a6] backtrace.c:53 /lib/x86_64-linux-gnu/libsqlite3.so.0(sqlite3_exec+0xb4) [0x7f1518c8fce4] backtrace.c:53 /usr/bin/osmo-msc(+0x1bf13) [0x564f81946f13] backtrace.c:53 /usr/bin/osmo-msc(+0x524c0) [0x564f8197d4c0] backtrace.c:53 /usr/bin/osmo-msc(+0x1324e) [0x564f8193e24e] backtrace.c:53 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f1518991d0a] backtrace.c:53 /usr/bin/osmo-msc(+0x13fea) [0x564f8193efea] Related: SYS#6360 Change-Id: I9bb799048db5fcdb2a2520107bd75d5f7a865459
2023-04-04msc_mgw_setup: use mgcp_client_pool_empty()Oliver Smith2-2/+7
Don't fall back to the legacy config if the pool is configured but no connection to any pool member can be established. Depends: osmo-mgw I009483ac9dfd6627e414f14d43b89f40ea4644db Related: OS#5993 Change-Id: I44e7b2723d801ceb03aaa2e5546802b4eb56b3c3
2023-03-28coverity: sdp_msg_test.c: check rc of sdp_msg_from_sdp_str()Neels Hofmeyr1-1/+1
Related: CID#310975 Change-Id: I69d8972c58fb7cde965ff0b231947dd26247c2c7
2023-03-26fix msc_vlr_test_call SDP mncc_rtpNeels Hofmeyr2-16/+39
In msc_vlr_test_call, we fail to send the right MNCC struct for MNCC_RTP_CREATE. We should pass a struct gsm_mncc_rtp. Fix that. Change-Id: Ia0b3253f85c716e45f925da3f58f025af1f15ec9
2023-03-18HO Req: include IE Codec List (MSC Preferred)Neels Hofmeyr1-0/+9
This will make the 10 inter-MSC HO tests in MSC_Tests.ttcn pass again. Related: OS#5529 Change-Id: Ifcf719c5fc9e11749aafbd97bafda7f6f50973ea
2023-03-18codecs: compose HO Req Ch Type from cc.codecsNeels Hofmeyr1-3/+4
Change-Id: Iba7a1a87ec5e6b487f763e84d60ed285da7b8fe1
2023-03-18[codecs filter] msc_vlr_test_call: test codecs resolutionNeels Hofmeyr4-8/+3669
Show that the codecs filter now works as expected in call messaging. Related: SYS#5066 Change-Id: I879ec61f523ad4ffc69a0b02810591f7c0261ff9
2023-03-18mncc_recvmsg(): log caller file,lineNeels Hofmeyr2-20/+26
Change-Id: I3755eb35b504f2f2580e0ba43dfa41f16087decc
2023-03-18do CN CRCX firstNeels Hofmeyr8-258/+461
In order to send the MSC's RTP endpoint IP address+port in the initial SDP, move the MGCP CRCX up to an earlier point in the sequence of establishing a voice call. Update the voice call sequence chart to show the effects. Though the semantic change is rather simple, the patch is rather huge -- things have to happen in a different order, and async waits have to happen at different times. The new codec filter helps to carry codec resolution information across the newly arranged code paths. Related: SYS#5066 Change-Id: Ie433db1ba0c46d4b97538a969233c155cefac21c
2023-03-18[codecs filter] use codecs filter on crcx okNeels Hofmeyr2-4/+20
Change-Id: I03753df567d1dc24852e6fbb681fbba81d2a545d
2023-03-18msc_vlr_tests: confirm crcx by RAN/CN side separatelyNeels Hofmeyr3-21/+26
Upcoming patch 'do CN CRCX first' changes the ordering of MGCP. To properly show the change in behavior in the msc_vlr_test_call, first clarify which side is expected to do MGCP when. Related: SYS#5066 Change-Id: I972e7426006e5b62f81ccfe4fa224ee9eed7a7ac
2023-03-18[codecs filter] send + receive SDP via MNCCNeels Hofmeyr6-50/+197
Transmit and receive full SDP information via MNCC, to accurately pass codecs choices between the call legs. In msc_vlr_test_call.c test_call_mt(), show that when receiving MNCC, the codec information in SDP overrules the Bearer Cap codec information -- we expect to still receive inaccurate Bearer Cap from e.g. osmo-sip-connector, because we have chosen to add SDP to MNCC instead of trying to fix the codecs represented in Bearer Cap. For internal MNCC, the MT call leg now knows which codec the MO has chosen and assigned. For external MNCC, osmo-sip-connector receives SDP about our codecs choices and sends it in SIP messages, and we also receive the full SDP information from the remote SIP leg. Update the SDP in codec_filter every time it is received, to always have the latest SDP information from the remote leg. CC MNCC | ---ALERTING--> | add local side SDP to MNCC msg | <--ALERTING--- | store remote side SDP | <--SETUP-RESP- | store remote side SDP | --SETUP-CNF--> | add local side SDP to MNCC msg | -RTP-CREATE--> | use codec_filter, add local side SDP to MNCC msg | <-RTP-CONNECT- | store remote side SDP There still is one problem: when initiating MNCC, we do not yet know the RTP address and port to be used for the CN side, because the CN CRCX happens later. So far we send 0.0.0.0:0 as RTP endpoint in the SDP, until the CN CRCX is done. A subsequent patch moves CN CRCX to an earlier time, adding proper RTP information right from the start. Related: SYS#5066 Change-Id: Ie0668c0e079ec69da1532b52d00621efe114fc2c
2023-03-18[codecs filter] use filter result in AssignmentNeels Hofmeyr2-23/+20
So far, patches have set up rtp_stream to allow setting multiple codecs, and collected the codecs information into the codecs filter struct. Now actually use the codecs filter result to choose a codec. Setting up the call leg FSMs and codecs still looks rather confusing in this patch, because this is an incremental step in a larger series. The upcoming patch 'do CN CRCX first' clarifies this substantially. The resulting codecs behavior is tested in upcoming patch I879ec61f523ad4ffc69a0b02810591f7c0261ff9. (The test ideally should have come before this patch, but my time to rework this branch is up.) With the codecs filter in place, we are ready for sending and receiving full SDP via MNCC, see upcoming Ie0668c0e079ec69da1532b52d00621efe114fc2c and Ie433db1ba0c46d4b97538a969233c155cefac21c Related: SYS#5066 Change-Id: I66e7c8c5e401f4f3a7d3d42b9525b2c6e99691d9
2023-03-18[codecs filter] use filter result in MT DTAP CC SetupNeels Hofmeyr3-12/+40
So far, we just forwarded the Bearer Capabilities received in MNCC from the remote MO call leg, and omitted Bearer Cap if the remote call leg did not provide any. Instead, always include Bearer Cap, and compose it from the codecs filter result. Hence the Bearer Cap is now an intersection of MS, BSS and remote call leg, instead of just the remote call leg. Related: SYS#5066 Change-Id: I9586221ef56352b7ce4b2604ae0dc04554145a78
2023-03-18in ran_msg, return gsm0808_speech_codec (inter-MSC)Neels Hofmeyr5-25/+34
Get rid of enum mgcp_codecs in inter-MSC handover related code. Change-Id: I9c649f98738a55b8637ae600d5cdf81099fd08e5
2023-03-18in ran_msg, return gsm0808_speech_codec (intra-MSC)Neels Hofmeyr8-43/+67
Do not convert to enum mgcp_codecs, but directly pass the gsm0808_speech_codec IE from the A interface to codecs handling. For Iu: - RAN side: use ran_infra.force_mgw_codecs_to_ran to keep the MGW endpoint towards RAN on IUFP. - CN side: introduce flag ran_msg.assignment_complete.codec_with_iuup, so to decide whether to forward IUFP towards CN, we don't need to test the RAN type, but use the flag from the ran_msg implementation. In msc_vlr_tests, use the SDP codec string instead of enum mgcp_codecs. So far limit to intra-MSC related messaging, adjusting inter-MSC handover follows in a separate patch. Change-Id: Ia666cb697fbd140d7239089628faed93860ce671
2023-03-18rtp_stream: allow multiple codecs / use codec filter from AssignmentNeels Hofmeyr12-106/+187
Allow configuring MGW conns with multiple codecs. The new codecs filter can have multiple results, and MGCP can configure multiple codecs. Get rid of this bottleneck, that so far limits to a single codec to MGW. On Assignment Complete, set codec_filter.assignment to the assigned codec, and use that to set the resulting codec (possibly multiple codecs in the future) to create the CN side MGW endpoint. Related: SYS#5066 Change-Id: If9c67b298b30f893ec661f84c9fc622ad01b5ee5
2023-03-18add ran_infra.force_mgw_codecs_to_ranNeels Hofmeyr4-0/+27
Indicate in the ran_infra data structure whether a RAN needs specific codecs to be set up on the RAN facing MGW endpoint. This allows setting forced RAN codecs as first-class citizen in the ran_infra data structure, instead of special cases in the code (for IuUP on IuCS). Will be used in subsequent commit I37f65c36af2679ecba1040a11a9aa0eb9481d817, submitted separately for easier readability. Change-Id: I37f65c36af2679ecba1040a11a9aa0eb9481d817
2023-03-15rtp_stream: Fix remote_osmux_cid_sent_to_mgw never set to truepespin/testPau Espin Pedrol1-0/+2
Change-Id: I978c78976470a6c5a36da8611a203f96c9a1b2a5
2023-03-15rtp_stream: Update id after modifying fields upon Tx of MGCP msgPau Espin Pedrol1-0/+1
Change-Id: Ifbcab2d07df96d2a826e8235306b18df9573802c
2023-03-14[codecs filter] apply BSS codecs from Assignment CompleteNeels Hofmeyr1-0/+5
Codec List (BSS Supported) is received once in Complete Layer 3 and again in Assignment Complete messages. Use the most recent one, i.e. the one from Assignment Complete, when it occurs. Related: SYS#5066 Change-Id: I5e66ecc7987fa926f39d8be8eaf5799b931ab20a
2023-03-14msc_vlr_test_call: include RAN RTP addr in ass complNeels Hofmeyr2-25/+26
I noticed by chance that the Assignment Complete message generated in the test lacks a remote RTP address for the RAN side. Make the test more realistic by adding a remote RTP address and port. It doesn't have any bearing on the tests besides more accurately showing RTP stream setup in the logs. Change-Id: Ia428762a16dcc17f036d725a00e0b3767418289b
2023-03-14[codecs filter] MT call: store MS Bearer Cap from CC Call ConfNeels Hofmeyr1-0/+4
Related: SYS#5066 Change-Id: Ic3d0f05af57a493d500700c63b121c8114e7fbf4
2023-03-14[codecs filter] MT call: apply remote call leg codecsNeels Hofmeyr2-0/+21
Collect either the SDP or the Bearer Capabilites in the incoming MNCC in the new codecs filter. So far just collect the info and do not change the behavior, using the filter result will follow in a subsequent patch. Related: SYS#5066 Change-Id: I84d9bbca3e4061da622b1b2fc0bde8868e7e3521
2023-03-14[codecs filter] MT call: apply BSS codec listNeels Hofmeyr2-0/+14
For MT call, initialize the codecs filter and apply the Codec List (BSS Supported) from Compl L3. Related: SYS#5066 Change-Id: I530409a64d11da48518a3dc60aa3a4e47c384663
2023-03-14[codecs filter] MO call: apply BSS codec listNeels Hofmeyr2-0/+12
Related: SYS#5066 Change-Id: I062268406ae3f3a63a7f413db51c509c9eaf9e8a
2023-03-14[codecs filter] store BSS codec list from Compl L3Neels Hofmeyr2-0/+16
The initial Compl L3 happens long before we establish a CC transaction. Remember the Codec List (BSS Supported), so that we can feed the new codecs filter with it. Subsequent patches implement feeding the filter. Related: SYS#5066 Change-Id: I7cdc348218433141a43d2e42750af02591688240
2023-03-14[codecs filter] add trans.cc.codecsNeels Hofmeyr1-0/+3
Add the central codecs_filter for Call Control. The new member is not used in this patch yet, subsequent patches will start to populate the various stages of this codec filter, one by one. Related: SYS#5066 Change-Id: Ib3fdeff8d1e1ea0760168d63ee6e1b1fb993aa5f
2023-03-14[codecs filter] add codec_filter.h,cNeels Hofmeyr4-0/+283
Add the infrastructure to store and filter all codec limitiations from the different stages: MS, BSS, CN and remote call leg. Upcoming patches will properly collect these and find an optimal codec. No functional change, yet. Related: SYS#5066 Change-Id: I4d90f7ca62f2307a7b93dd164aeecbf4bd98ff0a
2023-03-14MNCC: use codec_mapping, drop mgcp_codec_to_mncc_payload_msg_type()Neels Hofmeyr2-22/+20
Change-Id: I8995ef43b9f79bc1db5672362c6433e4d96dd9e0
2023-03-14add codec_mapping.h,cNeels Hofmeyr4-0/+587
Converting between different codec representations is confusing. This codec mapping provides a consolidated overview of all our codec representations, and how they match up. In particular, it adds the SDP codec representation repertoire, preparing the use of full SDP on the MNCC interface. Related: SYS#5066 Change-Id: Iaa307be6a8487aa8d4ba7cd59d5c5ef04818a744
2023-03-14mncc_sock: Call osmo_fd_unregister() before closing and changing bfd->fdPau Espin Pedrol1-1/+1
Change-Id: I90f840da4cc26c1d970c3f5d18d3185678a1dba9
2023-03-11tests: use -no-install libtool flag to avoid ./lt-* scriptsVadim Yanitskiy6-0/+24
This option should be used for any executables which are used only for testing, or for generating other files and are consequently never installed. By specifying this option, we are telling Libtool that the executable it links will only ever be executed from where it is built in the build tree. Libtool is usually able to considerably speed up the link process for such executables. Also take a chance to add the missing $(COVERAGE_LDFLAGS). Change-Id: I664a9d5abed2777deee302f9d3afd1bbfde7a844
2023-03-11src/Makefile.am: remove unneeded AM_LDFLAGS with LIBSVadim Yanitskiy1-6/+0
Change-Id: I7895f037925e0e29f52e01636a0ba157cc324e5d
2023-03-09add voice_call_internal_mncc.mscNeels Hofmeyr2-0/+130
Same as voice_call_external_mncc.msc, but run with internal MNCC. Shows some curious differences like the MNCC_LCHAN_MODIFY that internal MNCC sends, but external doesn't. Change-Id: Ic003322dc4e3fce24a8413688cfe18198a4dc08a
2023-03-09update doc/sequence_charts/voice_call_external_mncc.mscNeels Hofmeyr1-46/+47
Re-run the msc_log_to_ladder.py on an actual 2G-2G voice call log, to see if anything changed in the meantime, to prepare for upcoming changes to the sequencing of establishing voice calls. Also shows recent improvements on picking up RTP ports from MGCP and MNCC. Change-Id: I9dcf980ad24d5921c291c9aada211b37f6f3db7f
2023-03-09charts: Rename voice_call_full.msc to voice_call_external_mncc.mscNeels Hofmeyr2-1/+1
Because I will soon add an _internal_mncc one as well. Change-Id: Ic90a93d749ea936a632a45e615007a58104eeedd
2023-03-09msc_log_to_ladder.py: various tweaksNeels Hofmeyr1-18/+47
(multiple changes in one patch because who cares about this script) tweak regexes -- they worked ok, but some of the '[^:]' should really be '[^:)]', and they also look happier that way. don't skip RAN=NONE, so we also see messages before Complete Layer 3. s/sip/mncc, to generally be valid for both internal and external MNCC. pick up RTP port information from MGCP OK pick up RTP port information from MNCC rx and tx add --verbose flag, to be able to check whether the regex rules are still working (getting any hits). fix rule_imsi_detach: should return True to be counted in --verbose. tweak comment 'Generated by...' to include the full git path. Change-Id: If619182ba76c6b238a1fa105a3c3449d7f473dd1
2023-03-09tweak MNCC logging, add RTP infoNeels Hofmeyr2-33/+73
Omit "in state FOO", because LOG_TRANS() already logs the state. Most MNCC "rx" logging was duplicated. Log "rx" only once. If there is RTP information passed with the MNCC message, log it: - if there is SDP, log the SDP information. - if there is no SDP, log the legacy MNCC RTP fields, if any. One motivation to do this is to get RTP information in ladder diagrams generated by msc_log_to_ladder.py without the need to add udtrace MNCC logging to osmo-msc; and also to get RTP info for internal MNCC, where udtrace doesn't apply, because no unix domain socket is involved in internal MNCC operation. Change-Id: I4b916cb482ed441b508c6295de211a21c49cd5c1
2023-03-09make: doc/sequence_charts: use wildcards for EXTRA_DIST and CLEANFILESNeels Hofmeyr1-8/+2
Both EXTRA_DIST and CLEANFILES had missing entries. It is easy to forget to keep them up to date. Rather use wildcards to always pick up all relevant files. (Not adding *.dot because there are no .dot charts here, yet.) Change-Id: I3a18e4608a310169d7c9cd9c1b8ac9015a990920
2023-03-04IuCS: remove IuUP LOOPBACK hackNeels Hofmeyr1-6/+0
Since osmo-mgw now supports IuUP properly, and since we indicate IUFP in the MGCP CRCX towars an IuCS RAN [1], we should no longer place the MGW endpoint in loopback mode to hack up an IuUP Initialization. This hack should have been removed along with [1]. [1] IUFP sent to MGW since this commit: commit 3a02d298049149f126fecc51e8445392cdb3b950 Refs: 1.8.0-13-g3a02d2980 Announce IuFP audio codec for UTRAN conns in CRCX towards MGW I7aca671e00ed27ac03f0d106b5a6b665a9bed4c1 Change-Id: I6446c64421e3e13e2b829293d031c98b99cd39a7
2023-03-04comment: clarify L3 Info processingNeels Hofmeyr2-1/+3
Related: SYS#5066 Change-Id: Ia9180eeb88b31a2cf7dea72b43affd0c7b239ccb
2023-03-04sdp_msg.c: fix missing rate in sdp_audio_codecs_add()Neels Hofmeyr1-0/+1
When a new entry is is added by sdp_audio_codecs_add(), also add the proper rate. Change-Id: I17ad8862f662975e2df72a332eb83df7fb048cad
2023-02-25Transition to use of 'telnet_init_default'arehbein1-2/+1
Related: OS#5809 Change-Id: Icc57c68337d55c6594c1c36e9bf41624d11dab0a
2023-02-07Bump version: 1.9.0.58-1289-dirty → 1.10.01.10.0Pau Espin Pedrol5-33/+105
Change-Id: Ifff00a3107447da911629948e9f3061c93b6ac86