[Home]

Summary:ASTERISK-14866: Variables set inside a macro lose their value after dial
Reporter:Private Name (falves11)Labels:
Date Opened:2009-09-22 17:10:00Date Closed:2009-09-22 17:34:55
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:[inbound]                                                                                                                                              
exten => _X.,1,Dial(Sip/${EXTEN}@X.X.X.X,25,M(get-callid)L(1800000))                                                                                
exten => h,1,Verbose(0,${Billx})                                                                                                                      
                                                                                                                                                     
[macro-get-callid]                                                                                                                                    
exten => s,1,Set(Billx=1)        

please note that this variations are equally ineffective:
exten => s,1,Set(_Billx=1)
or
exten => s,1,Set(__Billx=1)
Comments:By: Tilghman Lesher (tilghman) 2009-09-22 17:34:55

No, they don't.  Values set inside a Macro in the Dial are set on the CALLED channel, not the CALLING channel.  After the Dial, you are accessing the CALLING channel's variables, which is why the variables you set on the CALLED channel aren't there.