Nice workaround. I was under the impression that SetVar works
(according to the wiki) within the scope of a channel, but apparantly it
gets lost once you move context. Bummer.
No, they will survive changes of context, but doing a Dial(Local/...) is essentially a whole new call and that didn't seem to work.
Or I did it wrong and I just was banging my head against a wall for nothing... Either could be the case :) But at least I have a way around it and it seems to work just as I desire.
-----Original Message----- From: Michael George [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 12:03 PM To: [EMAIL PROTECTED] Subject: Re: [Asterisk-Users] Call forwarding and voicemail
On Jun 22, 2004, at 12:30 PM, Jay Milk wrote:How about starting your macro withSetVar(DialedExten=${MACRO_EXTEN})and then going into voicemail with VoiceMail(u${DialedExten})
Well, I tried setting variables and saving them through the context change, but the variable (DialedExten in your example) had no value in the Dial(Local/...) call. The recursion messes all that up.
I did find the solution, though, and that is when in the Macro context and ready to go to voice mail, I check to see if the CHANNEL is a loopback (${CHANNEL}:0:5 = Local) and if so, I do a SoftHangup(). That causes the Local channel to close down and actually return control to the initial Macro context, where I can deal with the call just as I wanted.
Thanks for your suggestion!
e.g. 202,-----Original Message----- From: Michael George [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 9:00 AM To: [EMAIL PROTECTED] Subject: [Asterisk-Users] Call forwarding and voicemail
I am configuring call forwarding in our * setup, but I am having trouble triggering the correct voicemail call.
When I have an extension, e.g. 201, forwarded to another,to returnmy macro will call: Dial(Local/[EMAIL PROTECTED]/n,30)
and once into the internal context, the macro is called again but with MACRO_EXTEN set to 202 rather than 201. So the context flow of control will "do it's thing" against 202. What I want, though, isagainst Localfrom that macro differently when the Dial() was calledDial(Local/...)rather than my internal extensions. Then, have thatMACRO_OFFSET might bereturn with the priority set to either n+1 or n+101 so that I can handle the flow into VM based on that original extension.
I'm thinking that CHANNEL, MACRO-PRIORITY, andparts of thehelpful for a return from the subsequent call to the macro, but I need to get information passed back through the Dial(Local/...) call so that I can know what happened with the dial to the forward target.
I would be satisfied if I can get the return from Dial(Local/...) even if I cannot differentiate a busy vs. timeout condition.
Most of the forwarding examples I've found are missingconfig file and/or do not seem to work quite right.
Thank you! -Michael
_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/aster> isk-users To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
-Michael
_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/aster> isk-users To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
-Michael
_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
