Commit Graph

291 Commits

Author SHA1 Message Date
Michael Jerris a17123dae4 The day before today Mike Murdock found a bug making switch_str_time return the day before, but it was already the day before today, so it returned 2 days ago, and that was just not right. Now time has all come back together.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3933 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-01-10 14:42:47 +00:00
Anthony Minessale 57c0d4bdc9 add strepoch api call and more say stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3900 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-01-03 00:50:11 +00:00
Anthony Minessale 6a2529748a some changes from mmurdock
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3899 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-01-03 00:21:17 +00:00
Anthony Minessale 60434decf5 ENUM Support
mod_enum can be used as a dialplan app, an api call from the console or as a dialplan interface.


Dialplan Interface:
put enum as the dialplan parameter in an endpoint module
i.e. instead of "XML" set it to "enum" or "enum,XML" for fall through.

Dialplan App:
This example will do a lookup and set the a variable that is the proper
dialstring to call all of the possible routes in order of preference according to 
the lookup and the order of the routes in the enum.conf section.

<extension name="tollfree">
  <condition field="destination_number" expression="^(18(0{2}|8{2}|7{2}|6{2})\d{7})$">
    <action application="enum" data="$1"/>
    <action application="bridge" data="${enum_auto_route}"/>
  </condition>
</extension>

You can also pick an alrernate root:
<action application="enum" data="$1 myroot.org"/>	


API command:
at the console you can say:
enum <number> [<root>]

The root always defaults to the one in the enum.conf section.




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3494 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-30 21:28:32 +00:00
Paul Tinsley ea19c0e980 No reason to consider % dangerous twice...
Also i retract my pcre statement from before, i doubt a perl pack and hex call are going to work in pcre.  The regex should give plenty of idea what you need to do in your language of choice though, thats the point :)


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3482 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-29 05:46:12 +00:00
Paul Tinsley 0c1e83a43f Fix for event serialization, multi-ilne variables or crazy characters in a line could cause parsing errors in consumers of serialized events.
All values are now url encoded to ensure they don't have "dangerous" characters in them.  make sure you url_decode in your language of choice when consuming events in plain format from the event socket.

For those perl or pcre heads out there you can use the following regex:
$value =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/sego;



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3481 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-29 04:57:01 +00:00
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 f8d3093f5c hack to fix udp sockets
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3377 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-15 03:17:28 +00:00
Michael Jerris 964aec990c make logger handle a bit more bad input.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3306 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-10 16:30:02 +00:00
Anthony Minessale 9ab2b1db57 Media Management (Sponsored By Front Logic)
This modification makes it possible to change the media path of session in the switch on-the-fly and from the dialplan.
It adds some API interface calls usable from a remote client such as mod_event_socket or the test console.

1) media [off] <uuid>

   Turns on/off the media on the call described by <uuid>
   The media will be redirected as desiered either into the switch or point to point.

2) hold [off] <uuid>

   Turns on/off endpoint specific hold state on the session described by <uuid>

3) broadcast <uuid> "<path>[ <timer_name>]" or "speak:<tts_engine>|<tts_voice>|<text>[|<timer_name>]" [both]

   A message will be sent to the call described by uuid instructing it to play the file or speak the text indicated.

   If the 'both' option is specified both ends of the call will hear the message otherwise just the uuid specified
   will hear the message.

   During playback when only one side is hearing the message the other end will hear silence.

   If media is not flowing across the switch when the message is broadcasted, the media will be directed to the
   switch for the duration of the call and then returned to it's previous state.


Also the no_media=true option in the dialplan before a bridge makes it possible to place a call while proxying the session
description from one endpoint to the other and establishing an immidiate point-to-point media connection with no media
on the switch.

<action application="set" data="no_media=true"/>
<action application="bridge" data="sofia/mydomain.com/myid@myhost.com"/>


*NOTE* when connecting two outbound legs by using the "originate" api command with an extension that has no_media=true enabled,
the media for the first leg will be engaged with the switch until the second leg has answered and the other session description
is available to establish a point to point connection at which time point-to-point mode will be enabled.

*NOTE* it is reccommended you rebuild FreeSWITCH with "make sure" as there have been some changes to the core.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3245 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-31 21:38:06 +00:00
Anthony Minessale 0d23976f2a Insane amounts of yucky satanic code to make transfer and that kind of thing work.
Transfers work better when both legs of the call live in thier own channel eg bridged calls
A -> B where you want a to make B -> C

when you route a call to an IVR or playback app you are not really bridging you have
A all alone executing the script so it's hard to transfer that.

I do have it aparently working but it's goofy and you are better off
putting your IVR on it's own switch so they are all inbound calls
then you have A -> B -> IVR
now A can happily transfer B who can stay on line with IVR without stopping
the execution.  You can also accomplish this by calling in a loop back to the same box
if you dont want to have 2 boxes.


Also the beginning effort at bridging calls with no media is here
set this magic variable in your dialplan to convince mod_sofia
to pass A's sdp as it's own to B and return B's sdp back to A on 200 or 183

<action application="set" data="no_media=true"/>
<action application="bridge" data="sofia/id@host.com"/>

You will need a new sofia tarball for this version


There is a bunch of other odds and ends added like a function or 2 etc
Oh,

And don't be suprised if it introduces all kinds of bugs!



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2992 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-06 22:39:49 +00:00
Anthony Minessale aa2a793e28 optimizations and disable the conditional thing till we see why it dies at 100cps X 800 calls
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2708 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-15 21:43:18 +00:00
Anthony Minessale f258e3ea5c build bs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2365 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-22 21:18:36 +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 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
Michael Jerris ead82d86fd msvc types tweaks.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1416 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 16:37:56 +00:00
Anthony Minessale f09491a69b XMLification (wave 4)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1412 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 15:47:54 +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 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 c3a77d23bb improvements
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1176 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-17 18:25:43 +00:00
Michael Jerris d0a103a343 Addition of mod_syslog for *nix. Thanks to James Martelletti.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1158 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-14 16:45:31 +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
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
Michael Jerris dbdad46049 fix msvc compile. Cleanup some warnings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@660 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-02-24 00:02:02 +00:00
Anthony Minessale 01fd1c3af4 More PRI/SIP gateway stuff
**ATTENTION** you will need to libs/jrtplib/.complete ; make installall 
to get it to compile on existing builds as the jrtplib required changes.

Added teletone DTMF to mod_wanpipe and rfc2933 DTMF to mod_exosip
Added temporary poor man's daemon
freeswitch -nc > /var/log/freeswitch.log

then it will await a HUP




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@659 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-02-23 22:41:08 +00:00
Michael Jerris fc341792be turn on higher warning level in msvc for the core and libteletone and resolve warnings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@634 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-02-20 00:23:25 +00:00
Michael Jerris 8420b7e8fb add mod_event_multicast to msvc build. Fix some warnings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@618 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-02-14 22:58:07 +00:00
Michael Jerris 92628433da fix oops (svn merge -r 418:417 http://svn.freeswitch.org/svn/freeswitch/trunk)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@419 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-01-20 15:05:05 +00:00
Anthony Minessale 0ea203849f update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@418 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-01-20 02:02:03 +00:00
Anthony Minessale 42383b1f15 indent
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@416 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-01-20 00:40:29 +00:00
Anthony Minessale 883efd4e76 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@296 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-01-06 02:01:11 +00:00
Michael Jerris bedcabb8ec cleanup and formating
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@261 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-01-03 01:17:59 +00:00
Anthony Minessale 111a0f6deb resample into core
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@254 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-01-02 17:28:59 +00:00
Michael Jerris 480d1ac279 fix some size_t\int warnings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@245 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-30 17:20:21 +00:00
Anthony Minessale e98104d109 Add rate to frames and a bunch of evil resample code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@240 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-30 00:00:21 +00:00
Anthony Minessale 82d141df73 getting ready for auto resample in opposing versions of SLIN codec
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@232 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-29 00:26:17 +00:00
Anthony Minessale b4845b9ff1 ok gsm works
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@206 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-26 19:09:59 +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
Michael Jerris 00aaadc4b4 numerous fixes to msvc build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@199 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-23 03:39:33 +00:00
Anthony Minessale 8311b9a01a iax and empty core for opal
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@86 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-06 17:18:56 +00:00
Michael Jerris b266ae8b11 Moved remotely
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@48 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-11-19 20:09:09 +00:00