[Freeswitch-users] Ast/FS Rosetta Stone
Anthony Minessale
anthony.minessale at gmail.com
Sat May 31 08:55:15 PDT 2008
Another good transition tool to play with may be mod_dialplan_asterisk which
is in tree.
Once loaded in modules.conf.xml it can be used in your sofia profile by
adding "asterisk" as the dialplan parameter.
You can also transfer calls to it by specifying it as the dialplan param in
the transfer or execute_extension apps.
it's not entirely like the real asterisk dialplan but it is at least a close
familiarity.
You cannot include contexts in each other in ours because we do all our
dialplan logic before the call.
It's structured in the same way so you can create context default
[default]
; and you can use comments the same way
; here is a demo that is close to the extensions.conf in tree that installs
by default
------------------
[default]
; Things you're used to....
exten => music,n,Dial(SIP/1234 at conference.freeswitch.org|120)
; similar pattern matching and caller-id match.
exten => _1XXXXX,n,set(cool=${EXTEN})
exten => _1XXXXX,n,set(myvar=true)
exten => _1XXXXX,n,Goto(default|music)
exten => 2137991400/1000,n,Goto(default|music)
; we also embellished things a bit and added some of our own goodies
; Some new magic you can do.... if you start the exten string with a ~ it
implies PCRE regex
; *NOTE* the ,n, is there for familiarity purposes we do not parse it anyway
nor will we honor line numbers.
exten => ~^(18(0{2}|8{2}|7{2}|6{2})\d{7})$,n,enum($1)
exten => ~^(18(0{2}|8{2}|7{2}|6{2})\d{7})$,n,bridge(${enum_auto_route})
; instead of exten, put anyting about the call you would rather match on.
; either the names of a field in caller_profile or a string of variables to
expand.
caller_id_number => 2137991400,n,Goto(default|music)
${sip_from_user} => bill,n,Goto(default|music)
Anyway you will find the XML dialplan more flexible but this may serve as a
stepping stone for beginners.
On Fri, May 30, 2008 at 7:07 PM, Michael Collins <mcollins at fcnetwork.com>
wrote:
> FYI,
>
>
>
> I create a new wiki page:
>
> http://wiki.freeswitch.org/wiki/Rosetta_stone
>
>
>
> I thought maybe those who know about Asterisk and FreeSWITCH both could
> start dropping stuff in there. I think that people coming from Asterisk
> might have an easier time if they had some sort of frame of reference. Note
> that I put a disclaimer at the top – there isn't really a one-to-one
> Ast-to-FS translation for most of the stuff, but if you said to an
> experienced Asterisk user that "conf/dialplan/default.xml" is analogous to
> "/etc/asterisk/extensions.conf" then he/she would at least have a starting
> point. I'm hoping to add more stuff like the fact that there aren't really
> "priorities" in FS but that you can use scripting langs, ivr menus, etc. to
> mimic a lot of that kind of functionality.
>
>
>
> Anyway, your thoughts and suggestions are welcomed. I will do my best to
> add stuff as I am able…
>
>
>
> -MC
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080531/44c29bc5/attachment-0002.html
More information about the FreeSWITCH-users
mailing list