0

I'm making an Android VoIP app using PJSUA2 library. There is one Account instance and I'm calling account.create(accountConfig) method when logging in. If I keep on giving wrong credentials, same function is called repeatedly on the same account instance. After 3 attempts, this function is giving exception.

Title: pjsua_acc_add(&pj_acc_cfg, make_default, &id) Code: 70010 Description: Too many objects of the specified type (PJ_ETOOMANY) Location: ../src/pjsua2/account.cpp:700

How can I handle this error?

Rounak
  • 301
  • 3
  • 11
  • As far as I know, the `PJ_ETOOMANY` usually has to do more with transports than accounts. Whenever you add an account, it will try creating transports. The library's hardcoded maximum of transports is 8. Feel free to look into that file `../src/pjsua2/account.cpp:700` and see what you can see/fix or contact the authors/users on the mailing list. – Shark Jun 02 '17 at 08:15
  • Thanks Shark, for the guidance. – Rounak Jun 02 '17 at 08:57
  • There is a chance i could be wrong though, will have to look in the source to be sure; I know i patched it to allow more than 8 transports and the patch isn't that big and could be found in the mailing list's archives. But i'm leaning more towards the "transport-related problem" than the "accounts-related problem"; however i'm only using one account. But in general, my tip would be that the mailing list should be your `goto` place for asking PJSIP/PJSUA questions instead of StackOverflow as there is probably more people reading it who have been involved with or just used the project. – Shark Jun 02 '17 at 09:59
  • And quite possible have the domain knowledge and are familiar with the source enough to give you better tips than people here simply flagging you for lacking a MCVE or asking `what have you tried so far` or telling you that this is not a code-writting or debugging service and blahblahblah. Hope you get it fixed, and be sure tu run `make clean; make distclean; make` after changing the PJSIP/PJSUA source in both PJSIP and PJSUA folders to see changes in the resulting library. – Shark Jun 02 '17 at 10:02
  • 1
    Finally I got it right by changing account.create() to account.modify()!! – Rounak Jun 05 '17 at 07:30

0 Answers0