-
Notifications
You must be signed in to change notification settings - Fork 6
Description
I am able to use my own jingle-session
subclass to establish a WebRTC connection between two web pages using stanza.io for signaling. It works fine in the absence of errors and I'm now trying to ensure it behaves properly when errors are present.
In the case where the receiving side declines to make the connection (using session.decline()
), things work fine - I catch that with a terminated
event on the initiating jingle-session. But in the case where the receiving side drops its connection and is unavailable, the XMPP server replies to the jingle session-initiate
iq with an error, e.g.:
<body xmlns='http://jabber.org/protocol/httpbind' ack='4625416880'>
<iq type="error" id="abfd3d62-1036-4ede-bd89-a0f2c5c118d0" from="receiver@server/resource" to="initiator@server/resource" xmlns="jabber:client">
[copy of original jingle request omitted]
<error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error>
</iq>
</body>
I don't see a way at the jingle-session
level to detect that. Does one exist?
At the moment I am detecting failed connections using a timeout, but this occurs much later than the failure actually occurs. I could parse the XML traffic but that is pretty tedious. I'm hoping there is some other mechanism I have overlooked.