[asterisk-users] Troubles with AEL

2008-12-31 Thread Benoit

Hi,

I'm migrating some macro from extension.conf format to AEL and they are
some things
i don't understand, and some i don't evan know how to get them working.

Example:
Doing this queueMemberList=${QUEUE_MEMBER_LIST(queue)};  won't
make any warning
message, however the resulting variable value won't be the
expected one (a string) but some kind of number

However this work: Set(queueMemberList=${QUEUE_MEMBER_LIST(${queue})});
   Is there a reason ? i have the same comportement with CUT()

Also, there is this construct which isn't working:
if( ${DB_EXISTS(family/key)} ) {
} else {
}

However i can't find a workaround in this case ... any idea ?


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Troubles with AEL

2008-12-31 Thread Benoit
Benoit a écrit :
 Hi,

 ..
   

 Also, there is this construct which isn't working:
 if( ${DB_EXISTS(family/key)} ) {
 } else {
 }

 However i can't find a workaround in this case ... any idea ?
   
Well, never mind ths one, some space got stuck in the macro calling,
giving a wrong key at this point 




___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Troubles with AEL

2008-12-31 Thread Steve Murphy
On Wed, 2008-12-31 at 12:41 +0100, Benoit wrote:
 Hi,
 
 I'm migrating some macro from extension.conf format to AEL and they are
 some things
 i don't understand, and some i don't evan know how to get them working.
 
 Example:
 Doing this queueMemberList=${QUEUE_MEMBER_LIST(queue)};  won't
 make any warning
 message, however the resulting variable value won't be the
 expected one (a string) but some kind of number
 
 However this work: Set(queueMemberList=${QUEUE_MEMBER_LIST(${queue})});
Is there a reason ? i have the same comportement with CUT()
 

Benoit--

Set works because it is translated directly into the dialplan;

queueMemberList=${QUEUE_MEMBER_LIST(queue)};

is translated into queueMemberList=$[${QUEUE_MEMBER_LIST(queue)}]
(note the $[] added), which is probably not what you want in this 
case, but would be fine if you wanted the RHS to be evaluated...

a = ${b} + ${c};

The voip-info wiki is a good resource here in explaining the
fine points: http://voip-info.org/wiki/view/Asterisk+AEL2
with some examples at
http://voip-info.org/wiki/view/AEL+Example+Snippets

murf

 Also, there is this construct which isn't working:
 if( ${DB_EXISTS(family/key)} ) {
 } else {
 }
 
 However i can't find a workaround in this case ... any idea ?
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
 Steve Murphy
Digium, Inc. | Software Developer
57 Lane 17, Cody, WY 82414 USA
direct: +1 256-428-6002
mobile: +1 307-899-5535
fax/home: +1 307-754-5675
irc: codefreeze | jabber: m...@digium.com
Check us out at: www.digium.com  www.asterisk.org



smime.p7s
Description: S/MIME cryptographic signature
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users