Re: Error registering account

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Correction, you have to call pjsua_init before pjsua_start, not doing it in that order will result in: "Error initializing media channel (PJ_EBUSY)"

pjsua_create();
pjsua_init(&pjsua_cfg, &log_cfg, &media_cfg);
pjsua_start();

On Mon, Aug 17, 2020 at 22:05, Paulo Pavačić <pavacic.p@xxxxxxxxx> wrote:
I've solved it, problem was that I was missing this pjsua_init(&pjsua_cfg, &log_cfg, &media_cfg); Of course I've initialized them before calling that: pjsua_config_default(&pjsua_cfg); pjsua_logging_config_default(&log_cfg); pjsua_media_config_default(&media_cfg); For others that might be reading, here is some additional info on things you have to set up: 1. pjsua_create() 2. pjsua_start() 3. pjsua_init(&pjsua_cfg, &log_cfg, &media_cfg); On Mon, Aug 17, 2020 at 20:41, Paulo Pavačić <pavacic.p@xxxxxxxxx> wrote:
Hello, I'm making PJSUA client application using pjsua/pjsip lib. I'm trying to create basic example, but I'm stuck for quite a while on following error: > 20:31:15.296 pjsua_acc.c .Acc 0: setting registration.. > 20:31:15.296 endpoint ..Request msg REGISTER/cseq=24860 (tdta0x561b55d56ac8) created. > TestApp: ../src/pjsip/sip_util_statefull.c:99: pjsip_endpt_send_request: Assertion `mod_stateful_util.id != -1' failed. This is my code: udp_cfg.public_addr = pj_str("[CLIENT_IP]"); udp_cfg.port = 5060; rtp_cfg.port = 4000; rtp_cfg.public_addr = pj_str("[CLIENT_IP]"); pjsua_transport_create(PJSIP_TRANSPORT_UDP, &udp_cfg, &udp_id); acc_config.rtp_cfg = rtp_cfg; acc_config.id = pj_str("sip:100@[SERVER_IP]"); acc_config.reg_uri = pj_str("sip:[SERVER_IP]:5060"); acc_config.cred_count = 1; acc_config.cred_info[0].scheme = pj_str("Digest"); acc_config.cred_info[0].realm = pj_str("asterisk"); acc_config.cred_info[0].username = pj_str("100"); acc_config.cred_info[0].data_type = 0; acc_config.cred_info[0].data = "" pjsua_acc_add(&acc_config, PJ_TRUE, NULL); Looking at the source code: https://svn.pjsip.org/repos/pjproject/trunk/pjsip/src/pjsip/sip_util_statefull.c It seems obvious what I need to do, but I'm not quite sure how to do that. C /* Check that transaction layer module is registered to endpoint */ PJ_ASSERT_RETURN(mod_stateful_util.id != -1, PJ_EINVALIDOP); Can I please get example on how to register transaction layer module to endpoint? Thank you for your time.
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux