pjsua2 add account error

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

 



Hi listI'm new here and I'm facing some problems while using pjsua2 api. I face the following error while i'm trying to add a new account:

../src/pjsua-lib/pjsua_acc.c:404: pjsua_acc_add: Assertion `pjsua_var.tpdata[0].data.ptr != ((void *)0)' failed.


After some debugging I figured out that account must have transport, how can I do that?

Here the routine of my code:

app_init:? ?? Endpoint ep;
 ep.libCreate(); // Initialize endpoint EpConfig ep_cfg; ep_cfg.logConfig.level = 5; ep.libInit( ep_cfg ); // Create SIP transport. Error handling sample is shown TransportConfig tcfg; tcfg.port = 5060; try? { ep.transportCreate(PJSIP_TRANSPORT_UDP, tcfg); }? catch (Error &err)? { std::cout << err.info() << std::endl; return 1; } // Start the library (worker threads etc) ep.libStart();

add_accout:? ?? // Configure an AccountConfig
 AccountConfig acfg; acfg.idUri = "sip:test at pjsip.org"; acfg.regConfig.registrarUri = "sip:pjsip.org"; AuthCredInfo cred("digest", "*", "test", 0, "secret"); acfg.sipConfig.authCreds.push_back( cred ); acfg.mediaConfig.transportConfig.port = 5060; // Create the account myAccount * macc = new myAccount; macc.create(acfg);

main :? ? app_init
? ? add_account

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20151220/87e6cb52/attachment.html>


[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