I replied to a post of mine a few days ago asking of anyone uses mailboxexists(). I haven't received any replies. Perhaps few use it or perhaps the reply was overlooked. I thought I'd post the question one last time before giving up on it for now... Thanks! -Michael
There was some sort of update to MailboxExists in Asterisk CVS -head the other day. See http://lists.digium.com/pipermail/asterisk-cvs/ On Tue, 2004-06-15 at 16:36, Michael George wrote:> I replied to a post of mine a few days ago asking of anyone uses > mailboxexists(). I haven't received any replies. > > Perhaps few use it or perhaps the reply was overlooked. I thought I'd > post the question one last time before giving up on it for now... > > Thanks! > > -Michael > > _______________________________________________ > 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-- Eric Wieling * BTEL Consulting * 504-899-1387 x2111 "In a related story, the IRS has recently ruled that the cost of Windows upgrades can NOT be deducted as a gambling loss."
Yes, I use it. Here's a sample extension of how to use it. exten => 1234,1,Answer() exten => 1234,2,MailboxExists(1234) exten => 1234,3,Dial(SIP/1234,20) ; Try to ring for 20 seconds, no answer goto voicemail exten => 1234,4,Voicemail(b1234) ; send to voicemail if busy exten => 1234,103,Dial(SIP/1234) ; Try to ring till answered exten => 1234,104,Busy() ; Give busy tone if busy. exten => 1234,204,Voicemail(u1234) ; send to voicemail if no answer ----- Original Message ----- From: "Michael George" <george@auroravideosys.com> To: <asterisk-users@lists.digium.com> Sent: Tuesday, June 15, 2004 5:36 PM Subject: [Asterisk-Users] anyone use mailboxexists?> I replied to a post of mine a few days ago asking of anyone uses > mailboxexists(). I haven't received any replies. > > Perhaps few use it or perhaps the reply was overlooked. I thought I'd > post the question one last time before giving up on it for now... > > Thanks! > > -Michael > > _______________________________________________ > 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
Michael,> 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: [macro-stdexten] exten=s,1,MailboxExists(${MACRO_EXTEN:3}@${MACRO_CONTEXT}) ;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:3}@${MACRO_CONTEXT}) ;To VM if unavailable exten=s,111,Hangup ;Hang up the channel when vm exits exten=s,112,Voicemail(b${MACRO_EXTEN:3}@${MACRO_CONTEXT}) ;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