Summary:ASTERISK-21245: Application Dial - Option g ignored with option A if the called part hangs up during the announce.
Reporter:Emeric NIQUET (FrameIP)Labels:
Date Opened:2013-03-14 04:57:05Date Closed:
Versions: 13.18.4 Frequency of
Environment:Debian 6.0.5 Debian SqueezeAttachments:
Description:Hi all,

I need to expand the "g" option with the A option in the Dial App.

In production, I need to offer for the called party the choice to refuse the call. That's why I add the "g" option to conserve the call in the dialplan after the called party hangs up.

But I need also to play a sound in the called party before connect the two channels together, and the call terminates if the called party hangs up during the sound file, without continue in the dialplan, as expected with the "g" option.

exten => _5685,1,NoOp(*** EXTEN TEST DIAL ***)
same => n,Set(Announce=vm-forwardoptions)
same => n,Dial(SIP/9504,,A(${Announce})g)
same => n,NoOp(*** Action Option g ***)
same => n,HangUp()

If I test with the "beep" sound, that works, certainly because the sound is short.

If I let playing the file, then called party hangs up :

   -- Executing [5685@Externe:1] NoOp("SIP/Patton1-00000c2a", "*** EXTEN TEST DIAL ***") in new stack
   -- Executing [5685@Externe:2] Set("SIP/Patton1-00000c2a", "Announce=vm-forwardoptions") in new stack
   -- Executing [5685@Externe:3] Dial("SIP/Patton1-00000c2a", "SIP/9504,,A(vm-forwardoptions)g") in new stack
 == Using SIP RTP CoS mark 5
   -- Called SIP/9504
   -- SIP/9504-00000c2b is ringing
   -- SIP/9504-00000c2b answered SIP/Patton1-00000c2a
   -- <SIP/9504-00000c2b> Playing 'vm-forwardoptions.alaw' (language 'fr')
   -- Locally bridging SIP/Patton1-00000c2a and SIP/9504-00000c2b
   -- Executing [5685@Externe:4] NoOp("SIP/Patton1-00000c2a", "*** Action Option g ***") in new stack
   -- Executing [5685@Externe:5] Hangup("SIP/Patton1-00000c2a", "") in new stack
 == Spawn extension (Externe, 5685, 5) exited non-zero on 'SIP/Patton1-00000c2a'

If the called party hangs up before the end of the sound file :

 == Using SIP RTP CoS mark 5
   -- Executing [5685@Externe:1] NoOp("SIP/Patton1-00000c45", "*** EXTEN TEST DIAL ***") in new stack
   -- Executing [5685@Externe:2] Set("SIP/Patton1-00000c45", "Announce=vm-forwardoptions") in new stack
   -- Executing [5685@Externe:3] Dial("SIP/Patton1-00000c45", "SIP/9504,,A(vm-forwardoptions)g") in new stack
 == Using SIP RTP CoS mark 5
   -- Called SIP/9504
   -- SIP/9504-00000c46 is ringing
   -- SIP/9504-00000c46 answered SIP/Patton1-00000c45
   -- <SIP/9504-00000c46> Playing 'vm-forwardoptions.alaw' (language 'fr')
 == Spawn extension (Externe, 5685, 3) exited non-zero on 'SIP/Patton1-00000c45'

Thanks a lot for your feedbacks.

Regards, Emeric.
Comments:By: Matt Jordan (mjordan) 2013-03-14 08:35:30.434-0500

Features requests are no longer submitted to or accepted through the issue tracker. Features requests are openly discussed on the mailing lists [1] and Asterisk IRC channels and made note of by Bug Marshals.

[1] http://www.asterisk.org/support/mailing-lists

By: Emeric NIQUET (FrameIP) 2013-03-14 12:10:27.035-0500

Hi Matt,

It wasn't a feature request, but a bug with A and g options. The two options works perfectly as the are used separately.

Can you confirm me that my request concerns the "asterisk-dev" list ?

Thanks a lot for your answer.

Kind regards, Emeric.

By: Matt Jordan (mjordan) 2013-03-14 12:47:49.678-0500

Sorry, you had the issue type as "Improvement" and a casual read through implied that it was a feature request.

Yes, I would think that the 'g' flag would always be honored, regardless of when the callee hangs up.