My first plan was to use IUA for signalling and RTP CLEAR MODE for the data channel, all handled by yate on both side of the link.
Turns out that :
yate doesn’t support being a IUA gateway at all. The type isdn-iua-gateway is just a place holder with no code behind it.
It “seems” to have client support (or at least there is some code related to that part), but so far I have been completely unable to have it do anything at all … so it might just be broken/incomplete.
So that plan kind of seems hosed …
Making some BRI variant of OCTOI with slight special casing for BRI seems more approachable to me. Mostly because it doesn’t require a ton of ISDN knowledge I don’t have, just passing data mostly transparently.
Something like having a basic frame structure of 9 bytes, 2*4 for D channel + 1 for B channels. Each of course with the same omit/repeat logic as for OCTOI should already take us a decent way there I think. And then maybe some more grouping to get to ~ 500 Hz message rate should be good.
A simple, bit-transparent protocol based on the already existing TDMoIP protocol seems reasonable to me. Optionally, the activation/deactivation of the connection (ITU-T I.430 / 2.2.2) can also be implemented. I assume that this would also reduce the server load.
Having gone the raw TDMoIP route with OCTOI and the associated protocol, I think we’ve also seen that it has serious issues when it comes to [packet] lossy internet links/routes.
For E1, there are many other use casese where a raw E1 transport makes sense beyond the ISDN use case: There’s FrameRelay, ATM and other protocols like even V5, GSM-Abis or GSM-A. Or classic SS7. Or a CAS channel bank. For BRI, all those use cases don’t really exist, so the argument for a raw bitstream transport becomes much weaker. On the other hand, the advantages of having a reliable D channel even in case of unreliable internet links is rather strong.
There’s not a lot of ISDN knowledge needed for running the network-side LAPD instances on a hypothetical IUA device, and taking the L3 payload contained in the UI and I frames to forward it over SCTP (or SCTP-over-UDP in case of poor packet filtering choices in the route towards the central node).
So yes, yate doesn’t seem to support IUA at the moment. One could either add that (the code is not so hard to read/work with), or come up with something completely different. I would definitely cast my vote (if there was any) in favor of such a solution. over something like raw bitstream TDMoIP.
Separating the D and B channels certainly makes sense. However, would it be conceivable to start with a (in my view simpler) bit-transparent implementation first? There would be nothing to prevent developing a more robust version afterwards that copes better with jitter and packet loss.
@tnt and I had a bit of time to brainstorm during FOSDEM and ended up with the following conclusions:
the IUA support in yate won’t really help us much; not because it’s incomplete, but because IUA like all SIGTRAN doesn’t have user authentication but relies on identifiying peers on fixed IP addres / port combinations
IUA (like any other solution splitting the signaling from the B channels) will suffer from problems with NAT devices in the path between the user and the server
The ideal solution hence is to pass both signaling and B channels in one L4 connection / flow
signaling should be transported as HLDC frames and not as bit-stream for reliability reason (and to reduce server load as well as network traffic)
signaling needs reliabilty / re-transmissions etc.
B-channels need to be transparent
In the end, we conclude some custom protocol makes sense, and we actually discovered that QUIC should do the trick:
it suppotrs relible delivery of multiple streams
it supports unreliable datagram in the same UDP flow
it even offers sessin resumption after the client-side IP address has changed (dynamic PPP address reallocation at client)
QUIC also covers authentication / confidentiality by relying in TLS. I’d probably even go for client side certificates if there’s TLS available anyway.
The signaling side could be loosely modelled after IUA, and the B chanels could resemble sometihng like RTP CLEARMODE over QUIC. There’ even a RoQ IETF traft circulating for some time,which permits also multiplexing multiple RTP flows over the same QUIC connection, which is exactly what we need for 2 B channels.
There are handful of different open sourc library implementations out there (like libhttp2). The latter supports integration into any kind of I/O abstraction.
The server side would then be some custom program terminating those conncetions. On the side towards yate, we could then
emulate 3 (3B+D) DAHDI character devices via cuse (unmodified yate would think it talks to DAHDI)
come up with a more direct yate channel driver for talking to that custom daemon
Even though it sounds inefficient, the first approach might be interesting as it would then not be yate specific; basically any DAHDI-compatible application would just think it’s talking to a BRI interface card, when in reality it is speaking this custom QUIC based protocol.