Trixter aka Bret McDanel
trixter at 0xdecafbad.com
Sat Oct 24 10:17:25 PDT 2009
I got bored, so I went ahead and added the ability for scheduled events
to be assigned to a specific switch. In order for this to be
accomplished I had to add an api call "hostname" so that the script can
automagically determine which host it is running on in a cross platform
way. The patch is at http://jira.freeswitch.org/browse/MODAPP-357 for
anyone else that needs something similar. Basiscally if the switch name
is * then the first available switch will process it when the time
comes, if its anything else, then the "hostname" has to match.
In addition I added parsing of "status" information, so it will not
attempt to pull any events if the utilization is above what you have
defined for the max sessions and the session rate for your system. This
is not perfect since it does not look at actual system load nor does the
script see if the action would create a session.
In the situations where I envision this type of a scheduler being used I
think almost all of the actions would create a session, and I am also
going on the assumption that people have properly configured their
session values to be correct for the hardware they have, so this will
probably cover almost everyone in this regard.
So now people can set up a cluster of boxes to automatically rig the
american idol vote lines without overloading their boxes :) More
practical applications include doctors offices that want to program
calls a week in advance to remind patients of their appointments,
perhaps based off an ical feed like google calendar and other apps use.
Trixter http://www.0xdecafbad.com Bret McDanel
pgp key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8AE5C721
More information about the FreeSWITCH-dev