[asterisk-users] Channel variables "materializing" ...

Julian Lyndon-Smith asterisk at dotr.com
Tue Sep 30 11:50:07 CDT 2008


Hi Brent,

comments inline:

Brent Davidson wrote:
> Julian Lyndon-Smith wrote:
>   
>> I am trying to track a strange bug down, and need to ask a really stupid 
>> question, just so I can eliminate the possibility ..
>>
>> When a SIP channel is hung up, I import a variable called "MEETMEROOM" 
>> from the BRIDGEPEER channel, and if it is set, jump to another part of 
>> the dialplan.
>>
>> [snip]
>> exten => h,1,ImportVar(PARKED=${BRIDGEPEER},MEETMEROOM)
>> exten => h,n,GotoIf($["${PARKED}" != ""]?end)
>> exten => h,n,goto(DialStatus,${DIALSTATUS},1)
>> exten => h,n(end),NoOp()
>> [snip]
>>
>> There have been several occasions over the past couple of days where 
>> this variable has not executed the goto, and gone to the (end) label 
>> when I know for certain that the BRIDGEPEER channel does not have the 
>> variable set (I was able to duplicate the error once during a test phase 
>> when I was not setting the MEETMEROOM variable at all)
>>
>> so, to the stupid question: If at some stage the BRIDGEPEER channel 
>> *has* had the MEETMEROOM variable declared, are there any circumstances 
>> at all where this variable may be transmitted to the next call that uses 
>> this channel.
>>
>> There, I asked it. I don't believe that I just did. But there you have 
>> it. It's out in the open now ...
>>
>> The only other thing that I was thinking of - if the PARKED variable was 
>> already set on the SIP channel, would an import of a non-existant 
>> variable from the BRIDGEPEER channel overwrite it, or keep it at the 
>> previous value ? Hmmm. Time to experiment.
>>
>> Julian.
>>
>> ______________________________________________________________________
>>   
>>     
> This may be a long shot but would it not be better to check to see 
> whether or not the MEETMEROOM variable is defined before assigning it's 
> value to another variable?  With just a cursory glance through the 
>   

I am importing it from another channel, so I don't know if it has been 
defined or not. That's the problem :)
> asterisk documentation I have available I don't see any indication of 
> how asterisk variables behave if they are undefined. 
>
> The other possibility I was considering is maybe BRIDGEPEER is not 
> always being set to the correct channel?
>   
Yeah, the thought had crossed my mind as well. Does anyone know of any 
circumstances where this might happen ?
> Good luck,
>   

heh. Thanks !

Julian
> -Brent
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>   


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the asterisk-users mailing list