Binary / text data transfer between bareSIP clients

77 views
Skip to first unread message

Jim Bell

unread,
Sep 25, 2023, 11:14:21 PM9/25/23
to baresip

We're looking to transfer text or binary data along with audio & video between two bareSIP clients. More than a few bytes, but much less than the UDP MTU. A data conversation of sorts, with a message every few seconds.

Does such a mechanism already exist? Is anyone working on this?

If not, these approaches come to mind, with pros & cons:

Implement SDP's m=text or m=application.

Pros:

  • Close cohesion with audio & video. Timestamps for recording, etc.
  • Leverage all transports available to audio & video, including SDP bundling.

Cons:

  • Biggest potential impact to code base, cutting across many layers.
WebRTC Insertable Streams or data channels.

Pros:

  • Possibly smaller impact to code base, more modular implementation.
  • Leverages existing mechanisms.

Cons:

  • Still seems like a big effort.
  • Forces us to use WebRTC exclusively (not SIP).
Implement as some sort of rigged audio or video source/sink.

Pros:

  • Minimal impact on existing code.

Cons:

  • Codecs or filtering would corrupt the data very easily.
Try to sneak data back and forth by hacking on SCTP packets, as user data chunks.

Pros:

  • Minimal impact to existing code.

Cons:

  • Disconnected from audio & video streams.

Of course, the approach requiring the least effort, and leveraging existing mechanisms (already well tested) is most appealing. We can handle lost packets at the application layer.

Vitalii Orazov

unread,
Sep 26, 2023, 3:25:11 AM9/26/23
to baresip

Hello, 
may be the transfer of small data via DTMF is suitable for you?
вторник, 26 сентября 2023 г. в 06:14:21 UTC+3, j...@jc-bell.com:

Jim Bell

unread,
Sep 26, 2023, 6:06:05 PM9/26/23
to baresip
Thanks for the advice!  I think I see some options related to DTMF that could work well.



On Tuesday, September 26, 2023 at 2:25:11 AM UTC-5 vior...@gmail.com wrote:

Hello, 
may be the transfer of small data via DTMF is suitable for you?
вторник, 26 сентября 2023 г. в 06:14:21 UTC+3, j...@jc-bell.com:

We're looking to transfer text or binary data along with audio & video between two bareSIP clients. More than a few bytes, but much less than the UDP MTU. A data conversation of sorts, with a message every few seconds.

Does such a mechanism already exist? Is anyone working on this?

...

Rodrigo Deppe

unread,
Sep 28, 2023, 2:57:31 PM9/28/23
to baresip
Maybe even safer / faster to use SIP INFO that is also used for DTMF. I am not sure if your can send a bunch of digits together though. It is worth a look. If so, maybe convert the whole data do ASCII decimal, 3 DTMF per character.

Rodrigo Deppe

Reply all
Reply to author
Forward
0 new messages