diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-03 14:14:13 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-03 14:14:13 +0000 |
commit | cc3ed861e9632e9a3c3b6b22b2f294a0a3a3ef17 (patch) | |
tree | 0e190a9db73160324c24e87cedd94b77ed6f51f3 /channels/chan_sip.c | |
parent | b01d012eb5629ca737c0d63888fb4443bc5b3aaf (diff) |
Merged revisions 160481 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r160481 | tilghman | 2008-12-03 08:11:53 -0600 (Wed, 03 Dec 2008) | 14 lines
Merged revisions 160480 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r160480 | tilghman | 2008-12-03 08:09:35 -0600 (Wed, 03 Dec 2008) | 7 lines
Jon Bonilla (Manwe) pointed out on the -dev list:
"I guess that having only ip-phones in mind is not a good approach. Since it is
possible to have a sip proxy connected to asterisk we could receive a 407
(unauthorized) or 483 (too many hops) as response and dialog ending would not be
a good behavior."
So modified.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@160483 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 10fbcf5ad..2206a741d 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16061,13 +16061,12 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ /* RFC 3261 Section 15 specifies that if we receive a 408 or 481 * in response to a BYE, then we should end the current dialog - * and session. There is no mention in the spec of other 4XX responses, - * but it is known that at least one phone manufacturer potentially - * will send a 404 in response to a BYE, so we'll be liberal in what - * we accept and end the dialog and session if we receive any 4XX - * response to a BYE. + * and session. It is known that at least one phone manufacturer + * potentially will send a 404 in response to a BYE, so we'll be + * liberal in what we accept and end the dialog and session if we + * receive any of those responses to a BYE. */ - if (resp >= 400 && resp < 500 && sipmethod == SIP_BYE) { + if ((resp == 404 || resp == 408 || resp == 481) && sipmethod == SIP_BYE) { p->needdestroy = 1; return; } |