Wednesday, November 25, 2009

StreamHarvester-0.1

I've been working on StreamHarvester for the past one week. Last night I've created and made Streamharvester-0.1 available for windows. It is currently hosted google code.

http://code.google.com/p/streamharvester/

StreamHarvester is a cross-platform internet radio and TV recoder.StreamHarverster works with Shoutcast and Icecast streams. You can record multiple streams simultaneously, also you can relay a stream locally while recording it. So that you can listen to the stream in an external media player like VLC , Windows media player.

It can handle various media format and playlist formats.

Supported Media formats

  1. mp3
  2. ogg
  3. nsv
Supported Playlist formats

  1. pls
  2. m3u
which means while adding a job you can paste playlist URLs directly into the program. And it will automatically retrieve media from URLs available in playlist. Also StreamHarvester will automatically fallback to next available URL in a playlist in case of any URL fails.

Visit project page to know more about it and to freely download and try it.

Friday, October 10, 2008

starpy-1.0.0a13 Released (Asterisk protocols for twisted)

Today I did a new release of starpy. (Asteirsk protocols for Twisted ) which can be downloaded from here https://sourceforge.net/project/showfiles.php?group_id=164040

This release contains addition of many manager commands to manager API. Following is a list of newly added commands.

  1. agentLogoff
  2. dbGet
  3. dbPut
  4. extensionState
  5. getConfig
  6. meetmeMute
  7. meetmeUnmute
  8. park
  9. pauseMonitor
  10. playDTMF
  11. queuePause
  12. sipShowPeers
  13. unpauseMonitor
  14. updateConfig (read AMI documentation before using this )
  15. userEvent
  16. waitEvent
  17. zapDNDoff
  18. zapDNDon
  19. zapDialOffhook
  20. zapHangup
  21. zapRestart
  22. zapShowChannels
  23. zapTransfer
Those are all the new manager Actions that were added. Queues action is there but it won't work cause AMI returns improperly formatted lines, same case with IAXPeers action, as AgentCallbackLogin is deprecated and is not functioning properly it was not included.

Bug fix in queueStatus manager api, in collectDeferred argument 'QueueStatusEnd' is changed to 'QueueStatusComplete'. Now the deferred fires properly.

Bug fix in fastagi playback (not a standard AGI command, was created by Mike as a workaround for buggy streamFile command back in Asterisk 1.2 days. Now streamFile is working properly so you might not be using this playback ).

Those are all the changes that involved in this release if you find any bugs or hope for any features let me know.

Have fun with starpy.

Saturday, May 24, 2008

Zaptel to DHADI

Due to trademark issues with the name Zaptel digium has announced change in the name,DHADI (Digium Asterisk Hardware Device Interface ) name sounds funny while trying to be serious

http://blogs.digium.com/2008/05/19/zaptel-project-being-renamed-to-dahdi/

Thursday, January 3, 2008

RoR - Rants on Rails

Today there was a long long rant on rails & its community that got slashdotted. He got strong feelings against rails community and says when he hangs around with Django or other python related stuff people are nice to him!

At least in my experience python and python related frameworks communities is been so nice.

Here is the full rant

http://www.zedshaw.com/rants/rails_is_a_ghetto.html

And this is how I got the news from #twisted

(10:36:30 IST) Jerub: you know that rant about RoR that got on slashdot today?
(10:36:35 IST) Jerub: the dude is in #python
(10:37:21 IST) glyph: Jerub: Ask him if now that he's f***ed in the Ruby community he wants to maintain a Python webserver.
(10:38:08 IST) Jerub: ask him yourself, slacker.
(10:40:15 IST) dash: Jerub: yeah. I just got to that part :)
(10:41:50 IST) glyph: Jerub: hey, you're my *connection* man; I don't know nothin about no #python no more
(10:44:03 IST) jml: MFen: is that like DM of the Rings?
(10:46:50 IST) jml: MFen: DM of the Rings is better
(10:48:36 IST) MFen: i haven't seen DM of the rings, that sounds good
(10:52:20 IST) MFen: Jerub: and asking about Django
(10:52:22 IST) Jerub: glyph: which web server did you mean?
(10:52:32 IST) Jerub: web, web2, or some divmod thing?
(10:52:33 IST) MFen: just don't tell him about twisted, please
(10:52:55 IST) Jerub: dm of the rings is complete, which is nice.
(10:52:58 IST) glyph: Jerub: all of the above
(10:53:41 IST) glyph: Jerub: the problem being that "all of the above" is the answer, I need someone to make 2 of those options go away :)
(10:54:26 IST) MFen: glyph: and some collateral damage to take out 6 or 7 other python web frameworks would be nice
(10:54:36 IST) glyph: MFen: hehe

Atleast people are not flaming each other here.

Saturday, December 22, 2007

Tcl/Tk 8.5.0

At last after a long long time, Tcl/Tk8.5 was released. I am not a Tcl programmer! But what is in there for python programmers is the Tk8.5 with the theming engine Tile, which the Tkinter world is waiting for a long long time. Though some wrappers to Tile appeared on personal and sourceforge site, I was eager to see what is going to be there in final release.
Though I myself has started moving to wxPython . Whenever I look at Tkinter (Tk) I get that nostalgic feeling for it. Tkinter is the first GUI toolkit I've tried and I should say it made the GUI programming a lot of fun.

Wednesday, December 12, 2007

How to bulid Click2Call

With the advent of VoIP and computer telephony integration, one feature that have popped up is Click2Call. Its a convenient way to initiate a call with people whom you want to talk to by just clicking on their number in Outlook or on some webpage etc etc. Vonage has this feature for their service.

Lets see how we can achieve this with Asterisk. Asterisk provides Originate AMI action for this. Just call the Originate action with the numbers you want to connect. Here is the twisted code on how you can do it ( You need starpy to do it). The following dirty example integrates http with AMI where by hitting the url some thing like http://localhost:8000?number=12322342345&ext=234 will do the magic needed. The same way you integrate this with any other protocol you think that it useful to you. After all twisted supports tons of those.


#!/usr/bin/python


from starpy import manager
from starpy.manager import AMIFactory
from twisted.internet import reactor
from twisted.web import server,resource

import logging

logging.basicConfig()
log = logging.getLogger("Click2Call")
log.setLevel(logging.DEBUG)
manager.log.setLevel(logging.DEBUG)

class Click2CallProtocol(object):
def __init__(self):
pass
def onConnect(self,ami):
log.info("Logged in successfully")
self.ami = ami

def dial(self,number,ext):
try:
self.ami.originate(channel='Local/'+number+"/n",context='mycontext',priority='1',exten=ext,async=True)
return True
except:
return False



class Click2CallFactory(AMIFactory):

def __init__(self):
AMIFactory.__init__(self,"mark","mysecret")

def connect(self):
df = self.login("127.0.0.1")
df.addCallback(c2cp.onConnect)

def clientConnectionLost(self,connector,reason):
log.info("We lost connection trying reconnect")
reactor.callLater(1,self.connect)

def clientConnectionFailed(self,connector,reason):
log.info(reason)
reactor.callLater(1,self.connect)

class Click2CallResource(resource.Resource):

def render(self,request):
try:
number = request.args['number'][0]
agent = request.args['ext'][0]
except:
return "Required arguments not found"
if c2cp.dial(number,agent):
return "OK"
else:
return "NOTOK"

c2cp = Click2CallProtocol()
c2cf = Click2CallFactory()
c2cf.connect()

root = Click2CallResource()
root.putChild("",root)
site = server.Site(root)

reactor.listenTCP(8000,site,)
reactor.run()

Linux For Ladies

Get the full story from here

http://princessleia.com/journal/?p=1214

Recently in my free time when I was reading some blogs I have stumbled upon the topic women in open source world. Amazingly I've found that lots of things are happening on that front. All most all the major projects are now having women's section.

http://women.debian.org
http://women.kde.org/
http://live.gnome.org/GnomeWomen
http://linuxchix.com

Those are a few to quote. When I've read the document of debian women's site on whats the cause for so few women in opensource world is, I've found the document saying sexism to be the major force driving women away from the opensource. It suggests to keep mouth shut and pay no special attention to women in linux groups or mailing lists if possible you can help and encourage as you usually do with a male geek. What I think is for almost all of the guys its some thing they have to try, its not the default behavior.