Hello again everyone,
I am pleased to report that I have call waiting feature working just fine on my network, consisting of OsmoMSC (plus OsmoBSC and sysmoBTS) for the GSM part plus my own themwi-system-sw for the gateway to USA PSTN. The only change I had to make to OsmoMSC (see attached trivial patch) is just one line of code, calling gsm48_tch_rtp_create() in the "another call already present" code path in msc_a_try_call_assignment().
Now I'm sure there are probably all kinds of corner cases this trivial patch doesn't cover, but with this patch added call waiting works fine in simple testing at the end user level, whereas without this patch it has exactly zero chance of working: if there is no MNCC_RTP_CREATE message sent by OsmoMSC for call 2, then whatever software is handling that call 2, be it osmo-sip-connector or an independent reimplementation, will have no ability to cross-connect the traffic plane for that call.
This discovery leads me to an unsetting observation about the state of this community: given that current mainline unpatched OsmoMSC allows no possibility of working call waiting feature, and it's been this way for years, am I really the first person in the entire community to try using call waiting, see it not working, spend less than a day digging through code to see why, and make at least a rough experimental patch to make it work? Really the first? Really? Wow...
In any case, it works now, with inbound calls coming from PSTN via my themwi-sip-in call gateway that routes them to my themwi-mncc switch and ultimately to OsmoMSC. For anyone who would like to see a real gateway between an Osmocom-based GSM network and PSTN, the source is here:
https://www.freecalypso.org/hg/themwi-system-sw/
I haven't started on the outbound call gateway yet, but the inbound gateway feels quite solid now, including the necessary transcoding of RTP and even generation of in-band DTMF tones toward PSTN.
M~