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:
[macro-testing]
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)
[testing-play]
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.
Can anyone help me? Thanks in advance.