On Jun 18, 2004, at 10:57 AM, Jeremy Jones wrote:
 From the docs, it looks like MailboxExists() will add 101 to the
priority if the box *does* exist and goes to the next priority if not.

I think the "show application mailboxexists" documentation is wrong. I believe it's the other way around. It does exits? Jump to next priority. It doesn't? Jump to n+101. Here's my extension macro (sift out the forwarding stuff if you don't like that), and it works:

Odd... I did a make update and how the MailboxExists works fine. However, it works just as the docs say: add 101 to priority if the box *does* exist, add 1 if not. I have tested it and this seems to be how it works. You may wish to test your flow and make sure it works as you think it does.


[macro-stdexten]
exten=s,1,MailboxExists(${MACRO_EXTEN:[EMAIL PROTECTED])        ;If
mailbox exists continue at 2, otherwise goto 102
exten=s,2,NoOp                                                  ;Filler
exten=s,3,NoOp                                                  ;Filler
exten=s,4,NoOp                                                  ;Filler
exten=s,5,NoOp                                                  ;Filler
exten=s,6,DBget(temp=CFIM/${ARG1})                              ;Get
CFIM key, if not existing, goto 107
exten=s,7,Dial(${TRUNK}/9${temp})
;Unconditional forward
exten=s,8,NoOp                                                  ;Filler
exten=s,9,Dial(${ARG2},25,rtT)                          ;Dial device for
25 seconds, goto 10 if busy, goto 110 if unavailable
exten=s,10,NoOp                                                 ;Filler
exten=s,11,DBget(temp=CFBS/${ARG1})                             ;Get
CFBS key, if not existing, goto 112
exten=s,12,Dial(${TRUNK}/9${temp})                              ;Forward
on busy or unavailable
exten=s,102,DBget(temp=CFIM/${ARG1})                    ;Get CFIM key,
if not existing, goto 203
exten=s,103,Dial(${TRUNK}/9${temp})
;Unconditional forward
exten=s,104,Dial(${ARG2},120,rtT)                               ;Dial
device for 120 seconds, goto 105 if busy, goto 205 if unavailable
exten=s,105,DBget(temp=CFBS/${ARG1})                    ;Get CFBS key,
if not existing, goto 206
exten=s,106,Dial(${TRUNK}/9${temp})                             ;Forward
on busy or unavailable
exten=s,107,Goto(s,9)                                           ;Goto 9
exten=s,110,Voicemail(u${MACRO_EXTEN:[EMAIL PROTECTED]) ;To VM
if unavailable
exten=s,111,Hangup                                              ;Hang up
the channel when vm exits
exten=s,112,Voicemail(b${MACRO_EXTEN:[EMAIL PROTECTED]) ;To VM
if busy
exten=s,113,Hangup                                              ;Hang up
the channel when vm exits
exten=s,203,Goto(s,104)                                         ;Goto
104 for accounts w/out vm
exten=s,205,Busy()                                              ;Busy
signal if busy & no vm
exten=s,206,Busy()                                              ;Busy
signal if no answer in 2 min & no vm

It's a little ugly w/all those NoOps, but I think I need those to get
the priorities right.

Jeremy Jones



_______________________________________________
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



-Michael

_______________________________________________
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

Reply via email to