Commit Graph

326 Commits

Author SHA1 Message Date
Anthony Minessale ffb989e435 tear the hell out of everything and rip it up into itsy bitsy pieces and put it all back together
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5765 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-09-29 01:06:08 +00:00
Michael Jerris 5bea2ea06c svn:eol-style properties, and make eol-style consistent in some files.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5738 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-09-21 18:49:14 +00:00
Michael Jerris f1222ba2fd fix for FSCORE-40
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5566 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-08-03 21:29:01 +00:00
Anthony Minessale d04d8ffea1 fix startup race
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5502 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-07-06 16:29:25 +00:00
Anthony Minessale b2b4db1473 rm newline
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5309 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-06-12 01:24:29 +00:00
Anthony Minessale bcd32125d0 dox
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5176 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-14 17:10:46 +00:00
Michael Jerris 606199ff20 create macro to define scheduler function prototypes.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5168 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-12 21:43:41 +00:00
Michael Jerris a4ff7e88da adding const qualifiers across the api as appropriate.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5165 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-12 14:48:14 +00:00
Anthony Minessale fc85172efd update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5141 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-11 00:30:23 +00:00
Anthony Minessale ab34a26079 make crash protection a runtime option instead of a compile-time option
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5123 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-10 16:56:29 +00:00
Anthony Minessale 5d09c438ac update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5046 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-30 23:56:27 +00:00
Michael Jerris 9b1f96a8fc fix windows build
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4892 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-08 16:16:00 +00:00
Anthony Minessale 3f6520a559 added patch from http://jira.freeswitch.org/browse/FSCORE-25
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4881 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-07 03:07:43 +00:00
Anthony Minessale 101fd38e09 fix race
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4810 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-30 17:25:48 +00:00
Anthony Minessale 33efc5eeb5 tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4805 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-30 14:57:06 +00:00
Michael Jerris d292e9de4f don't export our private functions. fix crash protection build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4803 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-30 02:20:13 +00:00
Anthony Minessale c15d7892c0 indent again
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4799 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-30 00:15:25 +00:00
Anthony Minessale debdfb1aab indent
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4798 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-30 00:13:31 +00:00
Anthony Minessale 3a54126261 spring cleaning
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4795 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-29 22:31:56 +00:00
Michael Jerris a021945cef switch_malloc and switch_zmalloc macros that are fatal if malloc fails both in debug and release modes, switch_zmalloc includes a companion memset for the malloc'd block.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4794 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-29 17:37:42 +00:00
Michael Jerris bc8a4855a6 use autoconf determined time_t printf format specifier
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4787 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-29 04:08:18 +00:00
Anthony Minessale 8a4406ece2 Addition of scheduler engine and a few applications to use it.
This patch adds a scheduler thread to the core and moves the heartbeat
event to use the new scheduler as an example.

Also The following features are implemented that use this scheduler:

sched_hangup dialplan application:

<action application="sched_hangup" data="+10 normal_clearing bleg"/>

** The cause code is optional and the optional bleg keyword will only hangup the
   channel the current channel is bridged to if the call is in a bridge.

sched_transfer dialplan application:

<action application="sched_transfer" data="+10 1000 XML default"/>

** The last 2 args (dialplan and context) are optional

sched_broadcast dialplan application:

<action application="sched_broadcast" data="+10 playback:/tmp/foo.wav"/>
<action application="sched_broadcast" data="+10 playback!normal_clearing:/tmp/foo.wav"/>

** The optional !<cause_code> can be added to make the channel hangup after broadcasting the file.


sched_hangup api function:

sched_hangup +10 <uuid_string> normal_clearing

** The cause code is optional

sched_transfer api function:

sched_transfer +10 <uuid_string> 1000 XML default

** The last 2 args (dialplan and context) are optional

sched_broadcast api function:

sched_broadcast +10 <uuid_str> playback:/tmp/foo.wav
sched_broadcast +10 <uuid_str> playback!normal_clearing:/tmp/foo.wav

** The optional !<cause_code> can be added to make the channel hangup after broadcasting the file.

The new C functions in the core are documented in the doxeygen.

*NOTE* This commit should satisfy at least 2 bounties on the wiki



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4785 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-28 23:37:12 +00:00
Michael Jerris e5dff3e822 add checking for successful re-sampler allocation. Add ifdefs to disable build with re-sampler.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4782 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-28 18:21:00 +00:00
Anthony Minessale d9de1807ee Add state change i/o hook to the core and change some spidermonkey behaviour.
The most important thing to check is you now must create a new session with a blank constructor:
s = new Session();
then call s.originate() with all the former args that were documented to be for the constructor
this will will return true or false to indicate if the call worked.

See below this sample code demonstrates all of the changes:

////////////////////////////////////////////////////////////////////////////////
function on_hangup(hup_session)
{
    console_log("debug", "HANGUP!!!! name: " + hup_session.name + " cause: " + hup_session.cause + "\n");
	//exit here would end the script so you could cleanup and just be done
	//exit();
}

//set the on_hangup function to be called when this session is hungup
session.setHangupHook(on_hangup);

//allocate a new b_session
var b_session = new Session();

//make a call with b_session.  If this fails, all we will be able to access is the b_session.cause attr
if (b_session.originate(session, "sofia/mydomain.com/888@conference.freeswitch.org")) {
	//Inform the scripting engine to automaticly hang this session up when the script ends
    b_session.setAutoHangup(true);
	//set the on_hangup function to be called when this session is hungup
    b_session.setHangupHook(on_hangup);	
	//bridge session with b_session
    bridge(session, b_session);
} else {
    console_log("debug", "Originate Failed.. cause: " + b_session.cause + "\n");
}
////////////////////////////////////////////////////////////////////////////////






git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4773 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-27 00:40:53 +00:00
Anthony Minessale 0a11fbe996 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4699 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-20 21:42:02 +00:00
Anthony Minessale 15318689b5 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4694 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-20 21:20:14 +00:00
Anthony Minessale 221bf43984 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4690 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-20 20:37:52 +00:00
Anthony Minessale bfe8264939 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4665 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-19 19:54:36 +00:00
Anthony Minessale 7e2977b2b6 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4664 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-19 19:44:22 +00:00
Anthony Minessale e5407ed1ef update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4663 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-19 19:43:25 +00:00
Anthony Minessale 9ffe54df46 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4613 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-15 22:49:58 +00:00
Brian West ffde2ff0af update2
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4600 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-15 01:58:41 +00:00
Anthony Minessale d69cde6367 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4598 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-15 00:36:14 +00:00
Anthony Minessale 78c058423b tweaks to file buffering
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4575 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-12 20:17:34 +00:00
Michael Jerris 178a333539 push prefix dir from configure instead of from the makefile to clean up the compile line a bit. Follow-up commit of autotools, please hold.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4508 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-11 01:07:47 +00:00
Brian West 9263ef1f72 add url syntax for playback
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4501 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-10 02:36:55 +00:00
Anthony Minessale 2df583650f cleanup some stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4498 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-09 23:51:52 +00:00
Michael Jerris 42e78242a3 add wrapper code to fully encapsulate apr, apr-utils, pcre, and sqlite. fully use switch_ namespace in modules, create our own format and type defines. follow up commit for unix autotools coming soon after this. PLEASE NOTE: you will NEED to do a make megaclean and run configure again after this update (and the following commit) or it will not build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4494 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-09 20:44:13 +00:00
Anthony Minessale 2d78da120a avoid races in super high volume of no media calls
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4493 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-09 20:37:30 +00:00
Anthony Minessale 9eaa28a9e8 pass frame data better
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4480 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-08 14:59:10 +00:00
Anthony Minessale 5131ee1cae add management interface and some rtp goodies
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4464 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-07 18:34:22 +00:00
Michael Jerris ec3fcde87d change switch_core_timer_next to return switch_status_t, update all users to new usage, add some error checking to mod_conference so that it bails out of the loops more gracefully on shutdown.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4454 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-05 23:18:29 +00:00
Anthony Minessale 1b5fe10277 change a few things to allow timers to generate timestamps
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4452 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-05 20:53:54 +00:00
Brian West 343c2210da fix comments
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4442 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-04 01:47:08 +00:00
Brian West bd6720df94 Please besure to do "make sure" this should fix the assert people were getting on ALL channel drivers.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4438 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-03 21:02:02 +00:00
Anthony Minessale b7520f6676 pesky * bug
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4433 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-02 23:50:13 +00:00
Brian West 0ddffd3ef6 fix potential naughty bug you will need 'make sure'
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4432 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-02 23:38:01 +00:00
Anthony Minessale 71a5fbfbd1 change wanring level
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4429 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-02 17:55:22 +00:00
Anthony Minessale ed76b25241 cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4419 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-01 17:23:02 +00:00
Anthony Minessale df3effba3f be more specific
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4407 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-02-27 22:52:37 +00:00