[asterisk-dev] ast_channel_masquerade in a queue consultation

Daniel Montejo montejodaniel at hotmail.com
Tue Sep 12 08:26:32 MST 2006


Hello,

In http://ftp.digium.com/pub/asterisk/releases/ChangeLog-1.2.10 i see: 
 
"2006-07-10 21:01 +0000 [r37361]  Kevin P. Fleming <kpfleming at digium.com>
 
        * channel.c: do masquerade-behind-proxy checking with better
          control over locks".
 
I suppose that the code for that correction is:
 
"
        /* each of these channels may be sitting behind a channel proxy
(i.e. chan_agent)
           and if so, we don't really want to masquerade it, but its proxy
*/
        if (original->_bridge && (original->_bridge !=
ast_bridged_channel(original)))
               final_orig = original->_bridge;
 
        if (clone->_bridge && (clone->_bridge !=
ast_bridged_channel(clone)))
               final_clone = clone->_bridge;
 
        if ((final_orig != original) || (final_clone != clone)) {
               ast_mutex_lock(&final_orig->lock);
               while(ast_mutex_trylock(&final_clone->lock)) {
                       ast_mutex_unlock(&final_orig->lock);
                       usleep(1);
                       ast_mutex_lock(&final_orig->lock);
               }
               ast_mutex_unlock(&clone->lock);
               ast_mutex_unlock(&original->lock);
               original = final_orig;
               clone = final_clone;
        }

"

 

Could does that code produce the problem?

 

Thank you.

  _____  

De: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com] En nombre de Daniel Montejo
Enviado el: martes, 12 de septiembre de 2006 13:01
Para: asterisk-dev at lists.digium.com
Asunto: [asterisk-dev] ast_channel_masquerade in a queue consultation

 

Hello,

With asterisk 1.2.12 i need restart asterisk to free channels. This isn't
happen with 1.2.7.1. The scenario is:

-          Sip1 has a call with Sip2.

-          Sip1 make a consultation call to queue1 with originate action.

-          The call is delivered to sip3 (agent3 logged in queue1).

-          Sip1 try reconnect Sip2 (using ast_channel_masquerade).

-          KO: The call is transferred to Sip3. With version 1.2.7.1 the
call is reconnected.

-          After this, some channels (agent and sip) are locked (show
channels).

 

Why the ast_channel_masquerade transfer the call in 1.2.12 version? Why the
channels are locked after that?

 

Thank you!!!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20060912/a1d02813/attachment-0001.htm


More information about the asterisk-dev mailing list