pjsua.error, error = address already in use

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

 



Hello, 

I am trying to make calls using PJSIP module in python. For setup of SIP transport, I am doing like

trans_cfg = pj.TransportConfig()
# port for VoIP communication
trans_cfg.port = 5060
# local system address
trans_cfg.bound_addr = inputs.client_addr
transport = lib.create_transport(pj.TransportType.UDP,trans_cfg)

when I finish the call I am clearing the transport setup as, transport = None.

I am able to make call to user by running my program. But every time I restart my PC alone, I get an error while I run my python program

File "pjsuatrail_all.py", line 225, in <module>
   main()
File "pjsuatrail_all.py", line 169, in main
   transport = transport_setup()
File "pjsuatrail_all.py", line 54, in transport_setup
   transport = lib.create_transport(pj.TransportType.UDP,trans_cfg)
File "/usr/local/lib/python2.7/dist-packages/pjsua.py", line 2304, in 
   create_transport
   self._err_check("create_transport()", self, err)
File "/usr/local/lib/python2.7/dist-packages/pjsua.py", line 2723, in _err_check
   raise Error(op_name, obj, err_code, err_msg)
pjsua.Error: Object: Lib, operation=create_transport(), error=Address already in use
Exception AttributeError: "'NoneType' object has no attribute 'destroy'" in <bound method Lib.__del__ of <pjsua.Lib instance at 0x7f8a4bbb6170>> ignored

For this currently I am doing like

$sudo lsof -t -i:5060
>> 1137
$sudo kill 1137

Then I run my code it works fine. By instance from error, I can understand that somewhere I am not closing my transport configuration properly. Can anyone help in this regards.


Thanks,
RAADy 

_______________________________________________
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