Hello Rick,
interesting approach. We can identify video calls by special SIP headers and/or sdp
contents and have Kamailio trigger a webhook or something.
But even though I would like to try it at home, I see huge issues with maintaining such a
solution in production. This is so far off from anything standard that you need to have
this one guy at hand when all hell breaks loose.
I'd rather favor Henning's suggestion of reverting to a PBX and implement the
media handling there. Not that fancy, but maintainable by the average support guy that
comes in for half a year and leaves afterwards.
Regards,
Christoph
-----Original Message-----
From: sr-users <sr-users-bounces(a)lists.kamailio.org> On Behalf Of Rick van Rein
Sent: Tuesday, May 17, 2022 7:57 AM
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Subject: Re: [SR-Users] Split audio and video into different calls
This message was sent from outside the company. Please do not click links or open
attachments unless you recognize the source of this email and know the content is safe.
Hello Christoph,
I held back responding, but since it does not seem directly possible with Kamailio
here's what I what try.
RTP frames have a Payload Type which is usually negotiated in rtpmap attributes in SDP,
but there are static mappings for many codecs. I would first figure out if you can find a
common pattern in your (local) traffic that separates the two kinds of payload.
Since the Payload Type is at a fixed offset (the lower 7 bits of the second RTP byte, the
8th bit is an M-bit) you could instruct a firewall to mangle/redirect traffic to your
video wall. You can easily ignore the M bit in the same byte by specifying two values for
the M-bit + Payload Type byte.
For NFT on Linux, see
https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmanpages.…
If this seems workable, I would look into the sdpops module in Kamailio, to modify any SDP
attachments coming in and going out, to strip and add video codecs. You may or may not
need to dynamically alter the firewall bypassing. But in general, you can set where the
Payload Type on the local end receives video streams -- possibly with different codecs.
https://eur06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kamail…
You may or may not need to use Kamailio to fork a connection to your video software,
depending on whether it wants SIP to talk to it.
This probably gives you the control you need, but it is a bit of a hack. Which is why I
held back to see if others knew a more direct method of doing what you want.
It would be interesting to hear if / how this works for you, by the way. It might even be
a nice blog article.
Cheers,
-Rick
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
*
https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kam…