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
root@asterick.wlb2.n2p.com 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
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 > root@asterick.wlb2.n2p.com 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-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050308/80df04c0/attachment.htm
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/${EXTEN}@cme-pbx)
exten => _24XX,2,Hangup
[operator]
exten => s,1,Dial(SIP/2419@operator)
[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 <dwebb@delta-express.cc>
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 root@asterick.wlb2.n2p.com 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
On Wed, 2005-03-09 at 05: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.Have you tried removing the quotes?> > Thanks > > Kurt > > Asterisk CVS-HEAD-07/14/04-16:28:29 built by > root@asterick.wlb2.n2p.com 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-- Howard. LANNet Computing Associates; Your Linux people <http://www.lannetlinux.com> ------------------------------------------ "When you just want a system that works, you choose Linux; when you want a system that just works, you choose Microsoft." ------------------------------------------ "Flatter government, not fatter government; Get rid of the Australian states."
Removing the quotes and eliminating s,3,gotoif did work but its not
what I am looking for.
What I want to do is the following: If a ani that comes in has <10>
digits I want to change the ${CALLERIDNUM} to "unknown". If the ani
is 10 digits just goto voicemail.
When I set up my [vmail] to look like below, it does not work. When I
send a 4 digit
ani my e-mail confirmation of the voicemail shows the 4 digit ani and
not Unknown.
[globals]
Setvar(DIGITS=10)
[vmail]
exten => s,1,Answer
exten => s,2,NoOp(${ext})
exten => s,3,GotoIf($[${LEN(${CALLERIDNUM})} != $DIGITS}]?4:5)
exten => s,4,Setvar(${CALLERIDNUM}="Unknown")
exten => s,5,Voicemail(u${ext})
exten => s,6,Hangup
Kurt
On Wed, 09 Mar 2005 07:34:24 +1100, Howard Lowndes <lannet@lannet.com.au>
wrote:> On Wed, 2005-03-09 at 05: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.
>
> Have you tried removing the quotes?
>
> >
> > Thanks
> >
> > Kurt
> >
> > Asterisk CVS-HEAD-07/14/04-16:28:29 built by
> > root@asterick.wlb2.n2p.com 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
> --
> Howard.
> LANNet Computing Associates;
> Your Linux people <http://www.lannetlinux.com>
> ------------------------------------------
> "When you just want a system that works, you choose Linux;
> when you want a system that just works, you choose Microsoft."
> ------------------------------------------
> "Flatter government, not fatter government;
> Get rid of the Australian states."
>
>
kurt x wrote:> [globals] > Setvar(DIGITS=10)Try this instead... [globals] DIGITS=10 -Chris
To me it looks like the $LEN function is not working. When I do verbose start to * I see that it walks right through every step whether or not the ani is 10 digits or something else. Would it be better to write an AGI script? Kurt On Wed, 09 Mar 2005 11:41:50 -0600, Chris Wade <clwade@sparco.com> wrote:> kurt x wrote: > > [globals] > > Setvar(DIGITS=10) > > Try this instead... > > [globals] > DIGITS=10 > > -Chris > >
kurt x wrote:> [globals] > Setvar(DIGITS=10) > > > [vmail] > exten => s,1,Answer > exten => s,2,NoOp(${ext}) > exten => s,3,GotoIf($[${LEN(${CALLERIDNUM})} != $DIGITS}]?4:5) > exten => s,4,Setvar(${CALLERIDNUM}="Unknown") > exten => s,5,Voicemail(u${ext}) > exten => s,6,HangupOh, and it should be exten => s,3,GotoIf($[${LEN(${CALLERIDNUM})} != ${DIGITS}]?4:5) -Chris
I,ve gotten the GotoIf statement working now. I hard coded the value
10 in place of the ${DIGITS} varible. Worked like a charm.
Thanks to everyone who helped.
Kurt
On Wed, 09 Mar 2005 12:07:51 -0600, Chris Wade <clwade@sparco.com>
wrote:> kurt x wrote:
> > [globals]
> > Setvar(DIGITS=10)
> >
> >
> > [vmail]
> > exten => s,1,Answer
> > exten => s,2,NoOp(${ext})
> > exten => s,3,GotoIf($[${LEN(${CALLERIDNUM})} != $DIGITS}]?4:5)
> > exten => s,4,Setvar(${CALLERIDNUM}="Unknown")
> > exten => s,5,Voicemail(u${ext})
> > exten => s,6,Hangup
>
> Oh, and it should be
>
> exten => s,3,GotoIf($[${LEN(${CALLERIDNUM})} != ${DIGITS}]?4:5)
>
> -Chris
>
>
Again, may be off topic but are there any cards out there supported by asterisk that have on-board DSPs to do better 729->711 or 729->PRI conversion? -Matthew TC wrote:>> This maybe the wrong place to ask this question but... why did you >> switch to the Sangoma? > preliminary testing show Sangoma card/driver are better unload a full > load not such an issue with a single 4 span cards but 2+ cards > and the Digium T4xx cards start to drop calls, missed interupts etc > _______________________________________________ > 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
At the Spring VON show that just finished there were two vendors showing
Asterisk compatible T1 cards with on-board DSPs.
See: http://www.voip-info.org/tiki-index.php?page=Asterisk+hardware
Jim
James H. Thompson
jht@lj.net
----- Original Message -----
From: Matthew Boehm
To: Asterisk Users Mailing List - Non-Commercial Discussion
Sent: Wednesday, March 09, 2005 11:18 AM
Subject: Re: [Asterisk-Users] Digium : no lead time!
Again, may be off topic but are there any cards out there supported by
asterisk that have on-board DSPs to do better 729->711 or 729->PRI
conversion?
-Matthew
TC wrote:
>> This maybe the wrong place to ask this question but... why did you
>> switch to the Sangoma?
> preliminary testing show Sangoma card/driver are better unload a full
> load not such an issue with a single 4 span cards but 2+ cards
> and the Digium T4xx cards start to drop calls, missed interupts etc
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20050311/4a46cd5d/attachment.htm
> -----Oprindelig meddelelse----- > Fra: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] P? vegne af kurt x > Sendt: 9. marts 2005 20:57 > Til: Chris Wade > Cc: Asterisk Users Mailing List - Non-Commercial Discussion > Emne: Re: [Asterisk-Users] GotoIf problem > > I,ve gotten the GotoIf statement working now. I hard coded the value > 10 in place of the ${DIGITS} varible. Worked like a charm. > > Thanks to everyone who helped. > > KurtHi Kurt, You are writing the ${DIGITS} variable wrong, you are missing a "{" eg.: you are writing "$DIGITS}" and it should be "${DIGITS}" Thorben