[Freeswitch-users] Ast/FS Rosetta Stone
Michael S Collins
mercutio.viz at gmail.com
Sat May 31 20:04:24 PDT 2008
Just to confirm: you can run both dialplans simultaneously, no? I'm
thinking that it might be helpful to have a few sample extensions in
each dp type that are functionally identical. I'll see if I can come
up with some practical examples.
-MC
Sent from my iPhone
On May 31, 2008, at 8:55 AM, "Anthony Minessale" <anthony.minessale at gmail.com
> wrote:
> 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 stu
> ff, but if you said to an experienced Asterisk user that "conf/dialp
> lan/default.xml" is analogous to "/etc/asterisk/extensions.conf" the
> n he/she would at least have a starting point. I'm hoping to add mo
> re stuff like the fact that there aren't really "priorities" in FS b
> ut 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
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org
> iax:guest at conference.freeswitch.org/888
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080531/9690b9c4/attachment-0002.html
More information about the FreeSWITCH-users
mailing list