[asterisk-bugs] [Asterisk 0011340]: [patch] Allow channel unique IDs when searching for channels by name

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Dec 17 11:46:39 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11340 
====================================================================== 
Reported By:                michael-fig
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11340
Category:                   Core/NewFeature
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:            1.4.13  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             11-21-2007 14:08 CST
Last Modified:              12-17-2007 11:46 CST
====================================================================== 
Summary:                    [patch] Allow channel unique IDs when searching for
channels by name
Description: 
This patch allows the use of UniqueIDs in applications and the manager API
anytime a channel name would be specified.
====================================================================== 

---------------------------------------------------------------------- 
 michael-fig - 12-17-07 11:46  
---------------------------------------------------------------------- 
I was trying to use the rename event, which is how I found this race
condition. 

Basically, very shortly after a connect, I'm trying to do a
ChannelRedirect.  If I get the channel before or after its masquerading
happens, everything is fine.  If I follow the rename events, then it
sometimes fails.

This is because there is a race between the manager actually receiving the
rename events and sending the ChannelRedirect, and the masquerading code
continuing to rename the channel.  By the time Asterisk receives the
ChannelRedirect, the masquerading code has further renamed the channel, and
the channel in the ChannelRedirect doesn't exist.

I have to use a ChannelRedirect (and not some dialplan code) because only
the manager knows where to redirect the channel.

Does this make more sense now? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-17-07 11:46  michael-fig    Note Added: 0075577                          
======================================================================




More information about the asterisk-bugs mailing list