[python] Ho do I reload pj library?

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

 



Hi!

I've a question regarding the way the pj.Lib should be restarted. I
want to restart the library because the user can make some changes
regarding the media configuration, for example. I've tried this:

self.lib.delete()
self.lib = None
self.lib = pj.Lib()
self.lib.init(ua_cfg=self.cfg.ua, log_cfg=self.cfg.log,
media_cfg=self.cfg.media)
self.lib.start()

But it doesn't work, I get the following error when I try to make a
call after doing the above thing:

  File "/usr/lib/python2.5/site-packages/pjsua.py", line 1181, in make_call
    lck = self._lib().auto_lock()
AttributeError: 'NoneType' object has no attribute 'auto_lock'

Is this the correct way to restart th e lib? Or do I have to destroy
and create the transport and the account again? Thanks in advance!


-- 
Sa?l -- "Nunca subestimes el ancho de banda de un cami?n lleno de disketes."
----------------------------------------------------------------
http://www.saghul.net/



[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