[asterisk-users] 'h' extension on call-out

Artifex Maximus artifexor at gmail.com
Mon Nov 12 16:14:10 CST 2007


Hello,

On Nov 12, 2007 5:52 PM, Tony Mountifield <tony at softins.clara.co.uk> wrote:
> In article <9cbf3f070711120739t1e44a123ga4c1a6aa76177751 at mail.gmail.com>,
> Artifex Maximus <artifexor at gmail.com> wrote:
> > On Nov 12, 2007 2:04 PM, Tony Mountifield <tony at softins.clara.co.uk> wrote:
> > > In article <9cbf3f070711120416v249d0a81s1388fa58b0169287 at mail.gmail.com>,
> > > Artifex Maximus <artifexor at gmail.com> wrote:
> > > > I have tried 'failed' and 'h' extension. No luck. Extension 'failed'
> > > > does not know anything about ISDNCAUSE and 'h' extension is not called
> > > > at all. Any idea?
> > > I think you will find the 'h' extension is only called at the end of
> > > a successful call.
> > Extension 'h' is executed on every hangup event from both side.
> But your experience as described directly contradicts that assertion.
That's why I don't understand and asking here. :-)

> > > If the call is unsuccessful, the Dial command will return, and you can
> > > then check ${ISDNCAUSE} on the next line of your dialplan.
> > There is no dial command because I only wrote a call file to
> > /var/spool/asterisk/outgoing and actually dial has been made by
> > pbx_spool module. There is a 'failed' extension but no HANGUPCAUSE
> > there.
> That is why you are not executing the 'h' extension. You are placing
> the call directly to a channel. That channel does not start executing
> the dial plan until it is answered. In that respect, my original
> statement was correct. Because it only starts the dialplan when the
> call is successfully answered, there is no context in which to execute
> an 'h' extension on a failed call.
I see. Thanks for clarifying! In short there is no 'extra' extension
for 'hangup' like 'failed'.

> Channel: Local/123456789 at outgoing
> Context: mycontext
> Extension: s
> Priority: 1
Thank you! I will try this! Is local redirection have any
performance/resource hit on calls?

> [outgoing]
> exten => _X.,1,Dial(Zap/g1/${EXTEN})
I see. Therefore Dial is executed within my context and I have
extension 'h' for it. Tricky.

> exten => _X.,n,NoOp(${EXTEN}:DIALSTATUS=${DIALSTATUS};HANGUPCAUSE=${HANGUPCAUSE})
Do I really need this? Because extension 'h' is executed on hangup so
this is redundancy I think.

> exten => h,n,NoOp(${EXTEN}:DIALSTATUS=${DIALSTATUS};HANGUPCAUSE=${HANGUPCAUSE})
>
> In that case you should find the 'h' in [outgoing] gets executed on both successful
> and failed calls.
So I don't need NoOp for _X.. Right?

Many thanks for your informations!

Bye,
a



More information about the asterisk-users mailing list