Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Best way to replicate include =>?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
kkielhofner at star2st...
Guest





PostPosted: Mon Oct 20, 2008 3:03 pm    Post subject: [Freeswitch-users] Best way to replicate include =>? Reply with quote

In Asterisk one can include the extensions of another context with
include =>. What's the best way to pull that off in FreeSWITCH? I've
played a bit with mod_dptools transfer but it doesn't look like it's
going to do exactly what I want...

Any ideas? Thanks!

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
kkielhofner at star2st...
Guest





PostPosted: Mon Oct 20, 2008 3:40 pm    Post subject: [Freeswitch-users] Best way to replicate include =>? Reply with quote

On 10/20/08, Michael Collins <msc@freeswitch.org> wrote:
Quote:
Could you post a sample from an Asterisk dialplan and maybe we can come up
with a good way to replicate it in FS? Possibly there is a more elegant
solution that does not require lots of munging.
-MC


Sure:

[include]
exten => 727,1,DoStuff
exten => 800,1,DoOtherStuff


[default]
include => include

I know it's a simple case and not really an "example" but I'm really
just looking for a way for a context to just "plow through" another
context looking for a match before it returns "No Route" and aborts.
Not exactly elegant but sometimes it's just got to be done (I guess).

It looks like that's what transfer is supposed to do... Is there
any way for me to just remove a condition on the match in [default]
and then just run through another context as defined by my args to
transfer before returning no route? It would be nice to be able to do
multiple "includes" like so:

<extension name="include" continue="true">
<action application="transfer" data="${dialed_ext} XML include"/>
</extension>

<extension name="include2" continue="true">
<action application="transfer" data="${dialed_ext} XML include2"/>
</extension>

I know it's ugly... Sad

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
mcollins at fcnetwork.com
Guest





PostPosted: Mon Oct 20, 2008 4:35 pm    Post subject: [Freeswitch-users] Best way to replicate include =>? Reply with quote

Quote:
Sure:

[include]
exten => 727,1,DoStuff
exten => 800,1,DoOtherStuff


[default]
include => include

I know it's a simple case and not really an "example" but I'm really
just looking for a way for a context to just "plow through" another
context looking for a match before it returns "No Route" and aborts.
Not exactly elegant but sometimes it's just got to be done (I guess).


Curious - why exactly must it some times be done? That is, what
scenarios? The reason I ask is that the devs are pretty clever and have
anticipated just about any scenario. My guess is that there's an elegant
solution without stacking a bunch of includes, but I think we'd need to
hear about specific scenarios.

Thoughts?
-MC


Quote:
It looks like that's what transfer is supposed to do... Is there
any way for me to just remove a condition on the match in [default]
and then just run through another context as defined by my args to
transfer before returning no route? It would be nice to be able to do
multiple "includes" like so:

<extension name="include" continue="true">
<action application="transfer" data="${dialed_ext} XML include"/>
</extension>

<extension name="include2" continue="true">
<action application="transfer" data="${dialed_ext} XML include2"/>
</extension>

I know it's ugly... Sad

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users

UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Quote:
http://www.freeswitch.org

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
msc at freeswitch.org
Guest





PostPosted: Mon Oct 20, 2008 4:43 pm    Post subject: [Freeswitch-users] Best way to replicate include =>? Reply with quote

Could you post a sample from an Asterisk dialplan and maybe we can come up with a good way to replicate it in FS? Possibly there is a more elegant solution that does not require lots of munging.
-MC

On Mon, Oct 20, 2008 at 12:48 PM, Kristian Kielhofner <kkielhofner@star2star.com (kkielhofner@star2star.com)> wrote:
Quote:
In Asterisk one can include the extensions of another context with
include =>. What's the best way to pull that off in FreeSWITCH? I've
played a bit with mod_dptools transfer but it doesn't look like it's
going to do exactly what I want...

Any ideas? Thanks!

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
mike at jerris.com
Guest





PostPosted: Mon Oct 20, 2008 4:57 pm    Post subject: [Freeswitch-users] Best way to replicate include =>? Reply with quote

you can just as the last exten in your context do a transfer to the
other context.

Mike

On Oct 20, 2008, at 5:11 PM, Michael Collins wrote:

Quote:
Quote:
Sure:

[include]
exten => 727,1,DoStuff
exten => 800,1,DoOtherStuff


[default]
include => include

I know it's a simple case and not really an "example" but I'm really
just looking for a way for a context to just "plow through" another
context looking for a match before it returns "No Route" and aborts.
Not exactly elegant but sometimes it's just got to be done (I guess).


Curious - why exactly must it some times be done? That is, what
scenarios? The reason I ask is that the devs are pretty clever and
have
anticipated just about any scenario. My guess is that there's an
elegant
solution without stacking a bunch of includes, but I think we'd need
to
hear about specific scenarios.

Thoughts?
-MC


Quote:
It looks like that's what transfer is supposed to do... Is there
any way for me to just remove a condition on the match in [default]
and then just run through another context as defined by my args to
transfer before returning no route? It would be nice to be able to
do
multiple "includes" like so:

<extension name="include" continue="true">
<action application="transfer" data="${dialed_ext} XML include"/>
</extension>

<extension name="include2" continue="true">
<action application="transfer" data="${dialed_ext} XML include2"/>
</extension>

I know it's ugly... Sad


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
anthony.minessale at g...
Guest





PostPosted: Mon Oct 20, 2008 4:57 pm    Post subject: [Freeswitch-users] Best way to replicate include =>? Reply with quote

One important thing to remember is that in FreeSWITCH the dialplan is a separate stage of a call.
FS parses your dialplan in one pass and builds a "todo" list and then it hits execute state and really does the stuff.

We do have an application called execute_extension that lets you run a dialplan module from the execute state just for the purpose of executing the instruction set from a certian extension so you could use that for what you want like so:

<!--- put this extension last -->
<extension name="include" continue="true">
<!-- conditions with no expression are instantly true -->
<condition>
<action application="execute_extension" data="${dialed_ext} XML include"/>
<action application="execute_extension" data="${dialed_ext} XML include2"/>
<condition/>
</extension>

This would actually cause you to run through both contexts in this order during EXECUTE state.
were the transfer app actually stops the EXECUTE by sending the channel back to RINGING and
re-entering the dialplan stage.

Your best bet is to try to shift the paragidm in your head away from how asterisk does it =D



On Mon, Oct 20, 2008 at 3:06 PM, Kristian Kielhofner <kkielhofner@star2star.com (kkielhofner@star2star.com)> wrote:
Quote:
On 10/20/08, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:
Quote:
Could you post a sample from an Asterisk dialplan and maybe we can come up
with a good way to replicate it in FS? Possibly there is a more elegant
solution that does not require lots of munging.
-MC



Sure:

[include]
exten => 727,1,DoStuff
exten => 800,1,DoOtherStuff


[default]
include => include

I know it's a simple case and not really an "example" but I'm really
just looking for a way for a context to just "plow through" another
context looking for a match before it returns "No Route" and aborts.
Not exactly elegant but sometimes it's just got to be done (I guess).

It looks like that's what transfer is supposed to do... Is there
any way for me to just remove a condition on the match in [default]
and then just run through another context as defined by my args to
transfer before returning no route? It would be nice to be able to do
multiple "includes" like so:

<extension name="include" continue="true">
<action application="transfer" data="${dialed_ext} XML include"/>
</extension>

<extension name="include2" continue="true">
<action application="transfer" data="${dialed_ext} XML include2"/>
</extension>

I know it's ugly... Sad

--

Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
kkielhofner at star2st...
Guest





PostPosted: Mon Oct 20, 2008 5:27 pm    Post subject: [Freeswitch-users] Best way to replicate include =>? Reply with quote

On 10/20/08, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Quote:
One important thing to remember is that in FreeSWITCH the dialplan is a
separate stage of a call.
FS parses your dialplan in one pass and builds a "todo" list and then it
hits execute state and really does the stuff.

We do have an application called execute_extension that lets you run a
dialplan module from the execute state just for the purpose of executing the
instruction set from a certian extension so you could use that for what you
want like so:

<!--- put this extension last -->
<extension name="include" continue="true">
<!-- conditions with no expression are instantly true -->
<condition>
<action application="execute_extension"
data="${dialed_ext} XML include"/>
<action application="execute_extension"
data="${dialed_ext} XML include2"/>
<condition/>
</extension>

This would actually cause you to run through both contexts in this order
during EXECUTE state.
were the transfer app actually stops the EXECUTE by sending the channel back
to RINGING and
re-entering the dialplan stage.

Your best bet is to try to shift the paragidm in your head away from how
asterisk does it =D


I know... ATM the moment I'm trying to bring FS into the organization
in stages, "parallel" to Asterisk as much as possible. Once I get
through this initial phase I can begin to think about how to do things
the "FreeSWITCH way" (and do all of the cool stuff I think I'll be
able to do). First things first, though - replicate existing
functionality and make as painless as possible!

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
mcollins at fcnetwork.com
Guest





PostPosted: Mon Oct 20, 2008 5:29 pm    Post subject: [Freeswitch-users] Best way to replicate include =>? Reply with quote

Quote:
Quote:
Your best bet is to try to shift the paragidm in your head away from
how
Quote:
Quote:
asterisk does it =D


I know... ATM the moment I'm trying to bring FS into the organization
in stages, "parallel" to Asterisk as much as possible. Once I get
through this initial phase I can begin to think about how to do things
the "FreeSWITCH way" (and do all of the cool stuff I think I'll be
able to do). First things first, though - replicate existing
functionality and make as painless as possible!


That makes sense. Some of Asterisk configs are, by definition, nasty
hacks and kludges. You can do that with FS if you really want to - or
need to. Hopefully you will be able to migrate past the kludge factor in
due time. Smile

-MC



_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services