[Asterisk-Users] Does AEL support arrays?

2005-11-04 Thread Chris Bagnall
Hello all,

Does anyone know whether there's any support in AEL for arrays, and if so,
how one would go about implementing a shift statement?

Thanks in advance.

Regards,

Chris
-- 
C.M. Bagnall, Director, Minotaur I.T. Limited
Tel: (01604) 808408   Mobile: (07811) 332969   Skype: minotaur-uk
ICQ: 13350579   AIM: MinotaurUK   MSN: [EMAIL PROTECTED]   Y!: Minotaur_Chris
This email is made from 100% recycled electrons


___
--Bandwidth and Colocation sponsored by Easynews.com --

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


Re: [Asterisk-Users] Does AEL support arrays?

2005-11-04 Thread Kevin P. Fleming

Chris Bagnall wrote:


Does anyone know whether there's any support in AEL for arrays, and if so,
how one would go about implementing a shift statement?


No, it does not provide any types of variables that are not available 
already in the dialplan. Technically, it is only a new _syntax_, not a 
new dialplan language.

___
--Bandwidth and Colocation sponsored by Easynews.com --

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


Re: [Asterisk-Users] Does AEL support arrays?

2005-11-04 Thread Eric \ManxPower\ Wieling

Kevin P. Fleming wrote:

Chris Bagnall wrote:

Does anyone know whether there's any support in AEL for arrays, and if 
so,

how one would go about implementing a shift statement?



No, it does not provide any types of variables that are not available 
already in the dialplan. Technically, it is only a new _syntax_, not a 
new dialplan language.


If that's the case then the following could be easily converted to AEL. 
 Notice the fake subscripts I used.


[macro-whatever]
exten = 
s,1,AGI(callerid-fixup.agi,${CALLERIDNUM}${MACRO_EXTEN}00)

exten = s,2,Noop(AGI(set-ring))
exten = s,3,GotoIf($[${LEN(${FAX_DEST})} = 0]?9:4)
exten = s,4,Cut(TECHNOLOGY=CHANNEL,/,1)
exten = s,5,GotoIf($[${TECHNOLOGY} = Zap]?6:9)
exten = s,6,Answer
exten = s,7,Ringing
exten = s,8,NVFaxDetect(4,d)
exten = s,9,Goto(${MACRO_EXTEN},1)

exten = _,1,GotoIf($[${LEN(${DIAL_DEST[1]})} = 0]?2:4)
exten = _,2,GotoIf($[${LEN(${DIAL_DEST})} = 0]?14:3)
exten = _,3,SetVar(DIAL_DEST[1]=${DIAL_DEST})
exten = _,4,SetVar(INDEX=1)
exten = _,5,GotoIf($[${LEN(${DIAL_TIMEOUT[${INDEX}]})} = 0]?6:7)
exten = _,6,SetVar(DIAL_TIMEOUT[${INDEX}]=20)
exten = 
_,7,Dial(${DIAL_DEST[${INDEX}]},${DIAL_TIMEOUT[${INDEX}]},${DIAL_OPTS[${INDEX}]}g)
exten = _,8,GotoIf($[${DIALSTATUS} = BUSY | ${DIALSTATUS} = 
CHANUNAVAIL | ${DIALSTATUS} = CONGESTION]?12:9)

exten = _,9,GotoIf($[${DIALSTATUS} = NOANSWER]?14:10)
exten = _,10,Noop(DIALSTATUS=${DIALSTATUS})
exten = _,11,Hangup
exten = _,12,SetVar(INDEX=$[${INDEX} + 1])
exten = _,13,GotoIf($[${LEN(${DIAL_DEST[${INDEX}]})} = 0]?14:5)
exten = _,14,GotoIf($[${LEN(${VOICE_MAILBOX})} = 0]?19:15)
exten = _,15,Voicemail(${VOICE_MAILBOX})
exten = _,16,Wait(2)
exten = _,17,Hangup
exten = _,18,GotoIf($[${DIALSTATUS} = NOANSWER]?19:22)
exten = _,19,Voicemail(u${EXTEN})
exten = _,20,Wait(2)
exten = _,21,Hangup
exten = _,22,Voicemail(b${EXTEN})
exten = _,23,Wait(2)
exten = _,24,Hangup
exten = _,116,AbsoluteTimeout(30)
exten = _,117,Playback(sorry-mailbox-full)
exten = _,118,Wait(2)
exten = _,119,Congestion
exten = _,120,Goto(116)
exten = _,123,Goto(116)

exten = talk,1,Goto(${MACRO_EXTEN},1)

exten = fax,1,Cut(FAX_TECH=FAX_DEST,/,1)
exten = fax,2,GotoIf($[${FAX_TECH} = Zap]?3:7)
exten = fax,3,Dial(${FAX_DEST},20)
exten = fax,4,AbsoluteTimeout(30)
exten = fax,5,Wait(2)
exten = fax,6,Congestion
exten = fax,7,RxFax(/tmp/fax-${UNIQUEID}.tiff)
exten = 
fax,8,DeadAGI(/usr/local/bin/fax2email.pl,/tmp/fax-${UNIQUEID}.tiff)

exten = fax,9,Hangup
exten = fax,104,AbsoluteTimeout(30)
exten = fax,105,Busy

exten = a,1,Playback(/etc/asterisk/directvm)
exten = a,2,VoicemailMain()
exten = a,3,Wait(.5)
exten = a,4,Goto(1)

exten = o,1,GotoIf($[${LEN(${OPER_DEST})} = 0]?2:4)
exten = o,2,Goto(extensions,0,1)
exten = o,3,Hangup
exten = o,4,GotoIf($[${OPER_TIMEOUT} = 0]?5:6)
exten = o,5,SetVar(OPER_TIMEOUT=)
exten = o,6,GotoIf($[${LEN(${OPER_MESSAGE})} = 0]?8:7)
exten = o,7,Playback(${OPER_MESSAGE})
exten = o,8,Dial(${OPER_DEST},${OPER_TIMEOUT},${OPER_FLAGS})
exten = o,9,Voicemail(u${MACRO_EXTEN})
exten = o,10,Hangup
___
--Bandwidth and Colocation sponsored by Easynews.com --

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