rtc-io / rtc-sip

EXPERIMENTAL: Compatibility layer for SIP using SIP.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

googIPv6 RTCConstraint not passed through to rtc.io mediaHandlerFactory

warrenjmcdonald opened this issue · comments

When using the sip.js 6.4 with the rtc.io mediaHandlerFactory, the {'googIPv6': 'false'}, RTCConstraint is not being used in the peer connection. Other constraints such as OffertoReceiveAudio/Video are being used correctly.

The same RTCConstraint object used with sip.js directly (no media factory), is working as expected.

See code extract of test harness below.

var userAgent = new aartc.SIP.UA({
    mediaHandlerFactory: aartc.mediaHandlerFactory({plugins: [aartc.pluginNictaIos]}),
    wsServers: ['wss://<servername>'],
    stunServers: ["<stunserver>"],
    turnServers: [
                {
                urls:["turn:<turnserver>:3478"],
                username:"#######",
                password:"########"
                }
                ],
    hackViaTcp: true,
    hackIpInContact: true,
    traceSip: true
  });


function startcall(){
    var options = {
                media:{
                     stream: Stream,
                         constraints: {
                                audio: true,
                                video: true
                                 }
                        },
                 RTCConstraints: {
                 "optional": [
                        {'DtlsSrtpKeyAgreement': 'true'},
                        {'OfferToReceiveVideo': 'true'},
                        {'googIPv6': 'false'},
                        {'OfferToReceiveAudio': 'true'}
                        ]
                                }
                        };

  session = userAgent.invite('sip:' + conf_id.value + '@<domainname>', options);
  session.on('accepted', onAccepted);

@DamonOehlman Any thoughts on this. This is a higher priority than the TURN creds expiry issues. We can skirt around this by not using the media handler. This will prevent use in iOS, but we still have other work to do there yet, so that may be OK.

@warrenjmcdonald I'll try and take a look at this tonight. Shouldn't be too tricky to fix.

@warrenjmcdonald I've got no good explanation of why I did it, but for some reason I am specifically not passing through the options when creating a new peer connection object (see 08cfd6f)

I'll investigate reinstating that now.

I think this should now be fixed in 1.1.0 courtesy of d0f1c69

Thanks @DamonOehlman. We will test this ASAP.

This fix has passed testing. Thanks heaps.

Warren