Commit Graph

326 Commits

Author SHA1 Message Date
Anthony Minessale 19446804c7 pull down stack size another 128k, make the sql use mem cache and add session count to the status command
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2747 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-18 22:22:25 +00:00
Michael Jerris 849822f64e add switch_yield for windows
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2729 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-17 22:40:19 +00:00
Michael Jerris fa4a1c4317 tweak softimer to not int type truncate microsecond interval time.c
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2728 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-17 22:13:51 +00:00
Anthony Minessale 1386d84694 use usleep when possible, ./configure && make sure when you update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2722 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-17 18:44:53 +00:00
Anthony Minessale 56827bc9ec enhance timers and make rtp use it that way
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2669 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-12 22:23:45 +00:00
Anthony Minessale b3c437630f use steve's g711 (thanks steve), chage the conditional mutex based on paul T's input (thanks paul) and take the yield away on switch_yield and just sleep
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2663 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-12 17:17:02 +00:00
Michael Jerris 10e3b22f8a use our inline macro, really
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2649 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-12 03:14:52 +00:00
Anthony Minessale cb2da2328a pass cause from originate
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2647 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-12 01:32:04 +00:00
Anthony Minessale 95249aff5c dox
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2590 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-09 03:50:04 +00:00
Anthony Minessale 5e575f143c dox
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2589 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-09 03:47:56 +00:00
Anthony Minessale ae9d56e288 Adding bugs to the core
This is the primary commit to add bugs to the core (media bugs that is)
Media bugs are kind of like what ChanSpy is in Asterisk only cooler (I wrote ChanSpy too so I can say that)

Here is an example of using them to record a call by the higher level switch_ivr functionality passed
up to the dialplan via mod_playback.

The call will be recorded while the some.wav plays then stop for the rest of the call (when some_other.wav plays)

The bugs may have bugs since this is 1 day's work so happy hunting ......

<extension name="42">
  <condition field="destination_number" expression="^42$">
   <action application="set" data="RECORD_TITLE=recording test"/>
   <action application="set" data="RECORD_ARTIST=FreeSWITCH"/>
    <action application="record_session" data="/tmp/rtest.wav"/>
    <action application="playback" data="/tmp/some.wav"/>
    <action application="stop_record_session" data="/tmp/rtest.wav"/>
    <action application="playback" data="/tmp/some_other.wav"/>
  </condition>
</extension>



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2588 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-09 03:39:28 +00:00
Anthony Minessale eed1180192 add dynamic buffers
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2585 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-08 19:17:23 +00:00
Anthony Minessale f689b62fb6 add dynamic buffers
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2583 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-08 18:57:24 +00:00
Anthony Minessale 5816256ce3 let g729 be setup for pass through compile like this... MOD_CFLAGS="-DG729_PASSTHROUGH" make installall
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2575 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-08 15:43:45 +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
Michael Jerris 69933df109 update build on windows from latest core changes.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2542 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-07 05:35:08 +00:00
Anthony Minessale 80722357a6 Mega Changes
adding mod_park for putting channels in limbo state for remote control.
adding stuff to mod_event_socket to let you do the bgapi <command> <args>
this will let you execute a job in the bg and the result will be sent as an event with an
indicated uuid to match the reply to the command

adding switch_core_port_allocator (to be used soon)
adding "make sure" to do a full rebild of the freeswitch object files

There will be more to this committed as the week progresses

make sure you do a rebuild after this update or you'll be sowwie
./configure && make sure




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2540 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-07 03:58:01 +00:00
Anthony Minessale f4cef83070 tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2491 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-03 14:35:35 +00:00
Anthony Minessale 231144f3b0 compiler warning cleanup (part 3 [getting old])
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2489 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-03 14:28:08 +00:00
Anthony Minessale f48d50f0ce compiler warning cleanup (part 2)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2488 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-03 14:22:56 +00:00
Anthony Minessale 76ed494b2e compiler warning cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2487 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-03 14:15:02 +00:00
Anthony Minessale 6a91e4f3f9 cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2486 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-03 13:29:13 +00:00
Anthony Minessale 94571e3c75 dox
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2484 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-03 03:49:57 +00:00
Anthony Minessale 8543778b7c pack this mutha %^%$^&
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2483 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-02 23:04:25 +00:00
Michael Jerris 1bfe008b7f add inline macro for msvc for upcoming inline functions.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2481 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-02 18:33:29 +00:00
Anthony Minessale 884cfc4465 fix event_socket bugs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2430 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-29 20:27:43 +00:00
Anthony Minessale d94e810630 add some events
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2425 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-29 15:17:06 +00:00
Anthony Minessale fede17f4e0 tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2420 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-29 01:13:38 +00:00
Anthony Minessale 353f936095 tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2417 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-28 23:05:26 +00:00
Anthony Minessale aa196711a1 codec sql
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2387 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-25 01:33:28 +00:00
Anthony Minessale 4f17ab7714 bunch of tweaks to make ivr more fun
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2350 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-21 19:14:51 +00:00
Michael Jerris c15da98579 Add switch_core_init_and_modload to core, from switch.c. Add additional shutdown functionality to switch_core_destroy. move around more code in switch.c and fix freeswitch -stop on windows.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2336 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-19 18:51:22 +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
Michael Jerris ae380d58ec Update to new build system for windows.
This fixes several issues when debugging code in the ide, and does better dependency tracking.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2317 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-17 19:58:55 +00:00
Anthony Minessale 78d060c6a7 *deep breath*
Ok,

This one adds a bunch of stuff on top of the framework restructuring from yesterday.

1) originate api function:
Usage: originate <call url> <exten> [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]

This will call the specified url then transfer the call to the specified extension

example: originate exosip/1000@somehost 1000 XML default

2) mutiple destinations in outbound calls:

This means any dialstring may contain an '&' separated list of call urls
When using mutiple urls in this manner it is possible to map a certian key as required
indication of an accepted call.  You may also supply a filename to play possibly instructing the 
call recipiant to press the desired key etc...

The example below will call 2 locations playing prompt.wav to any who answer and
completing the call to the first offhook recipiant to dial "4"



      <extension name="3002">
        <condition field="destination_number" expression="^3002$">
          <action application="set" data="call_timeout=60"/>
          <action application="set" data="group_confirm_file=/path/to/prompt.wav"/>
          <action application="set" data="group_confirm_key=4"/>
          <action application="bridge" data="iax/guest@somebox/1234&exosip/1000@somehost"/>
        </condition>
      </extension>

The following is the equivilant but the confirm data is passed vial the bridge parameters
(This is for situations where there is no originating channel to set variables to)

      <extension name="3002">
        <condition field="destination_number" expression="^3002$">
          <action application="bridge" data=/path/to/prompt.wav:4"confirm=iax/guest@somebox/1234&exosip/1000@somehost"/>
        </condition>
      </extension>

Omitting the file and key stuff will simply comeplete the call to whoever answers first. 
(this is similar to how other less fortunate software handles the situation with thier best effort.)

This logic should be permitted in anything that establishes an outgoing call with
switch_ivr_originate()

Yes! That means even in this new originate api command you can call mutiple targets and send
whoever answers first to an extension that calls more mutiple targets.  (better test it though!)


Oh, and you should be able to do the same in the mod_conference dial and dynamic conference features

please report any behaviour contrary to this account to me ASAP cos i would not be terribly
suprised if I forgot some scenerio that causes an explosion I did all this in 1 afternoon so it probably needs tuning still.





git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2311 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-17 00:53:09 +00:00
Anthony Minessale 6175062b27 consolidate code in conference into todays changes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2303 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-16 00:35:02 +00:00
Anthony Minessale a29d426c8c setting waypoint
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2300 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-15 19:38:14 +00:00
Anthony Minessale a675393bb7 performance tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2298 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-15 17:52:12 +00:00
Michael Jerris 2bec16256a fix typo.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2267 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-12 00:38:51 +00:00
Anthony Minessale 7ccdd37a71 socket code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2257 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-11 15:25:49 +00:00
Anthony Minessale 9fedc12934 move pcre into core do a ./configure again (part 2)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2212 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-31 23:56:27 +00:00
Anthony Minessale 4395e55493 typo
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2185 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-27 15:45:19 +00:00
Anthony Minessale c4d890e0a4 Modify XML Dialplan
BTW, forget what I said yesterday RE: the strftime app I was at McDonalds, how can I concentrate there eh? 
see below....


The Definitive Guide To XML Dialplan:

The "dialplan" section of the freeswitch.xml meta document may contain several contexts

<?xml version="1.0"?>
<document type="freeswitch/xml">
  <section name="dialplan" description="Regex/XML Dialplan">
    <!-- the default context is a safe start -->
    <context name="default">

    <!-- one or more extension tags -->

    </context>
    
    <!-- more optional contexts -->
  </section>
</document>

The important thing to remember is that the dialplan is parsed once when the call
hits the dialplan parser in the RING state.  With one pass across the XML the result
will be a complete list of instructions installed into the channel based on
 parsed <action> or <anti-action> tags.

Those accustomed to Asterisk may expect the call to follow the dialplan by executing the 
applications as it parses them allowing data obtained from one action to influence the next action.
This not the case with the exception being the %{api func} {api arg} field type where an pluggable api call from
a module may be executed as the parsing occurs but this is meant to be used to draw realtime info such as
date and time or other quickly accessible information and shold *not* be abused.


The anatomy of an <extension> tag.

Legend: 
Text wrapped in [] indicates optional and is not part of the actual code.
a '|' inside [] indicates mutiple possible values and also is not part of the code.
Text wrapped in {} indicates it's a description of the parameter in place of the param itself.

<extension name="{exten_name}" [continue="[true|false]"]> 

continue=true means even if an extension executes to continue
parsing the next extension too

The {exten_name} above may anything but if it's 
an exact match with the destination number the parser will leap to this extension
to begin the searching that does not mean it will execute the extension.

Searching will either begin at the first extension in the context or at the point
the the parser has jumped to in the case described above.

Each condition is parsed in turn first taking the 'field' param.
The parser will apply the perl regular expression to each 'field' param encountered.

If the expression matches, it will parse each existing <action> tag in turn and add 
the data from the <application> tags to the channels todo list.	

If a matched expression contains any data wrapped in () the variables
$1,$2..$N will be valid and expanded in any of 'data' params from the subsequent action tags.

If the expression does NOT match, it will parse each <anti-action> tag in turn and add 
the data from the <application> tags to the channels todo list.
*NOTE* since there was no match the () feature is not availabe in anti-actions

The 'break' param indicates how to behave in relation to matching:
*) 'on-true'  - stop searching conditions after the first successful match.
*) 'on-false' - stop searching after the first unsuccessful match.
*) 'always'   - stop at this conditon regardless of a match or non-match.
*) 'never'    - continue searching regardless of a match or non-match.

<condition field="[{field name}|${variable name}|%{api func} {api arg}]" expression="{expression}" break="[on-true|on-false|always|never]">
  <action application="{app name}" data="{app arg}"/>
  <anti-action application="{app name}" data="{app arg}"/>
</condition>

  <!-- any number of condition tags may follow where the same rules apply -->
</extension>




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2167 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 20:12:49 +00:00
Anthony Minessale da4ae7be4c add metadata functions to sound file api
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2139 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 22:37:52 +00:00
Anthony Minessale da8484382c move unix builds to apr 1.2.7, sqlite 3.3.6 and libsndfile 1.0.16
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2112 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 15:11:15 +00:00
Anthony Minessale 9727efd842 Change the socket protocol and the sample client to use multiline input
valid input:

-------------------------
<command>[ <args>]

-------------------------
or
-------------------------
<command>[ <args>]
Header1: Val
HeaderN: Val

-------------------------





git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2109 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 14:14:07 +00:00
Michael Jerris e80c5808fb fix windows issue when building with C++.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2074 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-24 06:48:01 +00:00
Michael Jerris 85d442615e fix C linkage when using templates issue when building C++ modules in msvc that stems from including some windows header files inside of an extern C block, when building with C++.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2070 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-24 04:31:28 +00:00
Anthony Minessale 9ef48b6e1f dox
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2048 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-22 21:52:53 +00:00