[asterisk-bugs] [Asterisk 0015796]: The order of the execution inside the Dial app is wrong

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Aug 31 08:43:59 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15796 
====================================================================== 
Reported By:                falves11
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15796
Category:                   Applications/app_dial
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.1 
SVN Revision (number only!): 214821 
Request Review:              
====================================================================== 
Date Submitted:             2009-08-30 22:44 CDT
Last Modified:              2009-08-31 08:43 CDT
====================================================================== 
Summary:                    The order of the execution inside the Dial app is
wrong
Description: 
As you can see in my dialplan, I have D(w${EXTEN}) and M(voicedetection)
No matter in what order I include these parameters, the macro executes
first. It makes sense that the D() part executes first,because I need to
use a macro to do human voice detection, but I am dialing with D() in a
second stage, so unless I dial first I cannot do voice detection. I tried
doing SendDTMF inside the macro, but the digits are heard in the calling
side, when I need them to got to the called side.
In general, the order of execution of D() and M() should be given by the
order in which we write them in the dial string. This bug may affect all
versions.

dialplan show inbound                                                     
                                                                           
                             
[ Context 'inbound' created by 'pbx_config' ]
  '_X.' =>          1. Set(CALLERPRES()=allowed)                 
[pbx_config]                                                               
                                                 
                    2. Set(GROUP()=trunkgroup1)                  
[pbx_config]
                    3. Verbose(0,ACTIVE CALLS ${GROUP_COUNT(trunkgroup1)}
${EXTEN}-ANI->${CALLERID(num)} IP:->${CHANNEL(recvip)}) [pbx_config]
                    4. Set(CALLERID(all)=${CALLERID(num)})       
[pbx_config]
                    5.
Dial(Sip/XXXX at XX.XX.XX.XX,25,L(1800000)D(w011${EXTEN}#)M(voicedetection)) 

[ Context 'macro-voicedetection' created by 'pbx_config' ]
  's' =>            1. NoCDR()                                   
[pbx_config]
                    2. Set(MACHINE=0)                            
[pbx_config]
                    3. verbose(0,Begin Answer)                   
[pbx_config]
                    4. WaitForSilence(500,20)                    
[pbx_config]
                    5. Verbose(0,WAITSTATUS 1 ${WAITSTATUS})     
[pbx_config]
                    6. GotoIf($[${WAITSTATUS}=SILENCE]?SILENCE:TIMEOUT)
[pbx_config]
     [TIMEOUT]      7. Verbose(0,DETECTED TIMEOUT)               
[pbx_config]
     [SILENCE]      8. Verbose(0,DETECTED NOISE)                 
[pbx_config]


====================================================================== 

---------------------------------------------------------------------- 
 (0109836) lmadsen (administrator) - 2009-08-31 08:43
 https://issues.asterisk.org/view.php?id=15796#c109836 
---------------------------------------------------------------------- 
I don't necessarily agree this is a bug, but rather a feature request. The
reason for that is that M() is executed prior to bridging, and I would
image D() is executed after bridging (since that would be sending DTMF to
the called party).

The M() specifically says it executes prior to bridging the calls. The
order of flags in Dial() has never mattered. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-31 08:43 lmadsen        Note Added: 0109836                          
======================================================================




More information about the asterisk-bugs mailing list