Commit Graph

144 Commits

Author SHA1 Message Date
Anthony Minessale 594ccf8bb8 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3384 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-16 15:50:17 +00:00
Anthony Minessale 6013035a6c update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3380 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-15 20:21:29 +00:00
Anthony Minessale dd824bbf81 doh
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3375 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-15 00:40:45 +00:00
Anthony Minessale 81ff111339 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3369 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-14 17:41:35 +00:00
Anthony Minessale d1fe31d8c3 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3237 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-30 20:54:24 +00:00
Anthony Minessale 718ace8b83 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3227 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-29 17:57:55 +00:00
Anthony Minessale 082a5a03c0 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3226 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-29 15:36:23 +00:00
Anthony Minessale 6a6c57f0f6 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3205 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-25 18:49:34 +00:00
Anthony Minessale 305bc19458 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3199 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-25 17:00:23 +00:00
Anthony Minessale 10ead46ffd update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3181 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-24 18:50:52 +00:00
Anthony Minessale bfab0a6efc minor tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3180 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-24 18:23:23 +00:00
Anthony Minessale 776919d5fd tweeks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3164 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-23 17:34:03 +00:00
Michael Jerris 90fe19867c initialize to null so we can check for null before we free.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3156 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-22 15:46:23 +00:00
Anthony Minessale aba9c77c35 your run-of-the mill nightmarish attempt at normalizing not one crazy protocol but many....
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3151 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-22 04:37:19 +00:00
Anthony Minessale a67dc0aab6 fix
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3126 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-20 22:26:06 +00:00
Anthony Minessale 343fd5cea5 refactor the presence stuff and add it to mod_conference
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3124 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-20 22:11:26 +00:00
Anthony Minessale 747ab41f78 bs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3118 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-20 06:44:58 +00:00
Anthony Minessale 3a32d9e53c Presence and Chat Gateway Code
This is some brand new stuff to gateway chat/presence/audio from one protocol to another
So far it only works between google/jingle and SIP

All I had to test the SIP end was X-Lite and Eyebeam and GoogleTalk on the jingle end.

With this setup registered X-Lite's can chat with each other and call each other 
as well as X-Lite to GoogleTalk and GoogleTalk to X-Lite audio calls.

Chat May also be done between X-Lite and jabber 

You'll also need a jabber server configured for component login so you can interface.
We have only tested with jabberd2 so far.

Configure DNS so srv records for jabber for your subdomain (fs.mydomain.com in the example)
so the jabber records are pointed at your jabber server.

RELEVANT CONFIGS

<!-- Brian has no jingle support so send calls to him over to his iax url -->
<extension name="bkw">
  <condition field="destination_number" expression="^jingle\+brian@agents.cylynx.com$">
    <action application="bridge" data="iax/guest@brianwest.homeunix.org/9184290404"/>
  </condition>
</extension>

<!-- Assumption is made here that both sip and jingle have the same profile/domain name as documented below -->

<extension name="jingle2sip">
  <condition field="source" expression="mod_dingaling"/>
  <condition field="destination_number" expression="^sip\+([^\@]+)\@(.*)$">
    <action application="bridge" data="sofia/$2/$1%$2"/>
  </condition>
</extension>

<extension name="sip2jingle">
  <condition field="source" expression="mod_sofia"/>
  <condition field="destination_number" expression="^jingle\+([^\@]+)\@(.*)$">
    <action application="bridge" data="dingaling/sip+${sip_fromuser}@${sip_fromhost}/$1@$2"/>
  </condition>
</extension>


<configuration name="sofia.conf" description="sofia Endpoint">
  <global_settings>
    <param name="log-level" value="0"/>
  </global_settings>

  <profiles>
    <profile name="fs.mydomain.com">
      <registrations/>
      <settings>
	<param name="debug" value="1"/>
	<param name="rfc2833-pt" value="101"/>
	<param name="sip-port" value="5060"/>
	<param name="dialplan" value="XML"/>
	<param name="dtmf-duration" value="100"/>
	<param name="codec-prefs" value="PCMU"/>
	<param name="codec-ms" value="20"/>
	<param name="accept-blind-reg" value="true"/>
	<param name="manage-presence" value="true"/>
	<!--<param name="full-id-in-dialplan" value="true"/>-->
	<!--<param name="auth-calls" value="true"/>-->
	<!--<param name="auth-all-packets" value="true"/>-->
	<param name="use-rtp-timer" value="true"/>
	<param name="rtp-timer-name" value="soft"/>
	<param name="rtp-ip" value="100.200.100.200"/>
	<param name="sip-ip" value="fs.mydomain.com"/>
      </settings>
    </profile>
  </profiles>

</configuration>


<configuration name="dingaling.conf" description="XMPP Jingle Endpoint">
  <settings>
    <param name="debug" value="0"/>
    <param name="codec-prefs" value="PCMU"/>
  </settings>

  <profile type="component">
    <param name="name" value="fs.mydomain.com"/>
    <param name="password" value="secret"/>
    <param name="dialplan" value="XML"/>
    <param name="rtp-ip" value="208.64.200.42"/>
    <param name="server" value="jabber.freeswitch.org:5347"/>
    <!-- disable to trade async for more calls -->
    <param name="use-rtp-timer" value="true"/>
    <param name="exten" value="_auto_"/>
    <!--<param name="vad" value="both"/>-->
  </profile>

</configuration>



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3115 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-20 06:17:00 +00:00
Michael Jerris c1f346b99e change to switch_mprintf
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3107 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-19 16:42:41 +00:00
Anthony Minessale 12243c194e tidy up, note yesterday's propagate_vars was changed to export_vars
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3106 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-19 16:33:54 +00:00
Anthony Minessale 99e22d69bd refactor earlier junk from this eve and add ken's propagate variable thing
set this sometime before an origination (bridge etc).

<action application="set" data="propagate_vars=my_cool_var1,my_cool_var2,foo,bar"/>

and they should be cloned over to the new channel when it's substantiated



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3101 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-19 07:13:34 +00:00
Michael Jerris 3eb8ebd45c fix windows build from recent changes.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3091 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-19 01:28:29 +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
Brian West 614010db63 Rename ani2 to aniii and ANI2 to ANI-II where appropriate. Because its not ANI2 its ANI II (eye eye)
What is ANI II ?

Refer to:

http://en.wikipedia.org/wiki/Automatic_number_identification

Thanks,
/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3073 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-17 23:33:32 +00:00
Anthony Minessale 4933582aad update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3051 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-15 04:44:33 +00:00
Anthony Minessale efd246babd add auto-reply option to dingaling to allow the gateway bot to auto-reply to chat msgs recieved outside the context of a call
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3041 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-12 14:06:09 +00:00
Anthony Minessale ba46200539 refactoring and general improvement (do a make sure)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3035 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-12 00:59:09 +00:00
Anthony Minessale b1b18faa04 improve dingaling
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3019 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-10 00:11:41 +00:00
Anthony Minessale 6a96670267 refine code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3006 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-09 02:24:43 +00:00
Michael Jerris c822f94125 add syntax to api structures, use them for usage returns, do more checking on valid usage and cleanup some output of api commands.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3001 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-08 07:11:42 +00:00
Michael Jerris 2b53e80e34 add syntax field to the api interface struct.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3000 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-08 05:04:34 +00:00
Anthony Minessale fa5767ebf7 fixes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2781 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-22 15:22:31 +00:00
Anthony Minessale 8a0e9ccf1f performance tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2693 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-14 00:15:03 +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 52956d5cb1 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2554 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-07 15:08:40 +00:00
Anthony Minessale 4c1a2e0922 fix some bugs and g726 wip (only 32 works so far)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2459 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-30 22:03:52 +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 271c2f9c98 fix
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2384 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-24 19:54:09 +00:00
Anthony Minessale 0898abde78 fix stupid oversight
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2376 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-23 21:08:28 +00:00
Michael Jerris 14d79cf500 Windows build tweaks.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2352 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-21 22:48:01 +00:00
Anthony Minessale 559c6330f1 google part 1001
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2331 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-18 21:02:55 +00:00
Anthony Minessale 89e62d8c56 google part 1000
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2330 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-18 21:02:40 +00:00
Anthony Minessale 9018439d47 tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2328 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-18 19:29:42 +00:00
Anthony Minessale 6ccb60c25c last round of google cleanup rebuild libdingaling
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2327 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-18 18:44:11 +00:00
Anthony Minessale 57da9ed8fc more tweaks for google compat
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2326 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-18 16:36:26 +00:00
Michael Jerris a15bc52f0e cast for possible loss of data.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2324 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-18 02:21:26 +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 07a7b6e54a update dingaling to be able to use TLS jabber servers such as googletalk
see sample config for new options.

the dingaling library has changed so you must rebuild it 
rm libs/libdingaling/.complete
make installall



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2251 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-11 00:24:38 +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 aee6cc27e1 codec tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1957 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-18 18:34:42 +00:00