diff --git a/apps/app_dial.c b/apps/app_dial.c index 92000abdef7931b8d583616d89829e4d12da0b3d..7ab2b84a1851fa192ccc29efa0f1810f212de245 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -724,6 +724,8 @@ static void senddialendevent(const struct ast_channel *src, const char *dialstat * * XXX this code is highly suspicious, as it essentially overwrites * the outgoing channel without properly deleting it. + * + * \todo eventually this function should be intergrated into and replaced by ast_call_forward() */ static void do_forward(struct chanlist *o, struct cause_args *num, struct ast_flags64 *peerflags, int single, int *to) diff --git a/apps/app_queue.c b/apps/app_queue.c index 3d367f6630a6ebe4b3e989e20d824cba77ec325a..65b2970520ad1defeaa8d4928cec49cd182c81c5 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3001,6 +3001,8 @@ static void rna(int rnatime, struct queue_ent *qe, char *interface, char *member * \param[in] prebusies number of busy members calculated prior to calling wait_for_answer * \param[in] caller_disconnect if the 'H' option is used when calling Queue(), this is used to detect if the caller pressed * to disconnect the call * \param[in] forwardsallowed used to detect if we should allow call forwarding, based on the 'i' option to Queue() + * + * \todo eventually all call forward logic should be intergerated into and replaced by ast_call_forward() */ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callattempt *outgoing, int *to, char *digit, int prebusies, int caller_disconnect, int forwardsallowed, int update_connectedline) { diff --git a/main/channel.c b/main/channel.c index 9fc89255a5264ba3b825cda47d986ddca6d035bd..3dcd380fa00f5328a33da7969615932276a0391b 100644 --- a/main/channel.c +++ b/main/channel.c @@ -4001,6 +4001,7 @@ struct ast_channel *ast_call_forward(struct ast_channel *caller, struct ast_chan while (ast_channel_trylock(new)) { CHANNEL_DEADLOCK_AVOIDANCE(orig); } + ast_copy_flags(new->cdr, orig->cdr, AST_CDR_FLAG_ORIGINATED); ast_string_field_set(new, accountcode, orig->accountcode); ast_party_caller_copy(&new->cid, &orig->cid); ast_party_connected_line_copy(&new->connected, &orig->connected);