[Asterisk-Users] What about a higher level configuration language
Jay Milk
jay at skimmilk.net
Sun Sep 26 14:21:35 MST 2004
I like my first suggestion the best... And that is of course fully
subjective:
[context]
exten => _1xxx
:DigitTimeOut(10)
:ResponseTimeOut(20)
BackHere:Answer
:Read(callto,pls-entr-num-uwish2-call,10)
:Read(callfrom,enter-phone-number10,10)
:SetCIDNum(${callfrom})
:Dial(IAX2/${IAXFREE}/1${callto},40):Failed
:Hangup
Failed:Play(try-again)
Goto(BackHere)
[<label>]:<command>[:<label1,..>] as the basic syntax
If the command has the conditional branch, then supply the +101, +201,
etc, labels. In the example above, when the dial-command fails, the
supplied priority is "Failed", which will point to the priority marked
"Failed" -- the preprocessor would of course need to make sure that
"Play{try-again}" lands on a priority that +101 from the Dial command.
This seems fairly trivial -- if I find some time this week, I'll hack it
out in PHP or PERL.
> -----Original Message-----
> From: Asterisk [mailto:asterisk at dotr.com]
> Sent: Sunday, September 26, 2004 3:43 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [Asterisk-Users] What about a higher level
> configuration language
>
>
> I pray for an end to the priorities as well. The +101 could
> be easily solved
> by a default label, or an option to the dial
>
> for example:
>
> exten => _7XX,1,Dial(yada,10)
> exten => _7XX,2,Voicemail(unavail)
> exten => _7XX,3,Hangup
> exten => _7XX,102,Voicemail(Busy)
>
> could be:
>
> exten => Dial:_7XX,Dial(yada,10)
> exten => Hangup:_7XX,Hangup
> exten => VMUnavail:_7XX,Voicemail(unavail)
> exten => VMBusy_7XX,Voicemail(Busy)
>
> in other words, the dial automatically looks for VMUnavail if
> not answered,
> or VMBusy if the line is busy
>
> or
>
> exten =>
> StartPlan:Dial:_7XX,Dial(yada,10,BeforeAnswer=AA,AfterAnswer=Z
> Z,Busy=XX,NoAnswer=YY)
> exten => ZZ:_7XX,Hangup
> exten => XX:_7XX,Voicemail(unavail)
> exten => YY:_7XX,Voicemail(Busy)
>
> There must be fat better ways of expressing my thoughts, but
> it's late on
> Sunday :)
>
> Julian
>
> ----- Original Message -----
> From: "Brian Capouch" <brianc at palaver.net>
> To: "Asterisk Users Mailing List - Non-Commercial Discussion"
> <asterisk-users at lists.digium.com>
> Sent: Sunday, September 26, 2004 8:41 PM
> Subject: Re: [Asterisk-Users] What about a higher level configuration
> language
>
>
> > Dinesh Nair wrote:
> >> On 27/09/2004 00:50 Jay Milk said the following:
> >>
> >>> Eliminating the need to specify (and keep track of)
> priorities would
> >>> make changes to extensions.conf much easier to implement.
> >>
> >>
> >> or perhaps allow non-consecutive priorities.
> >>
> >
> > After this topic was discussed a bit at the developer's
> confab, I got
> > to
> > thinking about what a great feature that would be.
> >
> > Renumbering priorities is a sadly common task for me in my somewhat
> > chaotic config environment, and having a way to "sneak in"
> actions in
> > between existing ones would be a major win.
> >
> > Of course, the problem of the hard-coded "priority + 101"
> situation is
> > problematical. I say we think through what the perfect
> world would look
> > like in this respect and then see how hard it would be to
> implement. . .
> >
> > B.
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/aster> isk-users
> To
> UNSUBSCRIBE or update options visit:
>
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list