Not able to control MWI subscription through PJSUA2 via AccountConfig

ZC
Zarko Coklin
Wed, Jun 15, 2016 8:17 PM

In PJSUA2 to create an account the following needs to be done:

  1. AccountConfig accCfg; // populate config

  2. Account *acc = new Account;

  3. 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

In PJSUA2 to create an account the following needs to be done: 1) AccountConfig accCfg; // populate config 2) Account *acc = new Account; 3) 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
Žarko Coklin
Wed, Jun 15, 2016 8:33 PM

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;

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;
M
Ming
Thu, Jun 16, 2016 2:06 AM

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

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 >