Dynamic_features problems with asterisk

I have developed a small portion of dialplan code that allows participants of a conversation to dial a code that plays a playback (on both channels). In addition, this has to be recorded (the whole call and the voice-over played).

In the beginning, I was able to make it work. In a call from extension to extension, it works perfectly. The problem is when I make an outgoing call through a SIP trunk. I dial the code, the dialplan shows me a “Feature found”, but nothing happens.

In my extensions_custom.conf, I have the following:

exten => s,1,NooP(Ha pulsado *200 valor bridgepeer ${BRIDGEPEER})
same => n,Monitor(wav,/var/spool/asterisk/monitor/${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}PRUEBA${TIMESTAMP:0:8})
exten => s,n,Dial(Local/spy@macro-testing,30,G(testing-play^0^1))
exten => _spy,1,ChanSpy(SIP/${CALLERID(num)},BqS)

exten => 0,2(music),Playback(custom/Loc-testing)

In my features_applicationmap_custom.conf, I have the following line:

testing => *315,self/both,Macro,testing

I’ve also tried the following: testing => *315,self/callee,Macro,testing.

And, I have this too in extensions_custom.conf:

exten => n,Set(__DYNAMIC_FEATURES=testing)

I’ve tried to define __DYNAMIC_FEATURES in the globals_custom.conf file, but I get the same result (no playback).

In Asterisk SIP outbound dial options, I have marked “wW”.

I repeat that from extension to extension it works perfectly. With incoming calls, it also works. The problem is with outgoing calls.

It is running on Asterisk version 11.21.0. I’ve tried it in Asterisk 13 too with the same result.

I have developed too a new portion of dialplan code using CONFBRIDGE that allows the same, but now the problem is that it’s not working on incoming calls when agent is in a queue…

extensions_custom.conf, have the following:

exten => s,1,Noop(Quick Conference   ||||    Bridgepeer: ${BRIDGEPEER}     ||||)
same => n,ChannelRedirect(${BRIDGEPEER},pruebas,s,1)
same => n,Set(HORA=${EPOCH})
same => n,Set(CONFBRIDGE(user,template)=admin1)
same => n,Monitor(wav,/var/spool/asterisk/monitor/${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}PRUEBA${TIMESTAMP:0:8})
same => n,DumpChan()
same => n,ConfBridge(${HORA})
same => n,MacroExit()

exten => s,1,Macro(user-callerid)
same => n,Set(CONFBRIDGE(user,template)=default_user1)
same => n,Set(HORA=${EPOCH})
same => n,ConfBridge(${HORA})
same => n,MacroExit()

confbridge_custom.conf, I have the following:




Can anyone help me to deploy this feature?

I would suggest that calling DIal is well beyond the expected capabilities of the features mechanism.