Call Simulation between OsmocomBB Host Mobile Apps

I’m trying to simulate a call between two MS, using OsmocomBB Host Mobile App with virtphy (virtual um setup).

For tch-voice in ms.cfg I’m using gapk as io-handler and rtp for io-tch-format. For input/output device I’m using the alsa loopback modul.

I have tried different variation of formats with osmo-gapk. But if I understand it correctly, I just have to use the raw pcm format as input (with fr codec).

No matter what I do, in MS1 I start a call and get: ‘Call is proceeding’, ‘Call is altering’, and finally ‘Call has released’. In MS2 I try to answer the ‘Incoming Call’, but nothing happened, and ‘Call has released’ is coming.

In Wireshark it goes till Assignment Complete and then at some point only Release and Disconnect appear, no Connect Connected or Call Active.

Log of MS shows that GAPK I/O is initialized. The MGW log shows the following sequence:

GCP NOTICE endpoint:rtpbridge/4@mgw CI:D2A74582 CRCX: connection successfully created (mgcp_protocol.c:1053)
DLMGCP NOTICE endpoint:rtpbridge/4@mgw MDCX: modifying existing connection … (mgcp_protocol.c:1082)
DLMGCP NOTICE rtpbridge/4@mgw: Got media info via SDP: port:16386, addr:10.0.0.3, duration:20, payload-types:3=GSM (mgcp_sdp.c:425)
DLMGCP NOTICE endpoint:rtpbridge/4@mgw CI:D2A74582 MDCX: connection successfully modified (mgcp_protocol.c:1249)
DLMGCP NOTICE endpoint:rtpbridge/1@mgw MDCX: modifying existing connection … (mgcp_protocol.c:1082)
DLMGCP NOTICE rtpbridge/1@mgw: Got media info via SDP: port:4010, addr:10.0.0.5, duration:20, payload-types:3=GSM (mgcp_sdp.c:425)
DLMGCP NOTICE endpoint:rtpbridge/1@mgw CI:85BE52D2 MDCX: connection successfully modified (mgcp_protocol.c:1249)
DRTP ERROR (rtpbridge/3@mgw I:2C94DB5F) RTP packet too short (1 < 12) (mgcp_network.c:959)
DLMGCP NOTICE endpoint:rtpbridge/4@mgw CRCX: creating new connection … (mgcp_protocol.c:826)
DLMGCP NOTICE rtpbridge/4@mgw: Got media info via SDP: port:4012, addr:10.0.0.5, duration:20, payload-types:3=GSM (mgcp_sdp.c:425)
DLMGCP NOTICE endpoint:rtpbridge/4@mgw CI:8F823C60 CRCX: connection successfully created (mgcp_protocol.c:1053)
DRTP ERROR (rtpbridge/3@mgw I:AAA16AAD) RTP packet too short (1 < 12) (mgcp_network.c:959)
DLMGCP NOTICE endpoint:rtpbridge/3@mgw MDCX: modifying existing connection … (mgcp_protocol.c:1082)
DLMGCP NOTICE rtpbridge/3@mgw: Got media info via SDP: port:4016, addr:10.0.0.5, duration:20, payload-types:3=GSM (mgcp_sdp.c:425)
DLMGCP NOTICE endpoint:rtpbridge/3@mgw CI:AAA16AAD MDCX: connection successfully modified (mgcp_protocol.c:1249)
DRTP ERROR (rtpbridge/4@mgw I:8F823C60) RTP packet too short (1 < 12) (mgcp_network.c:959)
DLMGCP NOTICE endpoint:rtpbridge/3@mgw DLCX: deleting connection(s) … (mgcp_protocol.c:1274)
DLMGCP NOTICE endpoint:rtpbridge/3@mgw DLCX: connection successfully deleted (mgcp_protocol.c:1387)
DLMGCP NOTICE endpoint:rtpbridge/3@mgw DLCX: deleting connection(s) … (mgcp_protocol.c:1274)
DLMGCP NOTICE endpoint:rtpbridge/3@mgw DLCX: connection successfully deleted (mgcp_protocol.c:1387)
DLMGCP NOTICE endpoint:rtpbridge/4@mgw DLCX: deleting connection(s) … (mgcp_protocol.c:1274)

In Wireshark I have seen that a dummy payload of one byte is sent here. This can also be seen in the code. It is therefore clear that the RTP packet format is not matched. I just don’t know the cause.

Any suggestions as to what I am doing wrong?

How do I use the gapk option of the osmocombb mobile app correctly?

I don’t have any specific answer to your question, but rather a general comment:

It may be that nobody has used this rather esoteric feature (OsmocomBB mobile gapk supprt) in many years, and it may not work as expected. As you may know, OsmocomBB is relatively unmaintained these days, with no significant contributions from the community and zero commercial interest in it, the state is rather different than the network side (Osmocom CNI).

Thanks for the comment. Any ideas on call simulation with mobile app (without gapk) or for free mobile station alternative to osmocombb mobile app? I’m aiming for a purely virtual setup, as I’m sure is already clear.

Last time I tested GAPK I/O was around a year ago and it worked. Though, I used trxcon+fake_trx, not the virtphy. It might be that TCH support in virtphy/osmo-bts-virtual is incomplete or broken somehow.

This is a dummy packet is coming from osmo-mgw, not from osmocom-bb/mobile. The idea, IIRC, is to punch a hole in the firewall. You would also see this dummy RTP packet in a setup with real BTS and real (not simulated) phones, so this is definitely not the culprit here.

Unfortunately, neither you provided logging output of osmocom-bb/mobile nor a packet capture. Without that it’s hard to understand what’s going on in your setup.

I suggest to try running osmo-bts-trx + fake_trx/trxcon, this combination is known to work.