diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-10-26 11:21:37 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-10-26 11:21:37 +0000 |
commit | 058d9c4c6d15338e1d3b2e05ffea340eec565d9a (patch) | |
tree | f2e22ada6b8929a60cf842f83a870c1a3d2bd921 /pjsip/include/pjsua-lib/pjsua.h | |
parent | 295cdeb355d07347f2ba1f4a66ae144fee5efbf7 (diff) |
Implement ticket #982: Support for SIP Message Summary/Message Waiting Indication (MWI, RFC 3842)
- 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
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2968 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsua-lib/pjsua.h')
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 356cab76..a8bb2f39 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -379,6 +379,17 @@ PJ_DECL(void) pjsua_logging_config_dup(pj_pool_t *pool, /** + * Structure to be passed on MWI callback. + */ +typedef struct pjsua_mwi_info +{ + pjsip_evsub *evsub; /**< Event subscription session, for + reference. */ + pjsip_rx_data *rdata; /**< The received NOTIFY request. */ +} pjsua_mwi_info; + + +/** * This structure describes application callback to receive various event * notification from PJSUA-API. All of these callbacks are OPTIONAL, * although definitely application would want to implement some of @@ -821,6 +832,17 @@ typedef struct pjsua_callback const pjsip_uri *target, const pjsip_event *e); + /** + * This callback is called when a NOTIFY request for message summary / + * message waiting indication is received. + * + * @param acc_id The account ID. + * @param mwi_info Structure containing details of the event, + * including the received NOTIFY request in the + * \a rdata field. + */ + void (*on_mwi_info)(pjsua_acc_id acc_id, pjsua_mwi_info *mwi_info); + } pjsua_callback; @@ -1860,6 +1882,14 @@ typedef struct pjsua_acc_config pj_str_t reg_uri; /** + * Enable message summary and message waiting indication subscription + * (RFC 3842) for this account. + * + * Default: no + */ + pj_bool_t mwi_enabled; + + /** * If this flag is set, the presence information of this account will * be PUBLISH-ed to the server where the account belongs. * |