From hugohallqvist at gmail.com Sat Jun 4 22:50:43 2005 From: hugohallqvist at gmail.com (Hugo Hallqvist) Date: Sat, 4 Jun 2005 22:50:43 +0200 Subject: [Shtoom] registering to asterisk Message-ID: <992465c805060413504a0f6db@mail.gmail.com> Hello, I'm trying out shtoom on win32, I've got it up and running after a few hours of fiddling with fastaudio and stuff. Anyway my problem is that the first register-message receives just an 403 forbidden instead of 401 unauthorized. I believe I have done something wrong when setting up shtoom. I have a user on asterisk called 22 (with the same auth-user) and I have the following options in .shtoomrc: [identity] username=hugo email_address=hugohallqvist at gmail.com [register] register_uri=sip:server.hallqvist.rr.nu register_authuser=22 register_user=22 register_authpasswd=22 Do you have any immediate suggestions? There is a note in Registration.recvResponse() (line 1049) about *, however shtoom never gets there since it doesn't get a 401 or 407 but a 403 on registration. Attaching sip-conversation as taken from asterisk console: Sip read: REGISTER sip:server.hallqvist.rr.nu SIP/2.0 Via: SIP/2.0/UDP 213.114.166.49:5060;rport CSeq: 4239 REGISTER To: sip:hugo at server.hallqvist.rr.nu From: sip:hugo at server.hallqvist.rr.nu Expires: 900 Call-ID: 400854712 at 213.114.166.49 User-Agent: Shtoom/0.3alpha0 Contact: Content-Length: 0 10 headers, 0 lines Using latest request as basis request Sending to 213.114.166.49 : 5060 (non-NAT) Transmitting (no NAT): SIP/2.0 403 Forbidden Via: SIP/2.0/UDP 213.114.166.49:5060 From: sip:hugo at server.hallqvist.rr.nu To: sip:hugo at server.hallqvist.rr.nu;tag=as0d1d397a Call-ID: 400854712 at 213.114.166.49 CSeq: 4239 REGISTER User-Agent: Hallqvist Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER Contact: Content-Length: 0 Eagerly awaint your reponse. :-) //Hugo From hugohallqvist at gmail.com Sat Jun 4 23:19:58 2005 From: hugohallqvist at gmail.com (Hugo Hallqvist) Date: Sat, 4 Jun 2005 23:19:58 +0200 Subject: [Shtoom] More problems. Message-ID: <992465c80506041419724103d5@mail.gmail.com> Hello again, once i found the FAQ-link on shtoom-page I I got it to register successfully. Now I've tried to place my first call, but get an exception, attaching log below. Could the dest-member of RTPProtocol class have anything to do with the audio-device? I'm not exactly sure I got fast.py correct (it didn't work out of the box so I made a small few changes.) //Hugo 2005-06-04T23:11:49.065000 [sip] dropcall in state 'NEW' placeCall starting 2005-06-04T23:11:52.570000 [-] twisted.internet.protocol.DatagramProtocol starting on 0 2005-06-04T23:11:52.580000 [-] Starting protocol 2005-06-04T23:11:52.580000 [-] dialog is ;tag=02740138->sip:613 at fwd.pulver.com, 401881348 at 213.114.166.49> 2005-06-04T23:11:52.580000 [-] Traceback (most recent call last): File "D:\dc\shtoom\shtoom\shtoom\sip.py", line 305, in d.addCallback(lambda lhost, lport=lport, dest=dest: File "D:\dc\shtoom\shtoom\shtoom\sip.py", line 323, in _checkNATPolicy self.setupDeferred.callback((self._localIP, self._localPort)) File "C:\prgs\Python23\Lib\site-packages\twisted\internet\defer.py", line 254, in callback self._startRunCallbacks(result) File "C:\prgs\Python23\Lib\site-packages\twisted\internet\defer.py", line 315, in _startRunCallbacks self._runCallbacks() --- --- File "C:\prgs\Python23\Lib\site-packages\twisted\internet\defer.py", line 328, in _runCallbacks self.result = callback(self.result, *args, **kw) File "D:\dc\shtoom\shtoom\shtoom\sip.py", line 472, in d.addCallback(lambda x:self.startSendInvite(toAddr, init=1) File "D:\dc\shtoom\shtoom\shtoom\sip.py", line 524, in startSendInvite d = self.sip.app.acceptCall(call=self) File "d:\dc\shtoom\shtoom\shtoom\app\phone.py", line 149, in acceptCall call.getSTUNState()) File "d:\dc\shtoom\shtoom\shtoom\app\phone.py", line 162, in _createRTP rtp = RTPProtocol(self, cookie) File "D:\dc\shtoom\shtoom\shtoom\rtp\protocol.py", line 40, in __init__ self.seq = self.genRandom(bits=16) File "D:\dc\shtoom\shtoom\shtoom\rtp\protocol.py", line 353, in genRandom m.update(str(id(self.dest))) exceptions.AttributeError: RTPProtocol instance has no attribute 'dest' 2005-06-04T23:11:52.590000 [-] (Port 0 Closed) 2005-06-04T23:11:52.590000 [-] Stopping protocol 2005-06-04T23:12:03.406000 [sip] dropcall in state 'NEW' From anthony at interlink.com.au Sun Jun 5 04:11:44 2005 From: anthony at interlink.com.au (Anthony Baxter) Date: Sun, 5 Jun 2005 12:11:44 +1000 Subject: [Shtoom] More problems. In-Reply-To: <992465c80506041419724103d5@mail.gmail.com> References: <992465c80506041419724103d5@mail.gmail.com> Message-ID: <200506051211.45180.anthony@interlink.com.au> Can you include the full logfile? This shouldn't happen, I'm curious what else happened. If the logfile is large, feel free to send it just to me, rather than to the list. Anthony. -- Anthony Baxter It's never too late to have a happy childhood. From anthony at interlink.com.au Sat Jun 11 11:16:17 2005 From: anthony at interlink.com.au (Anthony Baxter) Date: Sat, 11 Jun 2005 19:16:17 +1000 Subject: [Shtoom] [Divmod-dev] Shtoom-Bugs In-Reply-To: <42A4A2CE.40802@gmx.de> References: <42A4A2CE.40802@gmx.de> Message-ID: <200506111916.20245.anthony@interlink.com.au> (cc'ing the shtoom list - shtoom at python.org) On Tuesday 07 June 2005 05:23, Jonas wrote: > - When googling for "Shtoom" the first hit points to shtoom.sf.net, > which in turn says " Shtoom's website is now hosted at Divmod.org". The > link provided points at "http://www.divmod.org/Home/Projects/Shtoom/" -> > 404. You might want to change that to http://divmod.org/projects/shtoom. Fixed. Sorry, I forgot about that entirely. > - On the homepage it says Twisted 1.3 as requirement, on the IRC channel > 2.0. On the mailing list someone mentioned that you just have to comment > out the check for 2.0 in setup.py and it will still work. Better to set > a requirement and stick to it - even though it means Debian users like > me won't be able to use it for a while. I'm still undecided about 1.3 vs 2.0 - the website does tend to lag a little (as you've probably already noticed ) > - What does the popup box "Re-Register by entering new details... > continue registering?" mean? It does not seem to serve any purpose. When > I click on "Register" I really DO want to register. That it re-registers > when I change my preferences I assume from the start. Ah - this is the wxui. It desperately needs a lot of TLC - I want to move it to using the threadedselectreactor thing. For now, the gnome UI is far and away the most polished - if you can run that, you should. The current wx UI has to go through all sorts of horrible machinations to get around the wx event loop being crackful, and it means I have much less enthusiasm to work on that UI than the others. > - The credentials preferences tab seems to serve no purpose in the GUI. > It's either empty or carries non-user-relevant configuration. That's another bit that will be going away soonish (once the new SIP code lands). It's all the options you used to have to use, but don't now. > - The config file is created under the current directory, not under the > home directory of the user I don't see this, unless you're running on Windows. The notion of a "home" directory on Windows is something I don't pretend to understand - if anyone wants to suggest something better, please let me know. The relevant code in shtoom/Options.py is: def findOptionsDir(): try: saveDir = os.path.expanduser('~%s'%os.getlogin()) except: saveDir = os.getcwd() return saveDir If this doesn't work for you, please let me know. (try "python -c 'import os; print os.path.expanduser("~%s"%os.getlogin())'" and see what it says) > - When starting Shtoom with the wx-gui without a .shtoomrc present, the > preferences windows checks "Qt" as the GUI preference. Saving and > restarting without changing the GUI-preference to "wx" leads to the > error "import qt: module not found" because the preference ui=qt has > been saved in the config file. That's obviously a problem with the wxui. I don't know when I will have time to give the wx UI a thorough going-over. If someone else wants to take on the task, let me know! Your contributions would be much appreciated. > - Clicking on the "Close"-button of the wx-GUI prints "Main loop > terminated" to stdout but the program doesn't terminate. And it still > hogs the audio. That's just wx+twisted being a horror. Hopefully threadedselectreactor will make this less suck. -- Anthony Baxter It's never too late to have a happy childhood. From jonasvp at gmx.de Wed Jun 15 15:07:01 2005 From: jonasvp at gmx.de (jonasvp at gmx.de) Date: Wed, 15 Jun 2005 15:07:01 +0200 Subject: [Shtoom] [Divmod-dev] Shtoom-Bugs Message-ID: <1576716@web.de> (cc'ing the shtoom list - shtoom at python.org) Hello Anthony, thanks for your reply. I'm looking forward to the new and improved version 0.3. Just one comment: >>- The config file is created under the current directory, not under the >>home directory of the user > > I don't see this, unless you're running on Windows. The notion of a "home" > directory on Windows is something I don't pretend to understand - if anyone > wants to suggest something better, please let me know. The relevant code in > shtoom/Options.py is: > > def findOptionsDir(): > try: > saveDir = os.path.expanduser('~%s'%os.getlogin()) > except: > saveDir = os.getcwd() > return saveDir > > If this doesn't work for you, please let me know. (try > "python -c 'import os; print os.path.expanduser("~%s"%os.getlogin())'" > and see what it says) Well, it doesn't work for me. os.getlogin() fails with OSError: [Errno 2] No such file or directory This seems to be connected with some terminals, in my case konsole, not updating utmp (http://sourceforge.net/tracker/index.php?func=detail&aid=584566&group_id=5470&atid=105470). Why don't you just use saveDir = os.path.expanduser('~') instead? And another thing: After installing shtoom, all further installs of python modules fail with these comments: --------------------------------------------------------------------- /usr/lib/python2.3/site-packages/shtoom/multicast/netnum.py:47: FutureWarning: hex/oct constants > sys.maxintwill return positive values in Python 2.4 and up B = 0xffffffff /usr/lib/python2.3/site-packages/shtoom/rtp/rtcp.py:179: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up c['fraclost'] = ((c['lost'] & 0xFF000000) >> 24)/256.0 Compiling /usr/lib/python2.3/site-packages/shtoom/test/py24tests.py ... File "/usr/lib/python2.3/site-packages/shtoom/test/py24tests.py", line 7 @arguments(IBar) ^ SyntaxError: invalid syntax --------------------------------------------------------------------- I figure it's because you're trying to run something for Python 2.4 on 2.3... Keep up the good work, I hope shtoom will become usable soonish, Jonas ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 From adam at sherman.ca Wed Jun 29 06:32:16 2005 From: adam at sherman.ca (Adam Sherman) Date: Wed, 29 Jun 2005 00:32:16 -0400 Subject: [Shtoom] First Application with doug Message-ID: <9CFD7431-D293-4A79-996F-F2A0C2A6B2F9@sherman.ca> I've been looking at doug with the thought of building some small voice applications. The sample scripts really impressed me! My first try is to build an app that takes in a call and simply forwards it back out to another destination. Simple. I'm already stuck though, getting a 404 from the shtoom app. Nothing is logged. :-( Any ideas? Thanks, A. -- Adam Sherman Technologist +1 (613) 482-2672 adam at sherman.ca