Hello Zarko, I have found a solution for me for that case. For me I have overwritten the create and modify method from Account so I can store AccountConifg in my VOIPAccount. class VOIPAccount : public pj::Account { public: explicit VOIPAccount();
virtual void onRegState(pj::OnRegStateParam &prm); virtual void onRegStarted(pj::OnRegStartedParam &prm); virtual void onIncomingCall(pj::OnIncomingCallParam &iprm);
void create(const pj::AccountConfig &cfg, bool make_default=false); }; void VOIPAccount::create(const pj::AccountConfig &cfg, bool make_default) { printf( "Account CREATED!!!\n" ); // Do some stuff with AccountConfig pj::Account::create( cfg, make_default ); } Maybe you can do it too? Or someone knows a better solution for that :D Kind Regards, Carsten Von: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] Im Auftrag von Zarko Coklin Hi all! AccountConfig is used to create an Account in PJSIP. I expected if I have a pointer to Account it would be easy to retrieve AccountConfig using PJSUA2 API. However, that does not seem to be the case. Am I missing something? For example, if the account is already created and I have to change Proxy Server address, users of PJSUA2 are forced to go through Account::modify method which requires a whole AccountConfig structure to be passed in. Would it not be better to be able to get a reference of the AccountConfig structure used to create an account, change parameter here and there, invoke Account::modify and be done? Regards, Zarko
|
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org