From smurf at smurf.noris.de Sun Apr 3 01:55:53 2005 From: smurf at smurf.noris.de (Matthias Urlichs) Date: Sun, 3 Apr 2005 01:55:53 +0200 Subject: [Shtoom] IPv6 addresses crash shtoom Message-ID: <20050402235553.GO15900@kiste.smurf.noris.de> Hi, dunno if that's been reported yet, but calling "sip:81 at run.smurf.noris.de" fails. Probably because that box also has an IPv6 address -- see the last line of this nice and friendly traceback. Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/shtoom/ui/gnomeui/main.py", line 62, in on_call_clicked deferred = self.app.placeCall(sipURL) File "/usr/lib/python2.4/site-packages/shtoom/app/phone.py", line 212, in placeCall return self.sip.placeCall(sipURL) File "/usr/lib/python2.4/site-packages/shtoom/sip.py", line 1154, in placeCall invite = call.startOutboundCall(uri, fromAddr=fromuri) File "/usr/lib/python2.4/site-packages/shtoom/sip.py", line 467, in startOutboundCall d = self.setupLocalSIP(uri=uri) File "/usr/lib/python2.4/site-packages/shtoom/sip.py", line 247, in setupLocalSIP self.setLocalIP(dest=(remote.host, remote.port or 5060)) File "/usr/lib/python2.4/site-packages/shtoom/sip.py", line 314, in setLocalIP useNAT = pol.checkStun(locAddress[0], remAddress[0]) File "/usr/lib/python2.4/site-packages/shtoom/stun.py", line 568, in checkStun if remoteip in net: File "/usr/lib/python2.4/site-packages/shtoom/stun.py", line 511, in check ip = self.inet_aton(ip) File "/usr/lib/python2.4/site-packages/shtoom/stun.py", line 491, in inet_aton net = [ int(x) for x in ipstr.split('.') ] + [ 0,0,0 ] ValueError: invalid literal for int(): 2001:780:0:14::1 -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf at smurf.noris.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From Adrien.DiMascio at logilab.fr Wed Apr 6 18:01:42 2005 From: Adrien.DiMascio at logilab.fr (Adrien Di Mascio) Date: Wed, 6 Apr 2005 18:01:42 +0200 Subject: [Shtoom] unicode filename breaks incoming calls Message-ID: <20050406160142.GA5382@logilab.fr> Hello, With today's SVN revision (1366), I get a traceback on incoming calls for the filename used in play_wav_file is a unicode string. It breaks deep down in std module wave when Wave_read.__init__ tries to figure out if the file passed in argument is a string or a file object. It tests for type(fp) == type('') but since fp is a unicode string, this piece of code thinks that if it is not a string, it must be an open file. A simple fix follows: [shtoom]$ svn diff Index: shtoom/app/phone.py =================================================================== --- shtoom/app/phone.py (revision 1366) +++ shtoom/app/phone.py (working copy) @@ -58,7 +58,7 @@ def play_wav_file(self, soundconfigurename): fname = self.getPref(soundconfigurename) if fname: - fullfname = self.find_resource_file(fname) + fullfname = str(self.find_resource_file(fname)) self._audio.play_wave_file(fullfname) def needsThreadedUI(self): Index: shtoom/audio/aufile.py =================================================================== --- shtoom/audio/aufile.py (revision 1366) +++ shtoom/audio/aufile.py (working copy) @@ -1,4 +1,4 @@ -import wave, sunau, aifc, sndhdr +import wave, sunau, aifc, sndhdr, types from audioop import tomono, lin2lin, ulaw2lin, ratecv import struct @@ -12,6 +12,7 @@ _freqCvt = { 8000: 160, 16000: 320, 32000: 640, 64000: 1280 } def __init__(self, fp): + assert type(fp) is types.StringType, '%s is not of StringType' % type(fp) self.fp = self.module.open(fp, 'rb') p = self.fp.getparams() print p [shtoom]$ -- Adrien Di Mascio LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From smurf at smurf.noris.de Wed Apr 6 18:30:48 2005 From: smurf at smurf.noris.de (Matthias Urlichs) Date: Wed, 6 Apr 2005 18:30:48 +0200 Subject: [Shtoom] unicode filename breaks incoming calls In-Reply-To: <20050406160142.GA5382@logilab.fr> References: <20050406160142.GA5382@logilab.fr> Message-ID: <20050406163048.GX20216@kiste.smurf.noris.de> Hi, Adrien Di Mascio: > tests for type(fp) == type('') but since fp is a unicode string, this > piece of code thinks that if it is not a string, it must be an open > file. > The correct way to do that is probably to check whether it has a read() method. Alternately, you can check if it's an instance of basestring. The types module is somewhat deprecated. -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf at smurf.noris.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From sharmi_vijay2001 at yahoo.com Wed Apr 6 08:08:08 2005 From: sharmi_vijay2001 at yahoo.com (sharmila vijaykumar) Date: Tue, 5 Apr 2005 23:08:08 -0700 (PDT) Subject: [Shtoom] How to make calls using shtoom Message-ID: <20050406060808.51298.qmail@web53203.mail.yahoo.com> Hi, i am interested in using shtoom as the softphone for my VOIP server.But i do not know how to make calls using shtoom.I have already tried Xlite with my server it works fine.Could anyone guide me with how to make & receive calls using shtoom from very bacis step. Thanks in advance, Bye,Sharmi __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250