[Asterisk-Users] Priority jump in AEL
Sergey Okhapkin
sos at sokhapkin.dyndns.org
Wed Oct 19 04:17:18 MST 2005
There is no way in AEL to specify the priority explicitly. To solve the
problem use DB_EXISTS function. Here is an example from my dialplan:
if(${DB_EXISTS(Provider/${prov}/used)})
Set(MINUTES_USED=
${DB_RESULT});
On Tue, 2005-10-18 at 21:16 +0000, Kris Edwards wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I use this macro for call screening:
>
> [macro-screen]
> exten => s,1,Wait(1)
> exten => s,2,DBget(SCREENFILE=callerid/${CALLERIDNUM})
> exten =>
> s,3,ParkAndAnnounce(beep:beep:callfrom:${SCREENFILE}:holdingonexten:PARKED:beep:beep:${SCREENFILE}:isholdingonext:PARKED|180|${ARG1}|${ARG2})
> exten => s,103,Set(SCREENFILE=/var/lib/asterisk/sounds/names/${UNIQUEID})
> exten => s,104,Playback(unknownid)
> exten => s,105,Record(${SCREENFILE}:gsm|3)
> exten => s,106,System(/usr/bin/normalize -g 6db ${SCREENFILE})
> exten => s,107,DBput(callerid/${CALLERIDNUM}=${SCREENFILE})
> exten =>
> s,108,ParkAndAnnounce(beep:beep:callfrom:${SCREENFILE}:holdingonexten:PARKED:beep:beep:${SCREENFILE}:isholdingonext:PARKED|40|${ARG1}|${ARG2})
>
>
> I'm trying to convert my dialplan to ael, but I don't get how to handle
> the jump if there is no entry in the database for the caller. I'm
> guessing it's an if statement, but what does the db return if there is
> no entry? 0, null?? If somebody could get me started with what that
> staement should be (at 103) then I should be good to go.
> (If this is a stupid question or explained elsewhere, feel free to let
> me know)
>
> Thanks,
>
> Kris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFDVWYvYPDM9qG4hYYRAqDRAJoDWicIJAVi/DaAQyDyfxgWtECdqACfWWsY
> jVxDtsvzMnjdjtj0EwMqevk=
> =eThe
> -----END PGP SIGNATURE-----
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
>
> Asterisk-Users mailing list
> Asterisk-Users at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051019/d89e563b/attachment.htm
More information about the asterisk-users
mailing list