[Asterisk-Users] anyone use mailboxexists?
Jeremy Jones
jjones at westcomllc.com
Mon Jun 21 06:49:19 MST 2004
Hi all,
> 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.
Well, the cvs version I have (head from 3:00 mst june 14th) works as I
expect with this macro...
Let me triple-check...
Here's one w/out voicemail:
*CLI> Check for res for
is not a local user
build_route: Contact hop: <sip:2084658499 at 206.207.86.7:5060;user=phone>
-- Executing SetVar("SIP/my-pstn-gw-0813b410",
"NEW_MACRO_CONTEXT=residential-swidaho") in new stack
-- Executing Macro("SIP/my-pstn-gw-0813b410",
"stdexten|2082874700|SIP/2082874700|1") in new stack
-- Executing MailboxExists("SIP/my-pstn-gw-0813b410",
"2874700 at residential-swidaho") in new stack
-- Executing DBget("SIP/my-pstn-gw-0813b410",
"temp=CFIM/2082874700") in new stack
-- DBget: varname=temp, family=CFIM, key=2082874700
Unable to find key '2082874700' in family 'CFIM'
-- DBget: Value not found in database.
-- Executing Goto("SIP/my-pstn-gw-0813b410", "s|104") in new stack
-- Goto (macro-stdexten,s,104)
-- Executing Dial("SIP/my-pstn-gw-0813b410",
"SIP/2082874700|120|rtT") in new stack
SIMPLE DIAL (NO URL)
Setting NAT on RTP to -1
Unable to create channel of type 'SIP'
== Everyone is busy at this time
-- Executing Busy("SIP/my-pstn-gw-0813b410", "") in new stack
== Spawn extension (macro-stdexten, s, 205) exited non-zero on
'SIP/my-pstn-gw-0813b410' in macro 'stdexten'
== Spawn extension (did, 2082874700, 2) exited non-zero on
'SIP/my-pstn-gw-0813b410'
update_user_counter() - decrement inUse counter
is not a local user
Stopping retransmission on
'6ABD7577-C2BE11D8-B7B4E5FD-C1DAC161 at my-pstn-gw' of Response 101: Not
Found
*CLI>
See where it goes to 104? That's where we end up if: no mailbox, no
CFIM. When we find that the called device is unavail, it goes to 205 (I
get busy signal).
Now again w/voicemail:
*CLI> Check for res for
is not a local user
build_route: Contact hop: <sip:2084658499 at 206.207.86.7:5060;user=phone>
-- Executing SetVar("SIP/my-pstn-gw-0813b830",
"NEW_MACRO_CONTEXT=residential-swidaho") in new stack
-- Executing Macro("SIP/my-pstn-gw-0813b830",
"stdexten|2082874700|SIP/2082874700|1") in new stack
-- Executing MailboxExists("SIP/my-pstn-gw-0813b830",
"2874700 at residential-swidaho") in new stack
-- Executing NoOp("SIP/my-pstn-gw-0813b830", "") in new stack
-- Executing NoOp("SIP/my-pstn-gw-0813b830", "") in new stack
-- Executing NoOp("SIP/my-pstn-gw-0813b830", "") in new stack
-- Executing NoOp("SIP/my-pstn-gw-0813b830", "") in new stack
-- Executing DBget("SIP/my-pstn-gw-0813b830",
"temp=CFIM/2082874700") in new stack
-- DBget: varname=temp, family=CFIM, key=2082874700
Unable to find key '2082874700' in family 'CFIM'
-- DBget: Value not found in database.
-- Executing Goto("SIP/my-pstn-gw-0813b830", "s|9") in new stack
-- Goto (macro-stdexten,s,9)
-- Executing Dial("SIP/my-pstn-gw-0813b830",
"SIP/2082874700|25|rtT") in new stack
SIMPLE DIAL (NO URL)
Setting NAT on RTP to -1
Unable to create channel of type 'SIP'
== Everyone is busy at this time
-- Executing VoiceMail("SIP/my-pstn-gw-0813b830",
"u2874700 at residential-swidaho") in new stack
voicemail/residential-swidaho/2874700/unavail doesn't exist, doing what
we can
Ooh, format changed from UNKN to ULAW
-- Playing 'vm-theperson' (language 'en')
Stopping retransmission on
'9526A73F-C2BF11D8-B7C5E5FD-C1DAC161 at 206.207.86.7' of Response 101:
Found
-- Playing 'digits/2' (language 'en')
-- Playing 'digits/8' (language 'en')
-- Playing 'digits/7' (language 'en')
-- Playing 'digits/4' (language 'en')
-- Playing 'digits/7' (language 'en')
-- Playing 'digits/0' (language 'en')
-- Playing 'digits/0' (language 'en')
-- Playing 'vm-isunavail' (language 'en')
-- Playing 'vm-intro' (language 'en')
== Spawn extension (macro-stdexten, s, 110) exited non-zero on
'SIP/my-pstn-gw-0813b830' in macro 'stdexten'
== Spawn extension (did, 2082874700, 2) exited non-zero on
'SIP/my-pstn-gw-0813b830'
update_user_counter() - decrement inUse counter
is not a local user
*CLI>
So here it hits 2, 3, 4, 5 (all the noops) and on down to 6, as I
expected it would when I *do* have a vm box, but the opposite of what
the docs say.
I suppose I may need to re-write this macro after I update, eh?
Jeremy
More information about the asterisk-users
mailing list