[Asterisk-code-review] chan sip: fix Reason-Phrase for 603 Response (asterisk[13])
Frederic LE FOLL
asteriskteam at digium.com
Tue Nov 6 03:11:41 CST 2018
Frederic LE FOLL has uploaded this change for review. ( https://gerrit.asterisk.org/10588
Change subject: chan_sip: fix Reason-Phrase for 603 Response
......................................................................
chan_sip: fix Reason-Phrase for 603 Response
While RFC3261 specifies defaut Reason-Pḧrase "Decline" for Response 603
(see https://tools.ietf.org/html/rfc3261#section-21.6.2 "603 Decline"),
chan_sip generates "603 Declined".
Since RFC3261 says "603 Decline", I suggest than chan_sip uses
"603 Decline" instead of "603 Declined".
ASTERISK-28153
Change-Id: I4f94ae98f1cf4302fbad9895cad96eeab8c53269
---
M channels/chan_sip.c
1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/88/10588/1
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 97ce93c..5be6953 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7185,7 +7185,7 @@
get an answer to the BYE or INVITE/CANCEL
If we get no answer during retransmit period, drop the call anyway.
(Sorry, mother-in-law, you can't deny a hangup by sending
- 603 declined to BYE...)
+ 603 decline to BYE...)
*/
if (p->alreadygone)
needdestroy = 1; /* Set destroy flag at end of this function */
@@ -7224,7 +7224,7 @@
if (p->hangupcause && (res = hangup_cause2sip(p->hangupcause)))
transmit_response_reliable(p, res, &p->initreq);
else
- transmit_response_reliable(p, "603 Declined", &p->initreq);
+ transmit_response_reliable(p, "603 Decline", &p->initreq);
p->invitestate = INV_TERMINATED;
}
} else { /* Call is in UP state, send BYE */
@@ -25439,7 +25439,7 @@
if the reference was successful, the body:
SIP/2.0 503 Service Unavailable
if the reference failed, or the body:
- SIP/2.0 603 Declined
+ SIP/2.0 603 Decline
if the REFER request was accepted before approval to follow the
reference could be obtained and that approval was subsequently denied
@@ -26252,7 +26252,7 @@
ast_channel_state(replaces_chan) != AST_STATE_RING &&
ast_channel_state(replaces_chan) != AST_STATE_UP) {
ast_log(LOG_NOTICE, "Supervised transfer attempted to replace non-ringing or active call id (%s)!\n", replace_id);
- transmit_response_reliable(p, "603 Declined (Replaces)", req);
+ transmit_response_reliable(p, "603 Decline (Replaces)", req);
error = 1;
}
@@ -26996,7 +26996,7 @@
/* This is a REFER outside of an existing SIP dialog */
/* We can't handle that, so decline it */
ast_debug(3, "Call %s: Declined REFER, outside of dialog...\n", p->callid);
- transmit_response(p, "603 Declined (No dialog)", req);
+ transmit_response(p, "603 Decline (No dialog)", req);
if (!req->ignore) {
append_history(p, "Xfer", "Refer failed. Outside of dialog.");
sip_alreadygone(p);
@@ -27008,7 +27008,7 @@
/* Check if transfer is allowed from this device */
if (p->allowtransfer == TRANSFER_CLOSED ) {
/* Transfer not allowed, decline */
- transmit_response(p, "603 Declined (policy)", req);
+ transmit_response(p, "603 Decline (policy)", req);
append_history(p, "Xfer", "Refer failed. Allowtransfer == closed.");
/* Do not destroy SIP session */
return 0;
@@ -27042,7 +27042,7 @@
}
break;
case -3:
- transmit_response(p, "603 Declined (Non sip: uri)", req);
+ transmit_response(p, "603 Decline (Non sip: uri)", req);
append_history(p, "Xfer", "Refer failed. Non SIP uri");
if (req->debug) {
ast_debug(1, "SIP transfer to non-SIP uri denied\n");
--
To view, visit https://gerrit.asterisk.org/10588
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f94ae98f1cf4302fbad9895cad96eeab8c53269
Gerrit-Change-Number: 10588
Gerrit-PatchSet: 1
Gerrit-Owner: Frederic LE FOLL <frederic.lefoll at c-s.fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181106/896d1eaa/attachment-0001.html>
More information about the asterisk-code-review
mailing list