Will this do. [general] static=yes writeprotect=no
[globals] ${ext}=0 SetGlobalVar(DIGITS=4) [attendant] ;Main welcome message exten => xxxxxxx2400,1,Answer() exten => xxxxxxx2400,2,Wait(1) exten => xxxxxxx2400,3,Background(welcome) exten => xxxxxxx2400,4,ResponseTimeout,15 ;Used for wrong button press exten => i,1,Goto,invalid|s|1 ;To reach the operator exten => 0,1,Goto,operator|s|1 ;Company directory seach feature exten => 3,1,Directory(local|cme-pbx) exten => 3,2,Hangup ;To access VoiceMailMain exten => 9,1,Goto,voicemail|s|1 ;Need to be able to dial 4 digit extensions include => cme-pbx [voice-mail] include => attendant exten => 3000,1,Answer exten => 3000,2,Dial(SIP/3000) exten => 3000,3,Hangup ;Used in conjuction with ResposeTimeout exten => t,1,Playback(vm-goodbye) exten => t,2,Hangup ;Number that CME dials to forward voice mail to Asterisk exten => _22XXX,1,Setvar(ext=${EXTEN:1}) exten => _22XXX,2,Goto,vmail|s|1 [vmail] exten => s,1,Answer exten => s,2,NoOp(${ext}) exten => s,3,GotoIf($[${LEN(${CALLERIDNUM})} = ${DIGITS}]?s|5) exten => s,4,GotoIf($[${CALLERIDNUM} = "3000"]?s|6) exten => s,5,Voicemail(u${ext}) exten => s,6,Background(pbx-invalid) exten => s,7,Hangup ;The below "a" option triggers on the button ; press "*" exten => a,1,VoicemailMain exten => a,2,Hangup [cme-pbx] exten => _24XX,1,Dial(SIP/[EMAIL PROTECTED]) exten => _24XX,2,Hangup [operator] exten => s,1,Dial(SIP/[EMAIL PROTECTED]) [voicemail] exten => s,1,VoicemailMain() exten => s,2,Hangup [invalid] exten => s,1,Playback(pbx-invalid) exten => s,2,Goto,attendant|xxxxxxx2400|3 On Tue, 08 Mar 2005 12:36:38 -0600, Dennis Webb <[EMAIL PROTECTED]> wrote: > Can you post your dialplan for that extension. Also, NoOp works great for > debugging these issues. > > > On Tue, 2005-03-08 at 12:29, kurt x wrote: > > I am trying to test how the GotoIf and $LEN functions work but am not > succeeding is this venture. When I dial and access voicemail with an ani of > 3000 the gotoif statement does not push the call to s|6. Its goes through > each line( 1,2,3,4,5,6,7) . In additon when I dial with a 10 digit ani the > s,3,Gotoif does not work. It also goes through each line( 1,2,3,4,5,6,7) Any > help is greatly appreciated. Thanks Kurt Asterisk CVS-HEAD-07/14/04-16:28:29 > built by [EMAIL PROTECTED] on a i686 running Linux [globals] > ${ext}=0 SetGlobalVar(DIGITS=10) [vmail] exten => s,1,Answer exten => > s,2,NoOp(${ext}) exten => s,3,GotoIf($[${LEN(${CALLERIDNUM}}) = > ${DIGITS}]?s|5) exten => s,4,GotoIf($[${CALLERIDNUM} = "3000"]?s|6) exten => > s,5,Voicemail(u${ext}) exten => s,6,Background(pbx-invalid) exten => > s,7,Hangup _______________________________________________ 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 _______________________________________________ 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