<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Philipp Kempgen wrote:
<blockquote id="mid_49513E44_60609_amooma_de"
cite="mid:49513E44.60609@amooma.de" type="cite">
<pre wrap="">Brent Davidson schrieb:
</pre>
<blockquote id="StationeryCiteGenerated_1" type="cite">
<pre wrap="">macro outside-dial ( num ) {
if (${DB_EXISTS(Office/${CALLERID(num)})}) {
TRUNK="Zap/r2";
} else {
TRUNK="Zap/r1";
}
Dial(${TRUNK}/${num},,Ttok);
}
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote id="StationeryCiteGenerated_2" type="cite">
<pre wrap="">[Dec 23 12:16:22] WARNING[2994]: pbx_ael.c:2500 check_pval_item:
Warning: file /etc/asterisk/extensions.ael, line 93-93: expression
"Zap/r2" has operators, but no variables. Interesting...
[Dec 23 12:16:22] WARNING[2994]: pbx_ael.c:2500 check_pval_item:
Warning: file /etc/asterisk/extensions.ael, line 95-95: expression
"Zap/r1" has operators, but no variables. Interesting...
</pre>
</blockquote>
<pre wrap=""><!---->
I'd suggest
        Set(TRUNK=Zap/r2);
resp.
        Set(TRUNK=Zap/r1);
Philipp Kempgen
</pre>
</blockquote>
<br>
According to the AEL Documentation I should be able to set variables
without using the "Set" command. They even give the following example:<br>
<br>
<span style="font-family: monospace;">context foo {
</span><br>
<span style="font-family: monospace;"> 555 => {
</span><br>
<span style="font-family: monospace;"> x=5;
</span><br>
<span style="font-family: monospace;"> y=blah;
</span><br>
<span style="font-family: monospace;"> divexample=10/2
</span><br>
<span style="font-family: monospace;"> NoOp(x is ${x} and y is ${y} !);
</span><br>
<span style="font-family: monospace;"> };
</span><br>
<span style="font-family: monospace;">};</span>
<br>
<br>
I wonder if maybe AEL is ignoring the double quotes and treating the
Zap/r2 as if it were division??? Should I file a bug report on this?<br>
<br>
<br>
</body>
</html>