Commit Graph

30 Commits

Author SHA1 Message Date
Michael Jerris 44649c70b4 Add magic comments for emacs and vi in source and header files to properly format and display tabs vs. spaces in those editors:
/* For Emacs:
 * Local Variables:
 * mode:c
 * indent-tabs-mode:nil
 * tab-width:4
 * c-basic-offset:4
 * End:
 * For VIM:
 * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
 */


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3462 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-27 22:30:48 +00:00
Anthony Minessale 68bab16e37 make event_serialize dynamic
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3314 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-11 19:32:45 +00:00
Anthony Minessale 70bfba5b63 Christmas Presence
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3083 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-18 22:57:35 +00:00
Anthony Minessale 086676f6e9 what comes up must come down
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2555 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-07 15:15:39 +00:00
Anthony Minessale a4c778a00c fix namespace
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2548 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-07 14:23:31 +00:00
Anthony Minessale 47192db741 Upgrade Dingaling to meet new googletalk spec upgrade your client if you have issues.
codecs need more work...

Expose events into javascript so you can create and fire events and 
and pick up chat events with chat-enabled clients like googletalk
EXAMPLE:

session.answer();

e = new Event("custom", "JS::Custom");
e.addHeader("subject", "cool");
e.addBody("hello this is a test");
e.fire;

while(session.ready()) {
    session.execute("sleep", "1000");
    event = session.getEvent();
    if (event) {
      str = event.serialize(); // or ("xml")
      console_log("debug", "Dump Event:\n" + str + "\n");


        e = new Event("custom", "JS::Chat");
        e.addHeader("works", "yes");
        e.addBody("you said: " + event.getBody());
        session.sendEvent(e);
      event.destroy();
    }
}





git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2323 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-18 01:28:50 +00:00
Anthony Minessale 9c79c2a3fb Add mod_event_socket remote client module and sample client.
To Test:

uncomment or add from modules.conf
make installall again to compile it
uncomment the load line from freeswitch.xml

the default values are to bind to 127.0.0.1 port 8021

telnet to port 8021
enter "auth ClueCon" to authenticate

from here you can do the following:
*) events [xml|plain] <list of events to log or all for all>
*) noevents 
*) log <level> // same as the console.conf values
*) nolog
*) api <command> <arg>
*) exit

there is a perl client in scripts/socket called fs.pl

with the module up and loaded:
cd scripts/socket
perl fs.pl <optional log level>

you can enter a few api commands like "show or status"




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2047 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-22 21:49:52 +00:00
Anthony Minessale 295424544d update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1425 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 19:07:38 +00:00
Michael Jerris 14fee78470 part 3 of 3 standardizing typedefed types to end in _t.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1300 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-29 23:43:28 +00:00
Michael Jerris 73a3adac8f part 2 of many standardizing typedefed types to end in _t
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1294 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-29 06:05:03 +00:00
Michael Jerris d0347b2a95 part 1 of many standardizing typedefed types to end in _t
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1292 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-29 01:00:52 +00:00
Michael Jerris 751ca005d3 use macro for EXTERN "C" begin and end lines in header files to clean up the headers, and to eliminate a format bug in emacs.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1291 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-28 20:04:08 +00:00
Anthony Minessale e2cae5587c dox
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1126 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-12 16:34:34 +00:00
Anthony Minessale 64507e70ca icc changes part 1
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@982 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-03-30 23:02:50 +00:00
Michael Jerris 07a6d60efb add missing } for extern C
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@915 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-03-24 21:28:46 +00:00
Anthony Minessale 7174e8ae8a add high and low priority event queues
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@674 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-02-26 00:12:17 +00:00
Anthony Minessale a4d3a30ac2 what's up doc
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@280 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-01-05 21:03:22 +00:00
Michael Jerris 900c08571b and a few corrections to the docs.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@260 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-01-03 00:48:52 +00:00
Michael Jerris f78b600507 initial doxygen. Much, much more to go.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@251 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-01-01 15:23:12 +00:00
Anthony Minessale f3d711ccae event cleanup from windows perspective
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@204 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-23 21:09:36 +00:00
Anthony Minessale 32273a0c3f xmppmas
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@196 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-23 02:24:56 +00:00
Anthony Minessale 6949227ca1 more events and some build changes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@188 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-21 22:25:22 +00:00
Anthony Minessale 146b99e1d6 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@184 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-21 16:24:37 +00:00
Anthony Minessale ab0b99eb00 more event stuff
you should now be able to bind an event handler to a 
paticiular file or function not just a paticular event
when using the custom event 

like "file:somefile.c"
or "func:somefunc"

also events now have headers which can be added 
with varargs and should be created and delivered with api calls


switch_event *event;

regular event:
if (switch_event_create(&event, SWITCH_EVENT_STARTUP) == SWITCH_STATUS_SUCCESS) {
	switch_event_add_header(event, "event_info", "System Ready");
	switch_event_fire(&event);
}

custom event:
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, "some_subclass_string") == SWITCH_STATUS_SUCCESS) {
	switch_event_add_header(event, "event_info", "hello world %d", 42);
	switch_event_fire(&event);
} 

switch_event_add_header(event, "test %d", 42);

also you can serialize and event into a buffer in
a printable/transferrable format with optional body

char buf[1024];

with body:
switch_event_serialize(event, buf, sizeof(buf), "This is a body my favorite number is %d", 42);

no body:
switch_event_serialize(event, buf, sizeof(buf), NULL);






git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@173 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-19 19:57:32 +00:00
Anthony Minessale 2a58e2038a yet more rearrangment of events ;-)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@172 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-19 18:55:31 +00:00
Anthony Minessale b09fedf7e0 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@158 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-15 20:20:57 +00:00
Anthony Minessale 48e62491e1 make eventing cooler, yeah I know it's only 1 day old but... *shrug*
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@156 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-15 19:10:43 +00:00
Anthony Minessale 230c5012a6 more event code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@153 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-14 22:46:09 +00:00
Anthony Minessale e16f28d529 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@151 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-14 20:22:19 +00:00
Anthony Minessale 2620e0aa30 events
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@131 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-13 20:52:33 +00:00