[Asterisk-Users] Re: Budgetone and MWI

Aldo Bergamini aab.lists at nb-a.com
Sat Jan 15 04:01:33 MST 2005


asterisk-users-request at lists.digium.com is believed to have said: 

>Budgetone and MWI

>
>The message button can be programmed to dial an extension that checks
>voicemail
>exten => 160,1,Voicemailmain(${CALLERIDNUM})
>

Thanks, this is what I was thinking about. Still, how do you get the BT
to dial 160?

In my Asterisk setting I have the same mailbox numbers reused for the
voice mailboxes. 

As a matter of fact when one presses the message button the BT dials the
number indicated as the voice mailbox number.

Thus in my case a small in the main extension pattern matching gives me
what I was looking for (just press the button and you get your voice mails..)


This is how it was before:


; EXT. 2XXX
; generic dialer

exten => _2XXX,1,Dial(SIP/${EXTEN},20)
exten => _2XXX,2,Voicemail(u${EXTEN})
exten => _2XXX,3,Hangup()
exten => _2XXX,102,Voicemail(b${EXTEN})
exten => _2XXX,103,Hangup()


And this is how I changed it:

exten => _2XXX,1,GotoIf(${CALLERIDNUM}=${EXTEN}?5)
exten => _2XXX,2,Dial(SIP/${EXTEN},20)
exten => _2XXX,3,Voicemail(u${EXTEN})
exten => _2XXX,4,Hangup()
exten => _2XXX,5,Voicemailmain(s${CALLERIDNUM})
exten => _2XXX,103,Voicemail(b${EXTEN})
exten => _2XXX,104,Hangup()



I reloaded the dialplan and it works! Asterisk is astonishingly flexible...

If one has different number sets for extensions and voice mailboxes there
could be still a wayout: add key/value pairs in the database and look
them up to know what mailbox to look for in 'label 5'...

Best regards,
Aldo







More information about the asterisk-users mailing list