[Asterisk-code-review] res pjsip mwi: Add voicemail extension and mwi subscribe re... (asterisk[13])

George Joseph asteriskteam at digium.com
Fri Mar 25 20:21:29 CDT 2016


Hello Mark Michelson, Richard Mudgett, Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/2464

to look at the new patch set (#7).

Change subject: res_pjsip_mwi:  Add voicemail extension and mwi_subscribe_replaces_unsolicited
......................................................................

res_pjsip_mwi:  Add voicemail extension and mwi_subscribe_replaces_unsolicited

res_pjsip_mwi was missing the chan_sip "vmexten" functionality which adds
the Message-Account header to the MWI NOTIFY.  Also, specifying mailboxes
on endpoints for unsolicited mwi and on aors for subscriptions required
that the admin know in advance which the client wanted.  If you specified
mailboxes on the endpoint, subscriptions were rejected even if you also
specified mailboxes on the aor.

Voicemail extension:
* Added a global default_voicemail_extension which defaults to "".
* Added voicemail_extension to both endpoint and aor.
* Added ast_sip_subscription_get_dialog for support.
* Added ast_sip_subscription_get_sip_uri for support.

When an unsolicited NOTIFY is constructed, the From header is parsed, the
voicemail extension from the endpoint is substituted for the user, and the
result placed in the Message-Account field in the body.

When a subscribed NOTIFY is constructed, the subscription dialog local uri
is parsed, the voicemail_extension from the aor (looked up from the
subscription resource name) is substituted for the user, and the result
placed in the Message-Account field in the body.

If no voicemail extension was defined, the Message-Account field is not added
to the NOTIFY body.

mwi_subscribe_replaces_unsolicited:
* Added mwi_subscribe_replaces_unsolicited to endpoint.

The previous behavior was to reject a subscribe if a previous internal
subscription for unsolicited MWI was found for the mailbox.  That remains the
default.  However, if there are mailboxes also set on the aor and the client
subscribes and mwi_subscribe_replaces_unsolicited is set, the existing internal
subscription is removed and replaced with the external subscription.  This
allows an admin to configure mailboxes on both the endpoint and aor and allows
the client to select which to use.

ASTERISK-25865 #close
Reported-by: Ross Beer

Change-Id: Ic15a9415091760539c7134a5ba3dc4a6a1217cea
---
M configs/samples/pjsip.conf.sample
A contrib/ast-db-manage/config/versions/1c688d9a003c_pjsip_voicemail_extension.py
M include/asterisk/res_pjsip.h
M include/asterisk/res_pjsip_body_generator_types.h
M include/asterisk/res_pjsip_pubsub.h
M res/res_pjsip.c
M res/res_pjsip/config_global.c
M res/res_pjsip/location.c
M res/res_pjsip/pjsip_configuration.c
M res/res_pjsip_mwi.c
M res/res_pjsip_mwi_body_generator.c
M res/res_pjsip_pubsub.c
M res/res_pjsip_pubsub.exports.in
13 files changed, 287 insertions(+), 90 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/64/2464/7
-- 
To view, visit https://gerrit.asterisk.org/2464
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic15a9415091760539c7134a5ba3dc4a6a1217cea
Gerrit-PatchSet: 7
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list