Hi, I can't figure out what syntax to use with the Dial() "M" parameter for the AEL parser to interpret properly. Creating an AEL macro named "macro-screen()" partly works as a hack, but it must not turn into a gosub properly, so I get warnings about the "return;". Dial(...,tgM(&screen)) with the ael macro named "screen" does not work Dial(...,tgM&screen) with the ael macro named "screen" does not work Dial(...,tgM(screen)) with the ael macro named "screen" does not work Dial(...,tgM(screen)) with the ael macro named "macro-screen" partly works Is a more correct or otherwise better way to do this in AEL? Is there some other solution? The other followme examples I've found all have different behaviors than I want. I'm not looking for the caller to be prompted for their name or anything, and I don't want the followme connect to happen unless the cellphone user hits a "1" to accept the call, or other key to ditch the call, otherwise cellphone voicemail gets the call. Mark context inbound { ... 2155551234 => Dial(SIP/1234 at cme&local/102 at internals,18,rt); // screen these ... }; context internals { 102 => { Dial(${CELLPHONE},30,tgM(screen)); // cellphone user gets prompted jump s at general-menu; // jump to IVR menu if call not accepted }; }; // play message to cellphone before connecting inbound call // http://www.voip-info.org/wiki/view/Asterisk+tips+findme // http://lists.digium.com/pipermail/asterisk-dev/2005-June/013598.html // macro macro-screen() { // hack Wait(0.5); Read(ACCEPT,followme/options,1,,1,20); if( "${ACCEPT}" = "1" ) { Background(connecting); } else { Set(MACRO_RESULT=CONTINUE); }; return; // I get AEL complaints regardless of whether this is here or not. }; -- Mark G. Thomas (Mark at Misty.com)
On Tuesday 03 August 2010 13:19:11 Mark G. Thomas wrote:> I can't figure out what syntax to use with the Dial() "M" parameter > for the AEL parser to interpret properly. Creating an AEL > macro named "macro-screen()" partly works as a hack, but it must > not turn into a gosub properly, so I get warnings about the "return;".Is there a reason you don't want to use the 'U' option in Dial? It was created specifically for this purpose. -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com & www.asterisk.org
>From: asterisk-users-bounces at lists.digium.com[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark G. Thomas>Subject: [asterisk-users] Dial() M parameter in 1.6.2.11-rc2>Hi,>I can't figure out what syntax to use with the Dial() "M" parameter >for the AEL parser to interpret properly. Creating an AEL >macro named "macro-screen()" partly works as a hack, but it must >not turn into a gosub properly, so I get warnings about the "return;".> Dial(...,tgM(&screen)) with the ael macro named "screen" does not work > Dial(...,tgM&screen) with the ael macro named "screen" does not work > Dial(...,tgM(screen)) with the ael macro named "screen" does not work > Dial(...,tgM(screen)) with the ael macro named "macro-screen" partlyworks>Is a more correct or otherwise better way to do this in AEL? Is there >some other solution? The other followme examples I've found all have >different behaviors than I want. I'm not looking for the caller to >be prompted for their name or anything, and I don't want the followme >connect to happen unless the cellphone user hits a "1" to accept the >call, or other key to ditch the call, otherwise cellphone voicemail >gets the call.>MarkPersonally, I haven't gotten too involved in AEL because it's cumbersome (to me) to keep up across platforms (CENTOS/Suse/etc) but I have found that AEL is "additive"; you can write "troublesome" code using the old extensions.conf nomenclature so you don't have to worry about how AEL creates it. Not the cleanest or best solution, but it should be workable. P.S. All of you who are going to flame me, how about posting some good AEL tutorial links?
AEL is very simple and the instructions on voip-info.org are enough to learn it. In fact I can't understand how can one write complex dial plans not using AEL, you simply can't do it using standard format used in extensions.conf. As for the tutorials, there is no specific website for them as per my knowledge, but I can certainly try to write some basic ones on my blog to help those whom it might help. Many examples in my blogs are already in AEL, from real life scenarios. Zeeshan A Zakaria -- www.ilovetovoip.com On 2010-08-03 3:36 PM, "Mark G. Thomas" <Mark at misty.com> wrote: Hi, On Tue, Aug 03, 2010 at 01:49:11PM -0500, Tilghman Lesher wrote:> On Tuesday 03 August 2010 13:19:...Thank you! I didn't know there was a "U" option. I don't see any mention of it on the voip-info.org wiki or other Dial() documentation, but didn't check for new options in the built in documentation until just now. Mark -- Mark G. Thomas (Mark at Misty.com) -- __________________________________________________________... -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100803/1a0140c3/attachment.htm
Please note that I don't claim myself a guru, just happened to be working with Asterisk for some good number of years, so probably know some stuff better than others. As for the number of lines, 1800 lines will come down to 1000 lines using AEL but not the opposite. When I'll be back home, hopefully tomorrow, after a beautiful tour (my first) of New York city, I'll start writing some blogs on AEL. I guess an IVR example could be a good point to start, as it is enough complicated in itself. Zeeshan A Zakaria -- www.ilovetovoip.com On 2010-08-03 4:49 PM, "Danny Nicholas" <danny at debsinc.com> wrote: *>From:* asterisk-users-bounces at lists.digium.com [mailto: asterisk-users-bounces at lists.digium.com] *On Behalf Of *unserossi at aol.com>*Subject:* Re: [asterisk-users] Dial() M parameter in 1.6.2.11-rc2>AEL is very simple and the instructions on voip-info.org are enough tolearn it. In fact I can... I?ve only been with Asterisk since 1.4.18; the ?programmer? in me still finds it simpler to do a 1000 line extensions.conf vs an 1800 line readable AEL but the examples on www.ilovetovoip.com are going to bring me around more quickly than the voip-info.org stuff. You write some pretty good stuff, Z. -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list 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/20100803/8d03d58f/attachment-0001.htm