Skip to content
Snippets Groups Projects
  • George Joseph's avatar
    e2524fce
    res_pjsip_mwi: Add voicemail extension and mwi_subscribe_replaces_unsolicited · e2524fce
    George Joseph authored
    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
    e2524fce
    History
    res_pjsip_mwi: Add voicemail extension and mwi_subscribe_replaces_unsolicited
    George Joseph authored
    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