[asterisk-users] hint() extension in AEL

Vahan Yerkanian vahan at arminco.com
Sun Jun 29 07:11:42 CDT 2008


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(${ext}@Main,b);
                                        break;
                                default:
                                        Voicemail(${ext}@Main,u);
                        };
                        catch a {
                                VoiceMailMain(${ext}@Main);
                                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?





More information about the asterisk-users mailing list