rendered paste body--- old/pbx/pbx_spool.c 2007-05-13 21:54:33.000000000 +0200+++ new/pbx/pbx_spool.c 2007-05-13 21:54:45.000000000 +0200@@ -255,6 +255,8 @@ static void *attempt_thread(void *data) { struct outgoing *o = (struct outgoing *) data;+ struct opbx_variable *var, s_retries[10];+ int res, reason; if (!opbx_strlen_zero(o->app)) { if (option_verbose > 2)@@ -263,6 +265,13 @@ } else { if (option_verbose > 2) opbx_verbose(VERBOSE_PREFIX_3 "Attempting call on %s/%s for %s@%s:%d (Retry %d)\n", o->tech, o->dest, o->exten, o->context,o->priority, o->retries);+ /* Add number of RETRYes on the context */+ snprintf (s_retries, 10, "%d", o->retries);+ var = opbx_variable_new("RETRYTIME", s_retries);+ if (var) {+ var->next = o->vars;+ o->vars = var;+ } res = opbx_pbx_outgoing_exten(o->tech, OPBX_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->context, o->exten, o->priority, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, NULL); } if (res) {