[Asterisk-Users] Call forwarding and voicemail
Michael George
george at auroravideosys.com
Tue Jun 22 10:03:13 MST 2004
On Jun 22, 2004, at 12:30 PM, Jay Milk wrote:
> How about starting your macro with SetVar(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!
>> -----Original Message-----
>> From: Michael George [mailto:george at auroravideosys.com]
>> Sent: Tuesday, June 22, 2004 9:00 AM
>> To: asterisk-users at lists.digium.com
>> 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,
>> e.g. 202, my
>> macro will call:
>> Dial(Local/${fwNum}@internal/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, is to return
>> from that macro differently when the Dial() was called against Local
>> rather than my internal extensions. Then, have that Dial(Local/...)
>> return 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, and MACRO_OFFSET might be
>> helpful 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 missing parts of the
>> config file and/or do not seem to work quite right.
>>
>> Thank you!
>> -Michael
>>
>> _______________________________________________
>> Asterisk-Users mailing list
>> Asterisk-Users at lists.digium.com
>> 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
> 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
>
>
-Michael
More information about the asterisk-users
mailing list