<div dir="ltr">Hello Guys,<div><br></div><div>I was already told about using the &quot;inline&quot; when setting a variable, which actually did set it, but i can&#39;t then use it, for some reason..</div><div><br></div><div>


This is my dialplan</div><div><br></div><div><div><span style="white-space:pre-wrap">        </span>&lt;condition field=&quot;destination_number&quot; expression=&quot;^.*&quot;&gt;</div></div><div><br></div><div><div><span style="white-space:pre-wrap">                </span>&lt;action inline=&quot;true&quot; application=&quot;set&quot; data=&quot;rand_val=${expr(randomize(&amp;x);ceil(random(0,100,&amp;x)))}&quot;/&gt;</div>


<div><span style="white-space:pre-wrap">                </span>&lt;action application=&quot;log&quot; data=&quot;INFO Random value is ${rand_val}&quot;/&gt;</div><div><span style="white-space:pre-wrap">                </span>&lt;action inline=&quot;true&quot; application=&quot;set&quot; data=&quot;auth_call=${cond(${rand_val} &lt; 41 ? YES : NO )}&quot;/&gt;  </div>


<div><span style="white-space:pre-wrap">                </span>&lt;action application=&quot;log&quot; data=&quot;INFO Result: ${auth_call}&quot;/&gt;</div><div><br></div><div><span style="white-space:pre-wrap">                </span>&lt;condition field=&quot;${auth_call}&quot; expression=&quot;^YES$&quot;&gt;</div>


<div><span style="white-space:pre-wrap">                        </span>&lt;action application=&quot;log&quot; data=&quot;INFO ASR 40 we got ${rand_val}&quot;/&gt;</div></div><div><div><span style="white-space:pre-wrap">                </span>&lt;anti-action application=&quot;log&quot; data=&quot;INFO ${auth_call} is not greater than 41&quot;/&gt;</div>


<div><span style="white-space:pre-wrap">                </span>&lt;/condition&gt;</div><div><span style="white-space:pre-wrap">        </span>&lt;/condition&gt;</div></div><div><br></div><div>and the Log:</div><div><br></div><div>
<div><div>EXECUTE sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> log(INFO cond(19 &lt; 41 ? YES : NO ) is not greater than 41)</div><div>2013-09-02 17:57:27.090531 [INFO] mod_dptools.c:1567 cond(19 &lt; 41 ? YES : NO ) is not greater than 41</div>

<div>EXECUTE sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> log(INFO Random value is 19)</div><div>2013-09-02 17:57:27.090531 [INFO] mod_dptools.c:1567 Random value is 19</div><div>EXECUTE sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> log(INFO Result: cond(19 &lt; 41 ? YES : NO ))</div>

<div>2013-09-02 17:57:27.090531 [INFO] mod_dptools.c:1567 Result: cond(19 &lt; 41 ? YES : NO )</div><div>2013-09-02 17:57:27.090531 [NOTICE] switch_core_state_machine.c:262 sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> has executed the last dialplan instruction, hanging up.</div>

<div>2013-09-02 17:57:27.090531 [NOTICE] switch_core_state_machine.c:264 Hangup sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> [CS_EXECUTE] [NORMAL_CLEARING]</div></div></div><div><br></div><div><br></div>

<div>Apparently the &lt;condition field=&quot;${auth_call}&quot; expression=&quot;^YES$&quot;&gt; is not working...</div><div><br></div><div>Can you guys help?</div><div><br></div><div>Thanks!</div><div><br></div><div>David</div>

</div>