ChannelRedirect causes the channel to hangup when using applicationmap

Pre requisite:
Asterisk 13.8.0
User-1 is registered using 2121212121.
User-2 is registered using 1120.

Scenario:

  1. User-1 calls User-2
  2. User-2 Answers the call
  3. User-2 presses *0
  4. User-1 is redirected to Conference room 1
  5. User-2 gets hanged up

Expected:
5. User-2 should be redirected to Conference room 1

Configurations:
File: extensions.conf

[default]
exten => _X!,1,Noop()
same => n,Set(__DYNAMIC_FEATURES=conf-start#conf-ok#conf-notok)
same => n,Dial(SIP/${EXTEN})
[dynamic-conf]
exten => s,1,Noop()
same => n,ConfBridge(1,default_bridge,default_user,sample_user_menu)
[macro-conf-start]
exten => s,1,Noop(Start Conference)
same => n,ChannelRedirect(${BRIDGEPEER},dynamic-conf,s,1)
same => n,ConfBridge(1,default_bridge,default_user,sample_user_menu)

File: features.conf

[applicationmap]
conf-start => *0,self,Macro,conf-start

Logs:

labaic71thin*CLI>
  == Using SIP RTP CoS mark 5
    -- Executing [1120@default:1] NoOp("SIP/2121212121-00000043", "") in new stack
    -- Executing [1120@default:2] Set("SIP/2121212121-00000043", "__DYNAMIC_FEATURES=conf-start") in new stack
    -- Executing [1120@default:3] Dial("SIP/2121212121-00000043", "SIP/1120") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/1120
    -- SIP/1120-00000044 is ringing
    -- SIP/1120-00000044 is ringing
    -- SIP/1120-00000044 is ringing
    -- SIP/1120-00000044 answered SIP/2121212121-00000043
    -- Channel SIP/1120-00000044 joined 'simple_bridge' basic-bridge <fe94b27e-51e1-45d8-a63f-17d9232f0870>
    -- Channel SIP/2121212121-00000043 joined 'simple_bridge' basic-bridge <fe94b27e-51e1-45d8-a63f-17d9232f0870>
       > 0x7fe8840158e0 -- Probation passed - setting RTP source address to 192.168.0.75:5065
       > 0x7fe888020f10 -- Probation passed - setting RTP source address to 192.168.0.169:5095
[May 20 23:42:10] DTMF[1965][C-00000020]: channel.c:4030 __ast_read: DTMF begin '*' received on SIP/1120-00000044
[May 20 23:42:10] DTMF[1965][C-00000020]: channel.c:4041 __ast_read: DTMF begin passthrough '*' on SIP/1120-00000044
[May 20 23:42:10] DTMF[1965][C-00000020]: channel.c:3944 __ast_read: DTMF end '*' received on SIP/1120-00000044, duration 100 ms
[May 20 23:42:10] DTMF[1965][C-00000020]: channel.c:3985 __ast_read: DTMF end accepted with begin '*' on SIP/1120-00000044
[May 20 23:42:10] DTMF[1965][C-00000020]: channel.c:4000 __ast_read: DTMF end '*' detected to have actual duration 77 on the wire, emulation will be triggered on SIP/1120-00000044
[May 20 23:42:10] DTMF[1965][C-00000020]: channel.c:4007 __ast_read: DTMF end '*' has duration 77 but want minimum 80, emulating on SIP/1120-00000044
[May 20 23:42:10] DTMF[1965][C-00000020]: channel.c:4064 __ast_read: DTMF end emulation of '*' queued on SIP/1120-00000044
[May 20 23:42:11] DTMF[1965][C-00000020]: channel.c:4030 __ast_read: DTMF begin '0' received on SIP/1120-00000044
[May 20 23:42:11] DTMF[1965][C-00000020]: channel.c:4041 __ast_read: DTMF begin passthrough '0' on SIP/1120-00000044
[May 20 23:42:11] DTMF[1965][C-00000020]: channel.c:3944 __ast_read: DTMF end '0' received on SIP/1120-00000044, duration 100 ms
[May 20 23:42:11] DTMF[1965][C-00000020]: channel.c:3985 __ast_read: DTMF end accepted with begin '0' on SIP/1120-00000044
[May 20 23:42:11] DTMF[1965][C-00000020]: channel.c:4000 __ast_read: DTMF end '0' detected to have actual duration 79 on the wire, emulation will be triggered on SIP/1120-00000044
[May 20 23:42:11] DTMF[1965][C-00000020]: channel.c:4007 __ast_read: DTMF end '0' has duration 79 but want minimum 80, emulating on SIP/1120-00000044
[May 20 23:42:11] DTMF[1965][C-00000020]: channel.c:4064 __ast_read: DTMF end emulation of '0' queued on SIP/1120-00000044
    -- Executing [s@macro-conf-start:1] NoOp("SIP/1120-00000044", "Start Conference") in new stack
    -- Executing [s@macro-conf-start:2] ChannelRedirect("SIP/1120-00000044", "SIP/2121212121-00000043,dynamic-conf,s,1") in new stack
    -- Channel SIP/2121212121-00000043 left 'simple_bridge' basic-bridge <fe94b27e-51e1-45d8-a63f-17d9232f0870>
    -- Executing [s@dynamic-conf:1] NoOp("SIP/2121212121-00000043", "") in new stack
    -- Executing [s@dynamic-conf:2] ConfBridge("SIP/2121212121-00000043", "1,default_bridge,default_user,sample_user_menu") in new stack
    -- Channel SIP/2121212121-00000043 joined 'softmix' base-bridge <2aa5b8a9-b496-4c54-9a81-0f96a2bb58ff>
    -- Executing [s@macro-conf-start:3] ConfBridge("SIP/1120-00000044", "1,default_bridge,default_user,sample_user_menu") in new stack
    -- Channel SIP/1120-00000044 left 'simple_bridge' basic-bridge <fe94b27e-51e1-45d8-a63f-17d9232f0870>	
labaic71thin*CLI> confbridge list 1
Channel                        Flags  User Profile     Bridge Profile   Menu             CallerID
============================== ====== ================ ================ ================ ================
SIP/2121212121-00000043               default_user     default_bridge   sample_user_menu 2121212121
labaic71thin*CLI> core show channels concise
SIP/2121212121-00000043!dynamic-conf!s!2!Up!ConfBridge!1,default_bridge,default_user,sample_user_menu!2121212121!!!3!82!2aa5b8a9-b496-4c54-9a81-0f96a2bb58ff!1463767922.135

Why is SIP/1120 getting hanged up?

Post your confbridge.conf file.

I would note that the use of macros and subroutines is unsupported in features.conf, even though it seems to work most of the time, and this also seems to be doing pbx state modifications on other channels in the same call, so I’m not too surprised that it doesn’t work.

File: confbridge.conf

[general]

[default_user]
type=user
music_on_hold_class=default 
quiet=yes   
announce_only_user=yes   
dtmf_passthrough=yes  

[default_bridge]
type=bridge
toggle_mute      

[sample_user_menu]
type=menu
*=playback_and_continue(conf-usermenu)
*1=toggle_mute
1=toggle_mute
*4=decrease_listening_volume
4=decrease_listening_volume
*6=increase_listening_volume
6=increase_listening_volume
*7=decrease_talking_volume
7=decrease_talking_volume
*8=leave_conference
8=leave_conference
*9=increase_talking_volume
9=increase_talking_volume

But features.conf says

; IMPORTANT NOTE: The applicationmap is not intended to be used for all Asterisk
;   applications. When applications are used in extensions.conf, they are executed
;   by the PBX core. In this case, these applications are executed outside of the
;   PBX core, so it does *not* make sense to use any application which has any
;   concept of dialplan flow. Examples of this would be things like Goto,
;   Background, WaitExten, and many more.  The exceptions to this are Gosub and
;   Macro routines which must complete for the call to continue.

The exceptions to this are Gosub and Macro routines which must complete for the call to continue.

If not Gosub or Macro then how can I achieve redirecting an user to conference bridge?