[Asterisk-Users] Calls forwarding to numbers only in user's context

Johnathan Corgan jcorgan at aeinet.com
Thu Mar 9 19:48:28 MST 2006


Bartosz Piec wrote:

> How to set calls forwarding only to numbers that are available in user's
> context (so if he has only locals calls he cannot set calls forwarding
> for mobile phones)?

When the user sets the forwarding number, store the user's context in
the DB along with the forwarding number. Make sure you have an invalid
extension 'i' in the user's context as well.

For an incoming call, when the Dial returns busy or no answer, execute a
jump to the retrieved context/extension.  If the user doesn't have the
forwarding number in his context, the incoming call will land in the
invalid extension.

-Johnathan



More information about the asterisk-users mailing list