[asterisk-dev] ${DIALSTATUS} = NULL - is that OK?

Steve Murphy murf at digium.com
Mon Jun 9 13:08:11 CDT 2008


On Mon, 2008-06-09 at 12:41 -0400, Peter Beckman wrote:
> On Mon, 9 Jun 2008, Russell Bryant wrote:
> 
> > Andrew Kohlsmith (lists) wrote:
> >> On June 9, 2008 06:34:29 am Chris Maciejewski wrote:
> >>> Is behaviour described above normal? The reason I am asking is because
> >>> my dialplan logic depends on ${DIALSTATUS} variable and currently I
> >>> use "GotoIf($[${ISNULL(${DIALSTATUS})} = 1]?label1:label2)" which
> >>> works fine for now, but may break if Dial will return some status in
> >>> the future.
> >>
> >> Personally I would like to see Dial set the variable to INPROGRESS as soon as
> >> it runs.  I use DIALSTATUS=NULL to see if I dialed at all.  :-)
> >
> > That would be a reasonable enhancement to make.
> >
> > In response to the original question.  I think that if there is any code
> > path which allows Dial() to exist without setting a DIALSTATUS, then
> > that is a bug.
> 
>   Somewhat related is ANSWEREDTIME when passed to a Macro.  ANSWEREDTIME is
>   0 or NULL when a macro is used, even if the call _IS_ answered and
>   DIALSTATUS is ANSWERED.  Annoying.

Hmmm. Interesting. If you are using a macro call that executes on the
other
(peer) channel, then, yes, the ANSWEREDTIME var is set only on the
originating channel, and you won't find it on the 'peer' (callee)
channel.
This would happen if you used the M() arg in 1.4, and the M() or U()
args in trunk/1.6.0.

If you want such variables/values put on both caller and callee
channels, then
you should file a bug on bugs.digium.com. I don't think this would be 
a horrible idea. As to whether we could consider this a bug or an
enhancement,
that is another issue. At the worst, this would only be available on
trunk.
In such cases, we would copy these to the callee channel just before
calling
the macro/gosub, and only if the M() or U() options are used. What might
be
useful, is to find out all the other vars that might be handy to copy
at that time.

murf


-- 
Steve Murphy
Software Developer
Digium
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3227 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20080609/ac246828/attachment.bin 


More information about the asterisk-dev mailing list