-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
Take the reason phrase corresponding with the cause code if none is given as parameter. If non is given as parameter and no corresponding reason phrase exist, take ' ' (double space) as reason phrase. - Yes, more than one server will complain. Let's see.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,14 +167,14 @@ JsSIP.Message.prototype.init_incoming = function(request) { | |
this.remote_identity = request.s('from').uri; | ||
|
||
this.accept = function() { | ||
request.reply(200, JsSIP.c.REASON_200); | ||
request.reply(200); | ||
}; | ||
|
||
this.reject = function(status_code, reason_phrase) { | ||
if (status_code && reason_phrase) { | ||
request.reply(status_code, reason_phrase); | ||
} else { | ||
request.reply(480, JsSIP.c.REASON_480); | ||
request.reply(480); | ||
} | ||
}; | ||
|
||
|
@@ -188,9 +188,9 @@ JsSIP.Message.prototype.init_incoming = function(request) { | |
transaction = this.ua.transactions.nist[request.via_branch]; | ||
|
||
if (transaction && (transaction.state === JsSIP.c.TRANSACTION_TRYING || transaction.state === JsSIP.c.TRANSACTION_PROCEEDING)) { | ||
request.reply(200, JsSIP.c.REASON_200); | ||
request.reply(200); | ||
} | ||
} else { | ||
request.reply(415, JsSIP.c.REASON_415, ["Accept: text/plain, text/html"]); | ||
request.reply(415, JsSIP.c.REASON_PHRASE[415], ["Accept: text/plain, text/html"]); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jmillan
Author
Member
|
||
} | ||
}; |
2 comments
on commit 35e5874
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not simply add "Unknown" and avoid possible problems? This is asking for trouble.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, and that's bad. I should be free to respond with a two spaced reason phrase.
I got carried away by the moment :-)
Is it valid this?: