[Asterisk-Users] Re: Asterisk-Users digest, Vol 1 #1994 - 14 msgs

Steven Critchfield critch at basesys.com
Mon Nov 24 11:48:15 MST 2003


On Mon, 2003-11-24 at 09:12, tad wrote:
> as i said, right now i'm just getting my feet wet. but, i will be needing
> to build dialplans on the fly. 'add extension' seems like the right call
> to make.

If this is so, you may be going about solving your problem completely
wrong. If you are trying to direct a user to a specific place, you can
have set priority, set extension, and set context for where you want the
call to come out as you finish the AGI app. Also you can set call
variables and global variables so you aren't changing the dialplan on
the fly. 

So in the interest of having your question solved, would you take
another step back from the problem you are working on and describe what
your are trying to accomplish. You may find the solution can be
accomplished much easier and more elegantly with a different method.
This should in the end help you learn more about asterisk and ways of
developing your dialplan. 

> > What is the goal of this?  It doesn't make much sense to me.  Care to
> > share some insite into what your goal is?
> >
> > bkw
> >
> > On Sun, 23 Nov 2003, tad wrote:
> >
> > > actually, i do have a workaround which bypasses the exec command entirely:
> > > system("asterisk -r -x 'add extension s,3,Playback(demo-congrats) into local'");
> > >
> > > but it's ugly. seems like it should be possible to do this with exec.
> > >
> > > .t
> > >
> > > ---------- Forwarded message ----------
> > > Date: Sun, 23 Nov 2003 21:17:50 -0500 (EST)
> > > From: tad <tad at media.mit.edu>
> > > To: asterisk-users at lists.digium.com
> > > Subject: agi exec problem.
> > >
> > > hi folks.
> > >
> > > (apologies in advance if this is a particularly stupid question)
> > >
> > > just getting my feet wet with asterisk / agi, and am a little stuck using
> > > EXEC. it works fine for applicaitons that take simple arguments, but
> > > chokes on applications that require multiple words as arguments.
> > >
> > > for example, this works fine:
> > >  EXEC Playback(demo-congrats)
> > >
> > > but this doesn't:
> > >  EXEC add extension s,3,Playback(demo-congrats) into local
> > >
> > > problem seems to be that AGI reads the second example to be:
> > >  EXEC add extension
> > >
> > > and ignores the rest (presumably because it assumes the space after
> > > 'extension' singifies the end of the argument)
> > >
> > > is there a way around this?
> 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list