I am not adding it to the examples or to the modules.conf because it's not really ready for that yet.
This is only 1.5 days old from scratch at this point but the brave hearted who want to play with it can do the following:
Add this to modules.conf:
-----------------------------------------------------------------------------
endpoints/mod_sofia
-----------------------------------------------------------------------------
Add this to freeswitch.xml in the configuration/modules.conf area
-----------------------------------------------------------------------------
<load module="mod_sofia"/>
-----------------------------------------------------------------------------
Add this to freeswitch.xml in the configuration section
-----------------------------------------------------------------------------
<configuration name="sofia.conf" description="sofia Endpoint">
<!-- You may have multiple profiles -->
<profile name="test">
<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="use-rtp-timer" value="true"/>
<param name="rtp-ip" value="127.0.0.1"/>
<param name="sip-ip" value="127.0.0.1"/>
<!-- optional ; -->
<!-- <param name="ext-rtp-ip" value="stun:stun.server.com"/>-->
<!-- <param name="ext-rtp-ip" value="100.101.102.103"/> -->
<!-- VAD choose one (out is a good choice); -->
<!-- <param name="vad" value="in"/> -->
<!-- <param name="vad" value="out"/> -->
<!-- <param name="vad" value="both"/> -->
<!--<param name="alias" value="sip:208.64.200.40:5555"/>-->
</profile>
</configuration>
-----------------------------------------------------------------------------
The call string to use profile test would be:
sofia/test/1000@1.2.3.4
as in:
<action application="bridge" data="sofia/test/1000@1.2.3.4"/>
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2398 d0543943-73ff-0310-b7d9-9358b9ac24b2
no more <rooms>
rooms will just be created on the fly.
<action application="conference" data="myconf@myprofile+1234"/>
+1234 is optional on-the-fly pin
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2381 d0543943-73ff-0310-b7d9-9358b9ac24b2
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
now in the key portion you can say 'exec' and in the file portion say '<application> <args>'
if the channel is not hungup when that application ends it's the winner so you can
run an ivr on the channels to determine who gets the call
<extension name="3002">
<condition field="destination_number" expression="^3002$">
<action application="set" data="call_timeout=60"/>
<action application="set" data="group_confirm_key=exec"/>
<action application="set" data="group_confirm_file=javascript test.js"/>
<action application="bridge" data="exosip/1000@domain.com&exosip/1001@mydomain.com"/>
</condition>
</extension>
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2314 d0543943-73ff-0310-b7d9-9358b9ac24b2
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
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
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
Use in the dialplan like so:
<!-- continue="true" means keep searching even when you have a match -->
<extension name="set-date" continue="true">
<condition>
<action application="strftime" data="NOW=%H:%M"/>
</condition>
</extension>
<extension name="route-date">
<condition field="$NOW" expression="^0[34].*">
<action application="playback" data="/tmp/cluecon1.wav"/>
</condition>
</extension>
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2144 d0543943-73ff-0310-b7d9-9358b9ac24b2
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
DTMF:
1 = volume down
2 = volume default
3 = volume up
4 = gain down
5 = gain default
6 = gain up
7 = energy level down
8 = energy level default
9 = energy level up
* = toggle mute + deaf
0 = toggle mute
# = quit
new api commands to adj volume, gain and energy
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1787 d0543943-73ff-0310-b7d9-9358b9ac24b2