[asterisk-commits] mjordan: branch 13 r426602 - in /branches/13: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Oct 29 20:59:06 CDT 2014
Author: mjordan
Date: Wed Oct 29 20:59:02 2014
New Revision: 426602
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=426602
Log:
channels/chan_sip: Add improved support for 4xx error codes
This patch adds support for 414, 493, 479, and a stray 400 response in REGISTER
response handling. This helps interoperability in a number of scenarios.
Review: https://reviewboard.asterisk.org/r/3437
patches:
rb3437.patch uploaded by oej (License 5267)
........
Merged revisions 426599 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 426600 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 426601 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
branches/13/ (props changed)
branches/13/channels/chan_sip.c
Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: branches/13/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/channels/chan_sip.c?view=diff&rev=426602&r1=426601&r2=426602
==============================================================================
--- branches/13/channels/chan_sip.c (original)
+++ branches/13/channels/chan_sip.c Wed Oct 29 20:59:02 2014
@@ -23215,6 +23215,8 @@
}
break;
+ case 414: /* Bad request URI */
+ case 493: /* Undecipherable */
case 404: /* Not found */
xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
if (p->owner && !req->ignore) {
@@ -23468,12 +23470,16 @@
ao2_t_ref(p->mwi, -1, "received 481 response");
pvt_set_needdestroy(p, "received 481 response");
break;
+
+ case 400: /* Bad Request */
+ case 414: /* Request URI too long */
+ case 493: /* Undecipherable */
case 500:
case 501:
ast_log(LOG_WARNING, "Subscription failed for MWI. The remote side may have suffered a heart attack.\n");
p->mwi->call = NULL;
ao2_t_ref(p->mwi, -1, "received 500/501 response");
- pvt_set_needdestroy(p, "received 500/501 response");
+ pvt_set_needdestroy(p, "received serious error (500/501/493/414/400) response");
break;
}
}
@@ -23649,11 +23655,14 @@
}
sip_publish_registry(r->username, r->hostname, regstate2str(r->regstate));
break;
- case 479: /* SER: Not able to process the URI - address is wrong in register*/
- ast_log(LOG_WARNING, "Got error 479 on register to %s@%s, giving up (check config)\n", p->registry->username, p->registry->hostname);
- pvt_set_needdestroy(p, "received 479 response");
+ case 400: /* Bad request */
+ case 414: /* Request URI too long */
+ case 493: /* Undecipherable */
+ case 479: /* Kamailio/OpenSIPS: Not able to process the URI - address is wrong in register*/
+ ast_log(LOG_WARNING, "Got error %d on register to %s@%s, giving up (check config)\n", resp, p->registry->username, p->registry->hostname);
+ pvt_set_needdestroy(p, "received 4xx response");
if (r->call)
- r->call = dialog_unref(r->call, "unsetting registry->call pointer-- case 479");
+ r->call = dialog_unref(r->call, "unsetting registry->call pointer-- case 4xx");
r->regstate = REG_STATE_REJECTED;
sip_publish_registry(r->username, r->hostname, regstate2str(r->regstate));
AST_SCHED_DEL_UNREF(sched, r->timeout, ao2_t_ref(r, -1, "reg ptr unref from handle_response_register 479"));
@@ -24127,6 +24136,9 @@
pvt_set_needdestroy(p, "received 403 response");
}
break;
+ case 400: /* Bad Request */
+ case 414: /* Request URI too long */
+ case 493: /* Undecipherable */
case 404: /* Not found */
if (p->registry && sipmethod == SIP_REGISTER)
handle_response_register(p, resp, rest, req, seqno);
More information about the asterisk-commits
mailing list