]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_mwi: Allow subscribe to vm access extension as an alias 97/2497/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:31:38 +0000 (13:31 -0600)
commit16c7d8e74a9af13f98c3c22aa9c43ce39965f6b7
treee34a3ea92f2dce78f768d716f23568460196a41b
parentd8f0bc35729466c44181dab6f25da5891e8ce694
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