]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_mwi: Allow subscribe to vm access extension as an alias 98/2498/1
authorGeorge Joseph <george.joseph@fairview5.com>
Wed, 30 Mar 2016 17:38:47 +0000 (11:38 -0600)
committerGeorge Joseph <george.joseph@fairview5.com>
Wed, 30 Mar 2016 19:34:09 +0000 (13:34 -0600)
commit2b3261cd36f48437fe82eae3fb0a8eea1f292e2e
treecbe873d4b660d178cf1936ddb05cb2d539852e9a
parente2524fcee350e4336e67888a26c5f9656afe7d06
res_pjsip_mwi:  Allow subscribe to vm access extension as an alias

Background:

If your extension is 1000 and the voicemail access extension is 1571 and you
dial 1571, usually a dialplan rule calls voicemailmain with your extension and
you are placed directly in your mailbox.  Therefore most admins program the
voicemail (or other speed dial) button on their phones to the access extension.
Some phones (Snom at least) use whatever is programmed there to also subscribe
for MWI and so can't dial one number and subscribe to another.  This works fine
in chan_sip because chan_sip completely ignores the user portion of the
SUBSCRIBE message request URI.  If it can match the peer, is subscribes to the
peer's mailbox.  The user could be set to anything or nothing and you'd still
get subscribed to your mailbox.

Issue:

chan_pjsip actually uses the user portion of the URI to find an aor and its
mailboxes.  Therefore a subscribe to 1571 results in a 404.  Sure, you can
create an aor for 1571 but you certainly can't add your entire voicemail
system's mailboxes to it and everyone would get notified of every MWI.

Solution:

When an MWI subscribe comes in and an aor can't be found that matches the
resource directly, check the resource against the endpoint's aors.  If an aor
is found that has a voicemail_extension that matches the resource, use it.

ASTERISK-25865
Reported-by: Ross Beer
Change-Id: I770ea185f751f1ada888fafb4b452115f1c06e9e
res/res_pjsip_mwi.c