[SIP SIMPLE client] A usable version

Willem Toorop willem at ahk.nl
Sun Jan 25 13:03:22 CET 2009


2009/1/25 Adrian Georgescu <ag at ag-projects.com>

> Is it possible that you are not using the latest sipclient library from
> darcs, also your code seem to use some an old version of it (like eventlet,
> msrplib)?


This was indeed the case.

Attached I have my modifications merged in the new version, but the new
version from darcs doesn't work either. Now, not even when I try the
original sip_im_session programs.

The client says:
willem at tijdelijk:~$ sip_im_session 2233361709 at sip2sip.info
Accounts available: default
Using default account: 2233361583 at sip2sip.info
Domain proxy.sipthor.net has no DNS SRV record, attempting DNS A record
lookup
Resolved DNS A record "proxy.sipthor.net" --> 85.17.186.7, 81.23.228.150,
81.23.228.129
Registering "Willem Toorop"
<sip:2233361583 at sip2sip.info<sip%3A2233361583 at sip2sip.info>>
at 81.23.228.129:5060
Registered SIP contact address:
sip:OEWUNTxlba at 192.168.178.33:36868;transport=udp
(expires in 300 seconds)
Press Ctrl-d to quit or Control-n to switch between active sessions
Initiating SIP session from "Willem Toorop"
<sip:2233361583 at sip2sip.info<sip%3A2233361583 at sip2sip.info>>
to sip:2233361709 at sip2sip.info <sip%3A2233361709 at sip2sip.info> through proxy
81.23.228.129:5060...
Early SIP session to
sip:2233361709 at sip2sip.info<sip%3A2233361709 at sip2sip.info>(180
Ringing)
Ringing from sip:61f0ssEoQC at 82.95.141.127:38830(ag-projects/sipclient-0.4.0-pjsip-1.0.1-r2427)
Disconnected SIP session to
sip:2233361709 at sip2sip.info<sip%3A2233361709 at sip2sip.info>(486 Busy
Here)
Connection to sip:2233361709 at sip2sip.info
<sip%3A2233361709 at sip2sip.info>FAILED: DISCONNECTED 486 Busy Here
Traceback (most recent call last):
  File
"/usr/lib/python2.5/site-packages/eventlet-0.9pre-py2.5.egg/eventlet/hubs/twistedr.py",
line 245, in run
    self.mainLoop(reactor)
  File
"/usr/lib/python2.5/site-packages/eventlet-0.9pre-py2.5.egg/eventlet/hubs/twistedr.py",
line 263, in mainLoop
    reactor.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib/python2.5/site-packages/twisted/internet/base.py", line
705, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File
"/usr/lib/python2.5/site-packages/eventlet-0.9pre-py2.5.egg/eventlet/proc.py",
line 330, in _do_send
    link(self.name, tag, value)
exceptions.TypeError: <lambda>() takes exactly 1 argument (3 given)
Chat to 2233361709 at sip2sip.info:

The server:
haplo at tijdelijk:~$ sip_im_session
Accounts available: default
Using default account: 2233361709 at sip2sip.info
Domain proxy.sipthor.net has no DNS SRV record, attempting DNS A record
lookup
Resolved DNS A record "proxy.sipthor.net" --> 85.17.186.7, 81.23.228.150,
81.23.228.129
Registering "Haplo Toorop"
<sip:2233361709 at sip2sip.info<sip%3A2233361709 at sip2sip.info>>
at 81.23.228.150:5060
Registered SIP contact address:
sip:61f0ssEoQC at 192.168.178.33:38830;transport=udp
(expires in 300 seconds)
Press Ctrl-d to quit or Control-n to switch between active sessions
Waiting for incoming SIP session requests...
Traceback (most recent call last):
  File
"/usr/lib/python2.5/site-packages/eventlet-0.9pre-py2.5.egg/eventlet/hubs/twistedr.py",
line 245, in run
    self.mainLoop(reactor)
  File
"/usr/lib/python2.5/site-packages/eventlet-0.9pre-py2.5.egg/eventlet/hubs/twistedr.py",
line 263, in mainLoop
    reactor.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib/python2.5/site-packages/twisted/internet/base.py", line
705, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File
"/usr/lib/python2.5/site-packages/eventlet-0.9pre-py2.5.egg/eventlet/coros.py",
line 370, in _do_acquire
    waiter.switch()
  File
"/usr/lib/python2.5/site-packages/eventlet-0.9pre-py2.5.egg/eventlet/proc.py",
line 419, in _run
    result = function(*args, **kwargs)
  File "/usr/bin/sip_im_session", line 466, in _accept_incoming_loop
    handler.wait_and_handle(self.engine)
  File "/usr/lib/python2.5/site-packages/pypjua/enginebuffer.py", line 128,
in wait_and_handle
    session = self.handle(inv, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/pypjua/enginebuffer.py", line 122,
in handle
    return handler.handle(inv, *args, **kwargs)
  File "/usr/bin/sip_im_session", line 199, in handle
    if consult_user(inv, self._ask_user)==True:
  File "/usr/bin/sip_im_session", line 177, in consult_user
    link = inv.call_on_disconnect(lambda *_args: ask_job.kill())
  File "/usr/lib/python2.5/site-packages/pypjua/enginebuffer.py", line 474,
in call_on_disconnect
    return self._queue.link(listener)
  File "/usr/lib/python2.5/site-packages/pypjua/eventletutil.py", line 43,
in link
    link = self.getLink(listener)
  File "/usr/lib/python2.5/site-packages/pypjua/eventletutil.py", line 62,
in getLink
    return proc.LinkToCallable(listener)
exceptions.AttributeError: 'module' object has no attribute 'LinkToCallable'
2233361709 at sip2sip.info>
Early SIP session to "Willem Toorop"
<sip:2233361583 at sip2sip.info<sip%3A2233361583 at sip2sip.info>
>
Rejected SIP session to "Willem Toorop"
<sip:2233361583 at sip2sip.info<sip%3A2233361583 at sip2sip.info>
>
Rejected SIP session to "Willem Toorop"
<sip:2233361583 at sip2sip.info<sip%3A2233361583 at sip2sip.info>
>
Traceback (most recent call last):
  File "/usr/bin/sip_im_session", line 627, in <module>
    main()
  File "/usr/bin/sip_im_session", line 620, in main
    start(options, console)
  File "/usr/bin/sip_im_session", line 527, in start
    readloop(console, manager, get_commands(manager),
get_shortcuts(manager))
  File "/usr/bin/sip_im_session", line 555, in readloop
    for type, value in console:
  File "/usr/lib/python2.5/site-packages/pypjua/clients/consolebuffer.py",
line 335, in next
    return self.recv()
  File "/usr/lib/python2.5/site-packages/pypjua/clients/consolebuffer.py",
line 253, in recv
    return self._receive()
  File "/usr/lib/python2.5/site-packages/pypjua/clients/consolebuffer.py",
line 245, in _receive
    return self.channel.receive()
  File "/usr/lib/python2.5/site-packages/pypjua/clients/consolebuffer.py",
line 52, in receive
    return self.output.wait()
  File
"/usr/lib/python2.5/site-packages/eventlet-0.9pre-py2.5.egg/eventlet/coros.py",
line 1084, in wait
    self.sem.acquire()
  File
"/usr/lib/python2.5/site-packages/eventlet-0.9pre-py2.5.egg/eventlet/coros.py",
line 352, in acquire
    api.get_hub().switch()
  File
"/usr/lib/python2.5/site-packages/eventlet-0.9pre-py2.5.egg/eventlet/hubs/twistedr.py",
line 226, in switch
    return self.greenlet.switch()
eventlet.proc.LinkedFailed: linked proc '<bound method
ChatManager._accept_incoming_loop of <__main__.ChatManager instance at
0x8940d2c>>' failed with AttributeError
haplo at tijdelijk:~$

I also updated eventlet_twisted and python-msrplib. That does not make a
difference either.

If I were you I would try to find the wav files automatically.


Okay... would you like me to write an alternative to the get_path function
in site-packages/pypjua/clients/clientconfig.py ?

Willem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20090125/5fe2e544/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sip_im_session
Type: application/octet-stream
Size: 27500 bytes
Desc: not available
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20090125/5fe2e544/attachment-0014.obj>


More information about the SIPBeyondVoIP mailing list