Skip to content

Commit

Permalink
Reject attempts to start SIP calls with datachannels (fixes meetecho#581
Browse files Browse the repository at this point in the history
)
  • Loading branch information
lminiero committed Jul 26, 2016
1 parent ec18139 commit 1aee055
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions html/siptest.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ $(document).ready(function() {
$('#password').removeAttr('disabled');
$('#register').removeAttr('disabled').click(registerUsername);
$('#registerset').removeAttr('disabled');
} else {
// Reset status
sipcall.hangup();
$('#dovideo').removeAttr('disabled').val('');
$('#peer').removeAttr('disabled').val('');
$('#call').removeAttr('disabled').html('Call')
.removeClass("btn-danger").addClass("btn-success")
.unbind('click').click(doCall);
}
bootbox.alert(error);
return;
Expand Down
6 changes: 6 additions & 0 deletions plugins/janus_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,12 @@ static void *janus_sip_handler(void *data) {
g_snprintf(error_cause, 512, "Missing SDP");
goto error;
}
if(strstr(msg->sdp, "m=application")) {
JANUS_LOG(LOG_ERR, "The SIP plugin does not support DataChannels\n");
error_code = JANUS_SIP_ERROR_MISSING_SDP;
g_snprintf(error_cause, 512, "The SIP plugin does not support DataChannels");
goto error;
}
JANUS_LOG(LOG_VERB, "%s is calling %s\n", session->account.username, uri_text);
JANUS_LOG(LOG_VERB, "This is involving a negotiation (%s) as well:\n%s\n", msg->sdp_type, msg->sdp);
/* Clean up SRTP stuff from before first, in case it's still needed */
Expand Down

0 comments on commit 1aee055

Please sign in to comment.