Index: channels/sig_pri.c =================================================================== --- channels/sig_pri.c (revision 241415) +++ channels/sig_pri.c (working copy) @@ -2515,7 +2515,6 @@ sig_pri_handle_subcmds(pri, chanpos, e->e, e->ring.channel, e->ring.subcmds, e->ring.call); - ast_cdr_update(c); } if (c && !ast_pthread_create_detached(&threadid, NULL, pri_ss_thread, pri->pvts[chanpos])) { ast_verb(3, "Accepting overlap call from '%s' to '%s' on channel %d/%d, span %d\n", @@ -2618,7 +2617,6 @@ sig_pri_handle_subcmds(pri, chanpos, e->e, e->ring.channel, e->ring.subcmds, e->ring.call); - ast_cdr_update(c); } if (c && !ast_pbx_start(c)) { ast_verb(3, "Accepting call from '%s' to '%s' on channel %d/%d, span %d\n", Index: main/pbx.c =================================================================== --- main/pbx.c (revision 241415) +++ main/pbx.c (working copy) @@ -4628,6 +4628,10 @@ ast_copy_string(c->context, "default", sizeof(c->context)); } } + if (c->cdr) { + /* allow CDR variables that have been collected after channel was created to be visible during call */ + ast_cdr_update(c); + } for (;;) { char dst_exten[256]; /* buffer to accumulate digits */ int pos = 0; /* XXX should check bounds */