Index: b/channels/chan_sip.c
===================================================================
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -29238,6 +29238,7 @@ static int handle_incoming(struct sip_pv
 			} else if (req->method != SIP_ACK) {
 				transmit_response(p, "500 Server error", req);	/* We must respond according to RFC 3261 sec 12.2 */
 			}
+			p->method = oldmethod;
 			return -1;
 		}
 	} else if (p->icseq &&
