[asterisk-users] Running a script after Dial() ?

Tilghman Lesher tlesher at digium.com
Thu Feb 4 16:31:22 CST 2010


On Thursday 04 February 2010 14:09:39 Steve Edwards wrote:
> On Thu, 4 Feb 2010, Tilghman Lesher wrote:
> > On Thursday 04 February 2010 09:05:36 Danny Nicholas wrote:
> >> Set the emailaddr into a channel variable.  Since I'm there, just make
> >> your h exten do the system if ${WAV} and ${emailaddr} are longer than 1.
> >>  Like this.
> >>
> >> - exten = h,1,noop(hangup logic)
> >> - exten = h,n,Gotoif($["${LEN(${WAV})}" < "4"]?just_hangup)
> >> - exten = h,n,Gotoif($["${LEN(${emailaddr})}" < "4"]?just_hangup)
> >> - exten = h,n,System(send-recorded-conversation ${WAV}.wav ${EXTEN:1}
> >> ${emailaddr})
> >> - exten = h,n(just_hangup),Hangup
> >
> > It's rather nonsensical to call the Hangup application in the "h"
> > extension. Use NoOp, instead.
>
> Wouldn't "verbose()" be a "better practice?"
>
> It's more obvious (to newcomers and to non-English speakers), flexible and
> it's what it was designed for, not a "useful side-effect" like noop().

No, in this case, I really meant NoOp, as in, a placeholder to do exactly
nothing (as opposed to printing a message) for the label to point towards.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list