diff --git a/channels/chan_sip.c b/channels/chan_sip.c index baafe68753..6f1b5bd5af 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -18766,10 +18766,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int char *uri = ast_strdupa(this_rlPart2); char *at = strchr(uri, '@'); char *peerorhost; - struct sip_pkt *pkt = NULL; - if (option_debug > 2) { - ast_log(LOG_DEBUG, "Potential spiral detected. Original RURI was %s, new RURI is %s\n", initial_rlPart2, this_rlPart2); - } + ast_debug(2, "Potential spiral detected. Original RURI was %s, new RURI is %s\n", initial_rlPart2, this_rlPart2); if (at) { *at = '\0'; } @@ -18777,14 +18774,12 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int if ((peerorhost = strchr(uri, ':'))) { *peerorhost++ = '\0'; } - create_addr(p, peerorhost, NULL, 0); ast_string_field_set(p, theirtag, NULL); - for (pkt = p->packets; pkt; pkt = pkt->next) { - if (pkt->seqno == p->icseq && pkt->method == SIP_INVITE) { - AST_SCHED_DEL(sched, pkt->retransid); - } - } - return transmit_invite(p, SIP_INVITE, 1, 3); + /* Treat this as if there were a call forward instead... + */ + ast_string_field_set(p->owner, call_forward, peerorhost); + ast_queue_control(p->owner, AST_CONTROL_BUSY); + return 0; } }