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/src/pjsua-lib/pjsua_acc.c | |
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/src/pjsua-lib/pjsua_acc.c')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_acc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index 4bfe98c1..26ff39a7 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -328,7 +328,11 @@ PJ_DEF(pj_status_t) pjsua_acc_add( const pjsua_acc_config *cfg, /* If accounts has registration enabled, start registration */ if (pjsua_var.acc[id].cfg.reg_uri.slen) pjsua_acc_set_registration(id, PJ_TRUE); - + else { + /* Otherwise subscribe to MWI, if it's enabled */ + if (pjsua_var.acc[id].cfg.mwi_enabled) + pjsua_start_mwi(&pjsua_var.acc[id]); + } return PJ_SUCCESS; } @@ -1056,6 +1060,10 @@ static void regc_cb(struct pjsip_regc_cbparam *param) /* Send initial PUBLISH if it is enabled */ if (acc->cfg.publish_enabled && acc->publish_sess==NULL) pjsua_pres_init_publish_acc(acc->index); + + /* Subscribe to MWI, if it's enabled */ + if (acc->cfg.mwi_enabled) + pjsua_start_mwi(acc); } } else { |