[Asterisk-Users] Call forwarding

Andrew Willerding awillerding at ieee.org
Fri Feb 4 10:30:41 MST 2005



> I've written a macro that allows users to dynamically change their call
> forwarding destination.  The purpose is to set up a "follow me" process
> where a user can get calls on their cell, at home, etc., based on the
> forwarding number they enter.  Using the CFIM database, I have the setup
> portion working great.  Now, I want to actually use that information to
> forward a call.  
>  
> Here is my issue:  The forwarded number saved in CFIM could be another
> extension, a local number or an LD number, each of which would be dialed
> using a different technology (internal, SIP-provider, Zap, etc.).  I
> want to avoid having to check the number and code all of the logic for
> each method - because I already have all of this set up in the dialplan
> for callers who would have dialed this forwarded number directly.
>  
> What I would like to do is take the variable containing the number
> retrieved from CFIM, place it on the stack as the called number, and
> have it reenter the dial plan, similar to the WAITEXTEN command.
>  


I've done something similar.  I have a relatively small PBX configuration and
all extensions are SIP phones assigned a 6 digit or less extension number. 
I've built a custom macro that determines how many digits need to be dialed and
then based on the number of digits it either prefixes SIP/ or Zap/  to the
actual Dial command.  It works like a charm!

Andrew



More information about the asterisk-users mailing list