MayamaTakeshi / sip-lab

A node module that helps to write SIP functional tests
3 stars 2 forks source link

Add MSRP support #53

Open MayamaTakeshi opened 6 months ago

MayamaTakeshi commented 6 months ago

It seems we could simply create the tcp/tls socket, write the code for framing and provide the a=path in the SDP offer/answer. But I think this would not be usable for any actual testing, because in practice, a UA would obtain the a=path from a MSRP relay server and set it in the SDP:

Ref: http://msrprelay.org/msrp-scenarios/

See also issue 2186 from https://github.com/kamailio/kamailio

Better test this first with some actual client like baresip or blink.

I think when specifying the media, it should be like this:

[
  {
    type: 'audio',
    fields: [
      'a=sendrecv',
      'a=mid:1',
    ],
  },
  {
    type: 'msrp',
    relay_server: 'MSRP_SERVER_ADDRESS',
  }
]

The above would cause MSRP_SERVER_ADDRESS to be contacted so that a a=path could be obtained and this a=path would be set in the SDP offer/answer.

If relay_server is not present, then the UA would open a listening socket for TCP/TLS and use it in the a=path.