In PJSUA2 to create an account the following needs to be done:
AccountConfig accCfg; // populate config
Account *acc = new Account;
acc->create(accCfg)
Account::create is given below:
void Account::create(const AccountConfig &acc_cfg,
bool make_default) throw(Error)
{
pjsua_acc_config pj_acc_cfg;
acc_cfg.toPj(pj_acc_cfg);
pj_acc_cfg.user_data = (void*)this;
PJSUA2_CHECK_EXPR( pjsua_acc_add(&pj_acc_cfg, make_default, &id) );
}
The problem Account::toPj does not initialize mwi_enabled parameter, therefore it is not possible to control MWI subscription through PJSUA2 API. The following line should be added to Account::toPj method.
ret.mwi_enabled = mwiConfig.enabled;
BTW, how do one create and open ticket on the PJSIP web site? I could not find a way to do it.
Regards,
Zarko
To be completely accurate the following two lines need to be added to Account::toPj:
ret.mwi_enabled = mwiConfig.enabled;
ret.mwi_expires = mwiConfig.expirationSec;
Hi Zarko,
Thanks for the report. We committed your fix in r5346
(https://trac.pjsip.org/repos/changeset/5346).
Best regards,
Ming
On Thu, Jun 16, 2016 at 4:33 AM, Žarko Coklin zcoklin@hotmail.com wrote:
To be completely accurate the following two lines need to be added to
Account::toPj:
ret.mwi_enabled = mwiConfig.enabled;
ret.mwi_expires = mwiConfig.expirationSec;
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org