On Wed, 2005-01-26 at 18:17 +1100, Duane wrote: > Joseph wrote: > > > Thanks Kris, I found the solution: > > Here is how it suppose to look like: > > You can minimise all that with a simple macro and a little pattern > matching, and it makes dial plans so much easier to track down problems > with etc... I couldn't find anything on it, but I'm not sure if you can > or can't shorten it any further something like exten => > _18[00,66,77,88]. etc, but it won't parse correctly in that form because > it will think they are arguments, not part of the regexp... > > [tollfree] > > exten => _1800.,1,Macro(tollfree, ${EXTEN}) > exten => _1866.,1,Macro(tollfree, ${EXTEN}) > exten => _1877.,1,Macro(tollfree, ${EXTEN}) > exten => _1888.,1,Macro(tollfree, ${EXTEN}) > exten => _3[13]800.,1,Macro(tollfree, ${EXTEN}) > exten => _44[58]00.,1,Macro(tollfree, ${EXTEN}) > exten => _44808.,1,Macro(tollfree, ${EXTEN}) > > [macro-tollfree] > > exten => s,1,SetCallerID,${FWDCIDNAME} > exten => > s,2,Dial,IAX2/${FWDNUMBER}:[EMAIL PROTECTED]/*${ARG2},60,r) > exten => s,3,Playback(invalid) > exten => s,4,Hangup > exten => s,103,Busy >
I got it. It works with small corrections: there is no "space" after comma and before ${EXTEN} [tollfree] exten => _1800.,1,Macro(tollfree,${EXTEN}) exten => _1866.,1,Macro(tollfree,${EXTEN}) exten => _1877.,1,Macro(tollfree,${EXTEN}) exten => _1888.,1,Macro(tollfree,${EXTEN}) exten => _3[13]800.,1,Macro(tollfree,${EXTEN}) exten => _44[58]00.,1,Macro(tollfree,${EXTEN}) exten => _44808.,1,Macro(tollfree,${EXTEN}) and the Dial command should be ${ARG1} [macro-tollfree] exten => s,1,SetCallerID,${FWDCIDNAME} exten => s,2,Dial,IAX2/${FWDNUMBER}:[EMAIL PROTECTED]/*${ARG1},60,r) exten => s,3,Playback(invalid) exten => s,4,Hangup exten => s,103,Busy Now it works! Thank you again. -- #Joseph _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users