0
votes

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.

2

2 Answers

0
votes

You can't dial or transfer from features codes. Channel is locked for features.

You can use system or UserEvent call, catch by external app, transfer AFTER it return from features(in 0.5 sec).

Also one of your contexts have no priority 1.

0
votes

I have developed 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:

[macro-testing]
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()

[pruebas]
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:

[default_bridge]
type=bridge
sound_join=t
sound_leave=t
sound_kicked=t
language=es


[default_user1]
announcement=tt-monkeys
type=user
announce_only_user=no
dtmf_passthrough=yes


[admin1]
announcement=tt-monkeys
type=user
dtmf_passthrough=no
admin=yes
announce_only_user=no