[svn-commits] mmichelson: trunk r368500 - in /trunk: ./ channels/chan_sip.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Jun 4 17:12:24 CDT 2012
Author: mmichelson
Date: Mon Jun 4 17:12:19 2012
New Revision: 368500
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=368500
Log:
Relay proper SIP responses on calling side.
Revision 351130 broke corect HANGUPCAUSE setting
for the 404 case in chan_sip. Other cases were also
potentially broken. This patch fixes the relaying
of causes to be what they used to be.
(closes issue ASTERISK-19914)
Reported by Pavel Troller
Tested by Walter Doekes (via a reviewboard test to be committed later)
Patches:
chan_sip.diff uploaded by Pavel Troller (license #6302)
........
Merged revisions 368498 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 368499 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=368500&r1=368499&r2=368500
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jun 4 17:12:19 2012
@@ -21340,7 +21340,7 @@
ast_log(LOG_WARNING, "Received response: \"Forbidden\" from '%s'\n", sip_get_header(&p->initreq, "From"));
if (!req->ignore && p->owner) {
ast_set_hangupsource(p->owner, ast_channel_name(p->owner), 0);
- ast_queue_hangup_with_cause(p->owner, AST_CAUSE_CONGESTION);
+ ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
}
break;
@@ -21348,7 +21348,7 @@
xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
if (p->owner && !req->ignore) {
ast_set_hangupsource(p->owner, ast_channel_name(p->owner), 0);
- ast_queue_hangup_with_cause(p->owner, AST_CAUSE_CONGESTION);
+ ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
}
break;
@@ -21358,7 +21358,7 @@
ast_log(LOG_WARNING, "Re-invite to non-existing call leg on other UA. SIP dialog '%s'. Giving up.\n", p->callid);
xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
if (p->owner) {
- ast_queue_hangup_with_cause(p->owner, AST_CAUSE_CONGESTION);
+ ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
}
break;
@@ -21373,7 +21373,7 @@
append_history(p, "Identity", "SIP identity is required. Not supported by Asterisk.");
ast_log(LOG_WARNING, "SIP identity required by proxy. SIP dialog '%s'. Giving up.\n", p->callid);
if (p->owner && !req->ignore) {
- ast_queue_hangup_with_cause(p->owner, AST_CAUSE_CONGESTION);
+ ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
}
break;
@@ -21407,7 +21407,7 @@
} else {
/* We can't set up this call, so give up */
if (p->owner && !req->ignore) {
- ast_queue_hangup_with_cause(p->owner, AST_CAUSE_CONGESTION);
+ ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
}
}
break;
@@ -21415,7 +21415,7 @@
xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
if (p->owner && !req->ignore) {
if (ast_channel_state(p->owner) != AST_STATE_UP) {
- ast_queue_hangup_with_cause(p->owner, AST_CAUSE_CONGESTION);
+ ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
} else {
/* This is a re-invite that failed. */
/* Reset the flag after a while
@@ -21439,7 +21439,7 @@
case 501: /* Not implemented */
xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
if (p->owner) {
- ast_queue_hangup_with_cause(p->owner, AST_CAUSE_CONGESTION);
+ ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
}
break;
}
@@ -22363,7 +22363,7 @@
default:
/* Send hangup */
if (owner && sipmethod != SIP_BYE)
- ast_queue_hangup_with_cause(p->owner, AST_CAUSE_PROTOCOL_ERROR);
+ ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
break;
}
/* ACK on invite */
More information about the svn-commits
mailing list