0

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.

4

2 回答 2

0

您不能从功能代码拨号或转移。频道已锁定功能。

您可以使用系统或 UserEvent 调用,通过外部应用程序捕获,在它从功能返回后传输(在 0.5 秒内)。

您的其中一个上下文也没有优先级 1。

于 2018-06-09T08:55:40.493 回答
0

我开发了一个新的拨号方案代码部分,使用CONFBRIDGE它允许相同,但现在的问题是,当代理在队列中时,它不能处理来电......

extensions_custom.conf,具有以下内容:

[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,我有以下内容:

[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
于 2018-06-11T11:38:33.813 回答