Hi, I was wondering how other people might handle this situation. We have a 10 channel fractional E1 and have so far only allocated about 25 numbers out of a 100 number block (9500 - 9599). If an external caller dials an invalid extension then we would like for them to be put through to our main number. In order to make for a short and simple extensions.conf we have defined our incoming context along the lines of:
exten => _123495XX,1,Dial(SIP/${EXTEN:4},16,tr) exten => _123495XX,2,Voicemail,u${EXTEN:4} exten => _123495XX,102,Voicemail,b${EXTEN:4} In order to accomodate invalid extensions we did this: exten => _123495XX,1,Dial(SIP/${EXTEN:4},16,tr) exten => _123495XX,2,Voicemail,u${EXTEN:4} exten => _123495XX,102,GotoIf($[${DIALSTATUS} = CHANUNAVAIL]?104) exten => _123495XX,103,Voicemail,b${EXTEN:4} exten => _123495XX,104,Dial(SIP/9500,20,tr) exten => _123495XX,105,Voicemail,u9500 exten => _123495XX,205,Voicemail,b9500 When I was trying to research this I pretty much found no information apart from an example using GotoIf in the 's' extension which wouldn't have been compatible with our pattern matching anyway (exten => s,1,Blah vs exten => _123495XX,1,Blah). The 'i' documentation in the wiki is less than helpful and if I read it correctly it is really only for the occasion where an extension cannot be matched. The way it is defined above we will always get a match, we will fail when there is no corresponding SIP extension defined (priority + 101) and that is where the GotoIf($[${DIALSTATUS}..) comes in. Is there any other way that we should be 'supposed' to do this functionality? Craig _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users