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';
}
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;
}
}