<div>Sounds like a reasonable explanation.</div>
<div>But this means that I should limit the incrementing stuff to one line in the dialplan.</div>
<div> </div>
<div>This would be bad:</div>
<div>exten => s,1,Set(Chan_Var=${GlobalVar})</div>
<div>exten => s,2,Set(Chan_Var=$[${Chan_Var} + 1])</div>
<div>exten => s,3,Set(GlobalVar=Chan_Var,g)</div>
<div> </div>
<div>Better:</div>
<div>exten => s,1,Set(GlobalVar=$[${GlobalVar} + 1])<br>exten => s,2,Set(Chan_Var=${GlobalVar})<br> </div>
<div>Please confirm...</div>
<div> </div>
<div>K</div>
<div> </div>
<div> </div>
<div><span class="gmail_quote">On 5/31/06, <b class="gmail_sendername">Filip Drągowski</b> <<a href="mailto:f.dragowski@ontp.net">f.dragowski@ontp.net</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div text="#000000" bgcolor="#ffffff">Each variable is specyfied by name and callid <br>Call number 1. Executing Set("SIP/X-2749", "DL=0") in new stack<br>Call number 2. Executing Set("SIP/X-9100", "DL=0") in new stack
<br>X - sip provider login and there is -number (i think that this number is in HEX)<br>so every "local" variable have diffrent identity<br><br>As You can see Asterisk uses stack so there should be:<br>1. Executing Set(global_VAR....) in new stack
<br>2. Executing Set(global_VAR....) in new stack<br>No.1 resolves then next ... ther is no simultaneous operation<br>it's my opinion. <br>Try it and see what is shown in * console.<br><br>-FD<br>
<blockquote cite="http://mid2dce5e710605310539y64502a19md8ee8bd77f9fe9bf@mail.gmail.com" type="cite"></blockquote></div>
<div><span class="e" id="q_10b8a83d63e7af83_1">
<div>If I edit the value of a global variable in my dialplan, could there be a risk of collision between calls?</div>
<div> </div>
<div>More in details: could a global var be used to build a counter that will be incremented by every call that passes.</div>
<div>I think when 2 calls come in almost sumiltaneously, they could both be incrementing and saving the same value... which is bad!</div>
<div> </div>
<div>Anybody knows how asterisk handles this?</div>
<div> </div>
<div>K</div></span></div>
<div><pre><hr width="90%" size="4">
_______________________________________________
--Bandwidth and Colocation provided by <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://easynews.com/" target="_blank">Easynews.com</a> --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a>
</pre>
<blockquote></blockquote><br> </div></div><br>_______________________________________________<br>--Bandwidth and Colocation provided by <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://easynews.com/" target="_blank">
Easynews.com</a> --<br><br>Asterisk-Users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br><br><br></blockquote></div><br>