versatica/JsSIP — pull request #242 by jlaine (2014-09-10 13:28:44+00:00)
Title: fix createAnswer / createOffer when ICE state is 'completed'

RTCMediaHandler's createAnswer and createOffer methods never invoke the
success callback if the ICE state is 'completed'. This happens because the
onSetLocalDescriptionSuccess callbacks check whether the ICE state is
'connected' instead of 'connected' or 'completed'. As a consequence of this,
hold and unhold no longer works once ICE reaches the 'completed' state.

This change fixes the ICE state test to allow both 'connected' and 'completed'.