<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EstiloCorreo17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EstiloCorreo18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:468742542;
        mso-list-type:hybrid;
        mso-list-template-ids:-501811384 421302192 201981955 201981957 201981953 201981955 201981957 201981953 201981955 201981957;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:21.0pt;
        mso-level-number-position:left;
        margin-left:21.0pt;
        text-indent:-18.0pt;
        font-family:Arial;
        mso-fareast-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
</head>
<body lang=ES link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Hello,<o:p></o:p></span></font></p>
<pre><font size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;
font-family:Arial;color:navy'>In <a
href="http://ftp.digium.com/pub/asterisk/releases/ChangeLog-1.2.10">http://ftp.digium.com/pub/asterisk/releases/ChangeLog-1.2.10</a> i see: <o:p></o:p></span></font></pre><pre><font
size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;
font-family:Arial;color:navy'><o:p> </o:p></span></font></pre><pre><font
size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;
font-family:Arial;color:navy'>“</span></font><span lang=EN-GB>2006-07-10 21:01 +0000 [r37361] Kevin P. Fleming <kpfleming@digium.com><o:p></o:p></span></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> * channel.c: do masquerade-behind-proxy checking with better<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> </span>control over locks”.<o:p></o:p></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'>I suppose that the code for that correction is:<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'>“<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> /* each of these channels may be sitting behind a channel proxy (i.e. chan_agent)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> and if so, we don't really want to masquerade it, but its proxy */<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> if (original->_bridge && (original->_bridge != ast_bridged_channel(original)))<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> final_orig = original->_bridge;<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> if (clone->_bridge && (clone->_bridge != ast_bridged_channel(clone)))<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> final_clone = clone->_bridge;<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> if ((final_orig != original) || (final_clone != clone)) {<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> ast_mutex_lock(&final_orig->lock);<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> while(ast_mutex_trylock(&final_clone->lock)) {<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> ast_mutex_unlock(&final_orig->lock);<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> usleep(1);<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> ast_mutex_lock(&final_orig->lock);<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> }<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> ast_mutex_unlock(&clone->lock);<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> ast_mutex_unlock(&original->lock);<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> original = final_orig;<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> clone = final_clone;<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt'> }<o:p></o:p></span></font></pre>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>“<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Could does that code produce
the problem?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Thank you.<o:p></o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>De:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
asterisk-dev-bounces@lists.digium.com
[mailto:asterisk-dev-bounces@lists.digium.com] <b><span style='font-weight:
bold'>En nombre de </span></b>Daniel Montejo<br>
<b><span style='font-weight:bold'>Enviado el:</span></b> martes, 12 de
septiembre de 2006 13:01<br>
<b><span style='font-weight:bold'>Para:</span></b>
asterisk-dev@lists.digium.com<br>
<b><span style='font-weight:bold'>Asunto:</span></b> [asterisk-dev]
ast_channel_masquerade in a queue consultation</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Hello,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>With asterisk 1.2.12 i need restart asterisk to free
channels. This isn’t happen with 1.2.7.1. The scenario is:<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'><span
style='mso-list:Ignore'>-<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>
</span></font></span></span></font><![endif]><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>Sip1 has a call with
Sip2.<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'><span
style='mso-list:Ignore'>-<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>
</span></font></span></span></font><![endif]><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>Sip1 make a consultation
call to queue1 with originate action.<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'><span
style='mso-list:Ignore'>-<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>
</span></font></span></span></font><![endif]><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>The call is delivered to sip3
(agent3 logged in queue1).<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'><span
style='mso-list:Ignore'>-<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>
</span></font></span></span></font><![endif]><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>Sip1 try reconnect Sip2
(using ast_channel_masquerade).<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'><span
style='mso-list:Ignore'>-<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>
</span></font></span></span></font><![endif]><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>KO: The call is
transferred to Sip3. With version 1.2.7.1 the call is reconnected.<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'><span
style='mso-list:Ignore'>-<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>
</span></font></span></span></font><![endif]><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>After this, some channels
(agent and sip) are locked (show channels).<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Why the ast_channel_masquerade transfer the call in
1.2.12 version? Why the channels are locked after that?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Thank you!!!<o:p></o:p></span></font></p>
</div>
</body>
</html>