Python pjsua & pjsua2

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

 



Hello,
I am trying to figure out how to answer and make calls from the
command line in python (ubuntu 18).

When trying the example python script
"pjproject-2.9/pjsip-apps/src/python/samples/simplecall.py
sip:100@127.0.0.1:5060" it fails an assertion when closing (after
pressing ENTER):

19:19:26.546           pjsua_core.c  .PJSUA state changed: CLOSING --> NULL
19:19:26.546           pjsua_core.c  .PJSUA destroyed...
python: ../src/pjsua-lib/pjsua_call.c:2389: pjsua_call_get_user_data:
Assertion `call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls'
failed.
zsh: abort (core dumped)

I set the log level to 4 to see the PJSUA agent being destroyed.
"lib.init(log_cfg = pj.LogConfig(level=4, callback=log_cb))"

Is that sample incorrect python code or a problem with pjsua_core
destroying PJSUA before pjsua_call checks
"pjsua_var.ua_cfg.max_calls"?

A similar thing happens with the sample "python/samples/call.py" if it
makes a call:
19:27:42.392      sip_transaction.c  .Stopping transaction layer module
python: ../src/pjsua-lib/pjsua_acc.c:622: pjsua_acc_get_user_data:
Assertion `pjsua_var.acc[acc_id].valid' failed.

I have read that pjsua has been deprecated, so maybe they aren't
supposed to be used anymore?

I can't find a similar "call.py" showing how to use python pjsua2 from
the command line. The "pygui" samples have GUI code and I'm looking
for an exact equivalent for the simple "call.py".  Does one exist?   I
have read the "Book" but there is no example on answering and making
calls from the command line.

_______________________________________________
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