File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,15 @@ JsSIP.sanityCheck = (function() {
101
101
// Sanity Check functions for responses
102
102
function rfc3261_8_1_3_3 ( ) {
103
103
if ( message . countHeader ( 'via' ) > 1 ) {
104
+ console . warn ( JsSIP . c . LOG_SANITY_CHECK + 'More than one Via header field present in the response. Dropping the response' ) ;
104
105
return false ;
105
106
}
106
107
}
107
108
108
109
function rfc3261_18_1_2 ( ) {
109
110
var via_host = ua . configuration . via_host ;
110
111
if ( message . via . host !== via_host ) {
112
+ console . warn ( JsSIP . c . LOG_SANITY_CHECK + 'Via host in the response does not match UA Via host value. Dropping the response' ) ;
111
113
return false ;
112
114
}
113
115
}
@@ -118,6 +120,7 @@ JsSIP.sanityCheck = (function() {
118
120
contentLength = message . getHeader ( 'content-length' ) ;
119
121
120
122
if ( len < contentLength ) {
123
+ console . warn ( JsSIP . c . LOG_SANITY_CHECK + 'Message body length is lower than the value in Content-Length header field. Dropping the response' ) ;
121
124
return false ;
122
125
}
123
126
}
@@ -130,6 +133,7 @@ JsSIP.sanityCheck = (function() {
130
133
131
134
while ( idx -- ) {
132
135
if ( ! message . hasHeader ( mandatoryHeaders [ idx ] ) ) {
136
+ console . warn ( JsSIP . c . LOG_SANITY_CHECK + 'Missing mandatory header field : ' + mandatoryHeaders [ idx ] + '. Dropping the response' ) ;
133
137
return false ;
134
138
}
135
139
}
You can’t perform that action at this time.
0 commit comments