setRemoteDescription() failed: Failed to set remote answer sdp: The order of m-lines in answer doesn't match order in offer
caller Register > caller Invite > callee answer > caller error 488 > caller hangup
iOS
I try more time for sipjs, jssip, sipm5 and result same error
iosrtc-jssip-error.txt
Please help me !
Hello @hatinfotech
This issue is most likely caused by Unified-Plan that is now the default behavior of iosRTC since 6.0.2.
To confirm this is the issue you can install iosRTC version 6.0.1 to test "Plan-B" by default.
To fix this issue with 6.0.5+ you can force the sdpSemantics of the PeerConnection to plan-b.
Example or RTCPeerConnection config options:
var pc = new RTCPeerConnection({
offerToReceiveVideo: true,
offerToReceiveAudio: true,
//iceTransportPolicy: 'relay',
//sdpSemantics: 'unified-plan',
sdpSemantics: 'plan-b',
bundlePolicy: 'max-compat',
rtcpMuxPolicy: 'negotiate',
iceServers: [
{
url: "stun:stun.stunprotocol.org"
}
]
});
What make me think the issue is "Unified-Plan" is the following recent exchnage on the iosRTC Google Group: https://groups.google.com/forum/#!topic/cordova-plugin-iosrtc/afR1W9_EKfE
More Info about Unified-Plan transition:
Other related issue https://github.com/aws/connect-rtc-js/issues/33#issuecomment-453649692
@hatinfotech Let me know if using Plan-B fix your issue, but on the long run you will need to migrate to Unified-Plan on you SIP Server (FreeSWITCH 1.6+ does support Unfied-Plan to my knowlege).
Hi @hthetiot,
Thanks so must !
Your answer is really helpful.
I try downgrade plug to 6.0.1 and it worked
And iosrtc 6.0.5 worked with sipjs config
session = userAgent.invite("103", {
sessionDescriptionHandlerOptions: {
constraints: {
audio: true,
video: true
}
},
rtcConfiguration: {
sdpSemantics: "plan-b",
bundlePolicy: "max-compat",
rtcpMuxPolicy: "negotiate"
}
});
Thanks and best regards !