#7 in manager.py freezes on the connection.

v 0.6
closed
None
1
2014-12-30
2014-03-09
No

in manager.py freezes on the connection.

in python 3.3 freezes on hold when the connection is made. connects to asterisk but never leaves the cycle, all the tests I did I realize that that waiting in line. the line is: 272

self._response_queue.get response = ()

from agi.asterisk import manager
m = manager.Manager()
m.connect('localhost')
m.login('mark','mark123')
# m.sipshowpeer('1000')
# m.send_action({'Action':'SIPShowPeer', 'Peer':'100'})
m.close()

Discussion

  • Ralf Schlatterbeck

    On Sun, Mar 09, 2014 at 12:19:07AM +0000, Jorge Cadena Argote wrote:

    in manager.py freezes on the connection.

    in python 3.3 freezes on hold when the connection is made. connects to
    asterisk but never leaves the cycle, all the tests I did I realize
    that that waiting in line. the line is: 272

    self._response_queue.get response = ()

    ~~~~~~
    from agi.asterisk import manager
    m = manager.Manager()
    m.connect('localhost')
    m.login('mark','mark123')

    m.sipshowpeer('1000')

    m.send_action({'Action':'SIPShowPeer', 'Peer':'100'})

    m.close()
    ~~~~~~

    Can you make a trace using wireshark or tcpdump?
    This would help me debug what is going on there.

    What version of Asterisk are you working with?

    I also have started to port this to python3 and I'm also seing hangs in
    my regression tests...

    Thanks
    Ralf
    --
    Ralf Schlatterbeck email: ralf@zoo.priv.at

     
  • Jorge Cadena Argote

    I am using asterisk 11 and 12, and python 3.3, but I found the bug is in the function '_receive_data', when a command is sent with python 2.7,

    received this:
    ['Event: SuccessfulAuth \ r \ n', 'Privilege: security, all \ r \ n']

    but when it is received with python3.3:
    ['Event: SuccessfulAuth \ n', 'Privilege: security, all \ n']

    no '\ r'

    therefore there is a good job with the list and can not queuing properly.

    I could send the basic functions well but hangs when sending the logoff, if you give me any suggestions or help, I think today I can finish the migration to python3.3

     
    Last edit: Jorge Cadena Argote 2014-03-09
  • Jorge Cadena Argote

    the change manager.py for running python3.3.

    I think more testing and bug logoff () missing, when invoked directly.

    but rest me is working well. I attached the file so that it evaluated.

    apologies not be more helpful.

     
  • Ralf Schlatterbeck

    • status: open --> closed
    • assigned_to: Ralf Schlatterbeck
     
  • Ralf Schlatterbeck

    Latest version in git does no longer block.
    I'm still not satisfied with the current solution as it asumes asterisk uses utf-8 encoding. But there currently is no way in python3.3 to work encoding-agnostic.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks