I'm a C/C++ programmer, as I know. Function could be invoked by pjsip main thread, if other thread would use these function, you should call related thread function that is supported by pjsip stack, such as(pj_thread_create for c/c++, and the thread_create function will register the thread into pjsip)
So,
-
if you want to use multi-thread, please look up thread API in pjsip and use it.
-
PJSIP stack is async model, so you can call 10 number as following, and play wav or do something when call is confirmed state.
for (i =0; i <10; i++)
{
pjsua_call();
}
发件人:pjsip-request pjsip-request@lists.pjsip.org
发送时间:2019年5月24日(星期五) 00:01
收件人:pjsip pjsip@lists.pjsip.org
主 题:pjsip Digest, Vol 141, Issue 16
Send pjsip mailing list submissions to
pjsip@lists.pjsip.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
or, via email, send a message with subject or body 'help' to
pjsip-request@lists.pjsip.org
You can reach the person managing the list at
pjsip-owner@lists.pjsip.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of pjsip digest..."
Today's Topics:
- Python pjsua2 make_call() to multiple b-numbers
(Muhammad El-Sergani)
- glibc vs uClibc and UB issue (Alexey Ermoshin)
Message: 1
Date: Thu, 23 May 2019 05:16:27 +0200
From: Muhammad El-Sergani msergani@gmail.com
To: pjsip@lists.pjsip.org
Subject: [pjsip] Python pjsua2 make_call() to multiple b-numbers
Message-ID:
CAJp6SJf5fKG7BmwW5xwXuMhFnViFa6a3orfFZNCsMxRa1gH39g@mail.gmail.com
Content-Type: text/plain; charset="utf-8"
Hello everyone,
I'm trying to create a python application that would call 10 b-numbers
concurrently using pjsua2, play a wav file and then hangup.
So far I'm able to call one b-number, but that's it.
I've tried invoking the script more than once at the same time from bash,
but I get the famous Calling pjlib from unknown/external thread. You must "
"register external threads with pj_thread_register() error.
I've tried python threading module, but that got me no where, same as above.
Is it possible to achieve what I'm asking for? If yes, help would be highly
appreciated.
If not, should I look into userless accounts? Again, how?
And if I go with userless accounts, would I be able to answer calls too?
Thanks
//M
I'm a C/C++ programmer, as I know. Function could be invoked by pjsip main thread, if other thread would use these function, you should call related thread function that is supported by pjsip stack, such as(pj_thread_create for c/c++, and the thread_create function will register the thread into pjsip)
So,
1. if you want to use multi-thread, please look up thread API in pjsip and use it.
2. PJSIP stack is async model, so you can call 10 number as following, and play wav or do something when call is confirmed state.
for (i =0; i <10; i++)
{
pjsua_call();
}
------------------------------------------------------------------
发件人:pjsip-request <pjsip-request@lists.pjsip.org>
发送时间:2019年5月24日(星期五) 00:01
收件人:pjsip <pjsip@lists.pjsip.org>
主 题:pjsip Digest, Vol 141, Issue 16
Send pjsip mailing list submissions to
pjsip@lists.pjsip.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
or, via email, send a message with subject or body 'help' to
pjsip-request@lists.pjsip.org
You can reach the person managing the list at
pjsip-owner@lists.pjsip.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of pjsip digest..."
Today's Topics:
1. Python pjsua2 make_call() to multiple b-numbers
(Muhammad El-Sergani)
2. glibc vs uClibc and UB issue (Alexey Ermoshin)
----------------------------------------------------------------------
Message: 1
Date: Thu, 23 May 2019 05:16:27 +0200
From: Muhammad El-Sergani <msergani@gmail.com>
To: pjsip@lists.pjsip.org
Subject: [pjsip] Python pjsua2 make_call() to multiple b-numbers
Message-ID:
<CAJp6SJf5fKG7BmwW5xwXuMhFnViFa6a3orfFZNCsMxRa1gH39g@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hello everyone,
I'm trying to create a python application that would call 10 b-numbers
concurrently using pjsua2, play a wav file and then hangup.
So far I'm able to call one b-number, but that's it.
I've tried invoking the script more than once at the same time from bash,
but I get the famous Calling pjlib from unknown/external thread. You must "
"register external threads with pj_thread_register() error.
I've tried python threading module, but that got me no where, same as above.
Is it possible to achieve what I'm asking for? If yes, help would be highly
appreciated.
If not, should I look into userless accounts? Again, how?
And if I go with userless accounts, would I be able to answer calls too?
Thanks
//M