<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:m="http://schemas.microsoft.com/office/2004/12/omml" 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 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
h5
        {mso-style-priority:9;
        mso-style-link:"Heading 5 Char";
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:10.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.Heading5Char
        {mso-style-name:"Heading 5 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 5";
        font-family:"Times New Roman","serif";
        mso-fareast-language:DE;
        font-weight:bold;}
span.mw-headline
        {mso-style-name:mw-headline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">if i make a check on a variable, then it doen't work, ${destination} will shown as empty: -> <regex field="${destination}" expression="^(.+)$"/>
<o:p></o:p></p>
<p class="MsoNormal">but if i make a subcheck in this line, then it works korrektly: -> <regex field="${regex(${destination}|^(.*)$)}" expression="^(.+)$"/><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Why? I understand something wrong?<o:p></o:p></p>
<h5><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";font-weight:normal">On the Wiki -> Dialplan_XML -> Conditions -> Nested Condition Caveats and Notes. Here is a example with conditions with variables.<o:p></o:p></span></h5>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">see my complete extension tag.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><extension name="my_extension"><o:p></o:p></p>
<p class="MsoNormal"> <condition field="destination_number" expression="^001234(.+)$" break="on-false"><o:p></o:p></p>
<p class="MsoNormal"> <action application="set" data="destination=${global_getvar(C4B_OneNumber_$1)}"/><o:p></o:p></p>
<p class="MsoNormal"> <action application="log" data="DEBUG ${destination}"/> <!-- here i can see, destination is set correctly --><o:p></o:p></p>
<p class="MsoNormal"> </condition><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <condition regex="all"><o:p></o:p></p>
<p class="MsoNormal"> <regex field="${regex(${destination}|^(.*)$)}" expression="^(.+)$"/> <!-- this works fine --><o:p></o:p></p>
<p class="MsoNormal"> <!--<regex field="${destination}" expression="^(.+)$"/>--> <!-- this does't work! --><o:p></o:p></p>
<p class="MsoNormal"> <anti-action application="log" data="INFO [$1]"/> <!-- in the wrong example i can see $1 is empty and on the log output in the CLI, the destination will shown as empty too. --><o:p></o:p></p>
<p class="MsoNormal"> <action application="bridge" data="sofia/internal/123${destination}@$${c4b_gateway01}"/><o:p></o:p></p>
<p class="MsoNormal"> <anti-action application="log" data="ERR is empty? [${destination}]"/> <!-- in the wrong example i can here see again, der destination is set correctly --><o:p></o:p></p>
<p class="MsoNormal"> </condition><o:p></o:p></p>
<p class="MsoNormal"></extension><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for your Help<o:p></o:p></p>
<p class="MsoNormal">Alex<o:p></o:p></p>
</div>
</body>
</html>