The ultimate method, Pjsip initiates multiparty talkback error too many objects of the specified type (pj_etoomany)

Source: Internet
Author: User

http://blog.csdn.net/zhangjm_123/article/details/26727221

——————————————————————————————————————————————————————————————————————————————

PJSIP provides a multi-talkback function that allows the developer to set the number of party intercom to be initiated through the setmaxcalls (int calls) method, up to a maximum of 32 parties. However, many people may find that only a maximum of 4-side intercom can be set, even if the 10-side intercom Setmaxcalls (10) does not work. The reason is that when we compile the Pjsip, Pjsip is officially limited in the Pjproject source code provided to us (perhaps for other reasons), one of the most important constants Pjsua_max_calls is set to 4, that is, the maximum number of calls is 4.

We just need to modify a few lines of code in the Pjproject\pjlib\include\pj\config_site_sample.h and pjproject\pjsip\src\pjsua-lib\pjsua_core.c source files.


one of the config_site_sample.h in this line of code is 4 to limit the maximum number of multi-talkback, so just change the 4 to the value you want. But it is best not to exceed 32, the official documents are stipulated, it is best to do as required, otherwise there may be some unexpected errors.
    1. #define PJSUA_MAX_CALLS 4
in the config_site_sample.h source file above, there are multiple #define PJSUA_MAX_CALLS 4, which may be related to different platforms, anyway, if your program does not involve different platforms need to limit the maximum number of initiator to speak, All are set to the same value on the line. Such as: Set the maximum initiator to speak for 16 parties,#define Pjsua_max_calls 16.


Also, you need to modify the pjsua_core.c file:

    1. Cfg->max_calls = ((Pjsua_max_calls) < 4)? (pjsua_max_calls): 4;
Change 4 to the value you want to set, such as: Cfg->max_calls = ((Pjsua_max_calls) < 16)? (pjsua_max_calls): 16;

After changing these two files, save and recompile once pjsip. After the compilation is complete, the setmaxcalls (int calls) method works, but the arguments passed by int calls cannot be greater than the maximum value you set.

The ultimate method, Pjsip initiates multiparty talkback error too many objects of the specified type (pj_etoomany)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.