Summary:ASTERISK-05802: variables problem call_forward
Reporter:cherso (cherso)Labels:
Date Opened:2005-12-08 07:10:17.000-0600Date Closed:2011-06-07 14:03:19
Versions:Frequency of
Description:Something strange with var inheritance, in 1.2, 1.2.1, HEAD

The same dialplan
with "set debug 0" does not work
with "set debug 1" does work :-)

removing the option_debug from line 1666 (pbx.c) the problem is gone. The trick is to force the pbx_builtin_setvar_helper function. So it could be a major channel var problem

// if (option_debug) {
ast_log(LOG_DEBUG, "Launching '%s'\n", app->name);
snprintf(atmp, 80, "STACK-%s-%s-%d", context, exten, priority);
snprintf(atmp2, EXT_DATA_SIZE+100, "%s(\"%s\", \"%s\") %s", app->name, c->name, (!ast_strlen_zero(passdata) ? (char *)passdata : ""), (newstack ? "in new stack" : "in same stack"));
pbx_builtin_setvar_helper(c, atmp, atmp2);
// }

****** STEPS TO REPRODUCE ******

79701 is call forwarded to 9901
Call extension 100@sip, after the Answer command, ARG1 and ARG2 are not availables

; ARG1=mailbox ARG2=timeout
exten => s,1,NoOp(Before Answer: Voicemail=${ARG1}, timeout=${ARG2})
exten => s,2,Wait(${ARG2})
exten => s,3,Answer()
exten => s,4,NoOp(After Answer: Voicemail=${ARG1}, timeout=${ARG2})
exten => s,5,Wait(1)
exten => s,6,Playback(vm/${ARG1}/greet)
exten => s,7,NoOp(After Playback: Voicemail=${ARG1}, timeout=${ARG2})
exten => s,8,Hangup()

exten => 1,1,Dial(SIP/79701,120)
exten => 1,2,Hangup

exten => 2,1,Wait(10)
exten => 2,2,Dial(SIP/79702,120)
exten => 2,3,Hangup

exten => 100,1,Dial(Local/1@internal&Local/2@internal,120)
exten => 100,2,Hangup()

exten => _99XX,1,macro(vcm,${EXTEN},10)
exten => _99XX,2,Hangup()
Comments:By: Kevin P. Fleming (kpfleming) 2005-12-12 22:43:58.000-0600

Without a console trace showing what your problem actually is, we can't begin to decide whether what you asked us to change makes any sense.

The variable being set in that code is a debugging-only variable; it will have no effect on the operation of Asterisk.

By: Mark Spencer (markster) 2005-12-20 03:08:15.000-0600

Can you provide any additional explanation of the problem, what the symptom is, etc?  Can you provide console information?

By: Mark Spencer (markster) 2005-12-25 17:49:18.000-0600

Suspending due to lack of response from bug poster.