Hi,

I've been trying to setup hinting recently on 1.4.20.1, and was 
wondering if there is a more elegant way to do the following
piece of dialplan without repeating the hints for every existing 
extension/user?

context Main {

        hint(SIP/10301) 10301 => &call(${EXTEN});
        hint(SIP/10301)   301 => &call(10${EXTEN});
// [snip]
        hint(SIP/10327) 10327 => &call(${EXTEN});
        hint(SIP/10327)   327 => &call(10${EXTEN});

        _3XX    =>      &call(10${EXTEN});
        _103XX  =>    &call(${EXTEN});

}

macro call( ext )       {
                        Dial(SIP/${ext},20,otL(3600000:61000:30000));
                        
                        switch(${DIALSTATUS}) {
                                case BUSY:
                                       Voicemail([EMAIL PROTECTED],b);
                                        break;
                                default:
                                        Voicemail([EMAIL PROTECTED],u);
                        };
                        catch a {
                                VoiceMailMain([EMAIL PROTECTED]);
                                return;
                        };
                        Hangup;
};

So far I tried having the sip extension to ' => jump _103XX' or simply 
'=> Noop()'. Neither worked,
latter just overwriting the _103XX extension and causing just noop and 
hangup executed when you call that extensions.

Any ideas?



_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to