Ticket #982 (closed enhancement: fixed)

Opened 7 years ago

Last modified 7 years ago

Support for SIP Message Summary/Message Waiting Indication (MWI, RFC 3842)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.5
Component: common Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp) (diff)

Add support for Message Summary/Message? Waiting Indication (MWI, RFC 3842). Two types of MWI events are supported: MWI with subscription and unsolicited MWI (unsolicited means NOTIFY is sent without subscription).

Specification:

  • implement pjsip evsub package for MWI
  • client and server support
  • unsolicited MWI support
  • support in PJSUA-LIB
  • NOTIFY message body is unprocessed; they will be given to app unparsed.

New files in pjsip-simple:

  • mwi.h
  • mwi.c

Support in PJSUA-LIB:

  • "mwi_enabled" field in pjsua account config (default is disabled)
  • "on_mwi_info" callback
  • "enable_unsolicited_mwi" in pjsua_config (default is enabled)
  • if MWI subscription is terminated for some reason, PJSUA-LIB will renew periodically (PJSUA_PRES_TIMER timer)

PJSUA application:

  • new "--mwi" option
  • print MWI info on the callback

To implement MWI support in your application:

  1. implement on_mwi_info() callback
  2. at this point, any unsolicited incoming NOTIFY requests containing MWI will cause on_mwi_info() callback to be called, unless enable_unsolicited_mwi is explicitly disabled in pjsua_config.
  3. if you'd like to use MWI subscriptions, set mwi_enabled to TRUE in pjsua_acc_config

Change History

comment:1 Changed 7 years ago by bennylp

  • Description modified (diff)

comment:2 Changed 7 years ago by bennylp

  • Status changed from new to closed
  • Resolution set to fixed

Implemented in r2968:

  • PJSIP-SIMPLE:
    • implement MWI
  • PJSUA-LIB:
    • added "mwi_enabled" flag in account config
    • added "on_mwi_info" callback
  • pjsua app:
    • added "--mwi" option to enable MWI on account
    • added simple callback to log the NOTIFY message
  • other:
    • added SIPp scenario files to simulate UAS side
  • build:
    • added MWI support on VS6, VS2005, MMP, and Makefile

comment:3 Changed 7 years ago by bennylp

In r2974:

  • updated VS6 project with the (missing) mwi.[hc] files

comment:4 Changed 7 years ago by bennylp

In r2976:

  • added MWI support for Python

comment:5 Changed 7 years ago by bennylp

  • Description modified (diff)

In r3019:

  • added support for Asterisk unsolicited MWI requests in pjsua application (new "--unsolicited-mwi" option)

comment:6 Changed 7 years ago by bennylp

In r3021:

  • undo r3019 which put unsolicited MWI support in pjsua app only
  • put the unsolicited MWI support in PJSUA-LIB instead
  • unsolicited MWI is by default enabled
  • on_mwi_info() callback will be called just as the solicited MWI version

comment:7 Changed 7 years ago by bennylp

  • Description modified (diff)

comment:8 Changed 7 years ago by bennylp

  • Description modified (diff)

comment:9 Changed 7 years ago by bennylp

  • Description modified (diff)

comment:10 Changed 7 years ago by bennylp

  • Description modified (diff)
Note: See TracTickets for help on using tickets.