You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running SRF in outbound connection mode, in functions like 'createB2BUA', the default socket selected is basically 'the first socket' it can find. The code workaround to this is forwarding the _socket parameter like this:
srf.createB2BUA(req, res, destSipUri, {
headers: forwardHeaders,
passFailure: false,
localSdpB: rtpOffer.sdp,
localSdpA: async (remoteSdp, res) => await this.getSdpAnswer(remoteSdp, res),
_socket: req.socket // <- pass on the incoming req.socket here
})
This workaround works, but it's interacting with a _prefixed parameter, and is completely undocumented.
If I don't set the _socket parameter, SRF will automatically just pick the first socket in the sockets collection, which can (and will in most cases), belong to a completely unrelated SRF session.
The text was updated successfully, but these errors were encountered:
@davehorton Yeah, I think it would make sense that it picks whatever socket is associated with the passed in Request? I can't really think of a use case for ever having it belong to another connection, at least in outbound mode. In "inbound mode" it could make sense I suppose, maybe?
When running SRF in outbound connection mode, in functions like 'createB2BUA', the default socket selected is basically 'the first socket' it can find. The code workaround to this is forwarding the
_socket
parameter like this:This workaround works, but it's interacting with a _prefixed parameter, and is completely undocumented.
If I don't set the _socket parameter, SRF will automatically just pick the first socket in the sockets collection, which can (and will in most cases), belong to a completely unrelated SRF session.
The text was updated successfully, but these errors were encountered: