Hello,
as a part of my master thesis I'm going to implement a SIP UA using
PJSIP and python.
I'm trying to use TLS for the communication (for every outgoing
messages - REGISTER, INVITE, ...).
Unfortunatly, I have the following problem:
imort pjsua as pj
[...]
trans_cfg = pj.TransportConfig(port=5061)
transport = lib.create_transport(pj.TransportType.TLS, cfg=trans_cfg)
[...]
returns with:
python: ../src/pjsua-lib/pjsua_core.c:2010: pjsua_transport_get_info:
Assertion `!"Unsupported transport"' failed.
Replacing pj.TransportType.TLS with pj.TransportType.UDP or
pj.TransportType.TCP it works well.
I also tried to establish the TLS connection by using C and it worked too.
How can I solve this problem in python?
Thanks in advance.
Regards,
Sebastian
Hi,
On 6/4/10 7:19 PM, Sebastian Hübner wrote:
Hello,
as a part of my master thesis I'm going to implement a SIP UA using
PJSIP and python.
I'm trying to use TLS for the communication (for every outgoing
messages - REGISTER, INVITE, ...).
Unfortunatly, I have the following problem:
imort pjsua as pj
[...]
trans_cfg = pj.TransportConfig(port=5061)
transport = lib.create_transport(pj.TransportType.TLS, cfg=trans_cfg)
[...]
returns with:
python: ../src/pjsua-lib/pjsua_core.c:2010: pjsua_transport_get_info:
Assertion `!"Unsupported transport"' failed.
Replacing pj.TransportType.TLS with pj.TransportType.UDP or
pj.TransportType.TCP it works well.
I also tried to establish the TLS connection by using C and it worked too.
How can I solve this problem in python?
Thanks in advance.
AFAIS in the code (pjsua_core.c) you can only create UDP or TCP
trnasports. Maybe you need to start a TCP transport and then do
something else, can't remember right now, sorry.
You may want to try SIPSIMPLE SDK, a high level API written in Pyton for
coding SIP clients (PJSIP based): http://sipsimpleclient.com
Regards,
--
Saúl Ibarra Corretgé
AG Projects