Treat 405 responses the same way we would a 501.

This makes sure that we mark a method as being unallowed if we
receive a 405 response so that we don't continue to try to 
send that same type of message.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
certified/1.8.6
Mark Michelson 16 years ago
parent 71a3a2ebf6
commit 3eab939301

@ -17808,6 +17808,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest
} }
break; break;
case 405: /* Not allowed */
case 501: /* Not implemented */ case 501: /* Not implemented */
xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE); xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
if (p->owner) if (p->owner)
@ -17972,6 +17973,18 @@ static void handle_response_refer(struct sip_pvt *p, int resp, const char *rest,
pvt_set_needdestroy(p, "failed to authenticate REFER"); pvt_set_needdestroy(p, "failed to authenticate REFER");
} }
break; break;
case 405: /* Method not allowed */
/* Return to the current call onhold */
/* Status flag needed to be reset */
ast_log(LOG_NOTICE, "SIP transfer to %s failed, REFER not allowed. \n", p->refer->refer_to);
pvt_set_needdestroy(p, "received 405 response");
p->refer->status = REFER_FAILED;
if (p->owner) {
ast_queue_control_data(p->owner, AST_CONTROL_TRANSFER, &message, sizeof(message));
}
break;
case 481: /* Call leg does not exist */ case 481: /* Call leg does not exist */
/* A transfer with Replaces did not work */ /* A transfer with Replaces did not work */
@ -18444,6 +18457,7 @@ static void handle_response(struct sip_pvt *p, int resp, const char *rest, struc
pvt_set_needdestroy(p, "received 491 response"); pvt_set_needdestroy(p, "received 491 response");
} }
break; break;
case 405:
case 501: /* Not Implemented */ case 501: /* Not Implemented */
mark_method_unallowed(&p->allowed_methods, sipmethod); mark_method_unallowed(&p->allowed_methods, sipmethod);
if ((peer = find_peer(p->peername, 0, 1, FINDPEERS, FALSE))) { if ((peer = find_peer(p->peername, 0, 1, FINDPEERS, FALSE))) {

Loading…
Cancel
Save