我想在接听电话后立即挂断电话。
exten => _3XXXXXXXXXX,1,Set(CALLERID(num)=1234567890)
same => n,MixMonitor(${UNIQUEID}.wav)
same => n,Dial(SIP/${EXTEN:1}@provider,,M(hang))
same => n,StopMixMonitor()
same => n,Hangup()
[macro-hang]
exten => s,1,Hangup()
有什么主意吗?我已经尝试过一个宏,但是它不起作用。
答案 0 :(得分:1)
来自星号文档
M(macro[^arg[^...]]):
macro - Name of the macro that should be executed.
arg - Macro arguments
Execute the specified <macro> for the *called* channel before connecting to the
calling channel. Arguments can be specified to the Macro using '^' as a
delimiter. The macro can set the variable ${MACRO_RESULT} to specify the
following actions after the macro is finished executing:
${MACRO_RESULT}: If set, this action will be taken after the macro
finished executing.
ABORT: Hangup both legs of the call
CONGESTION: Behave as if line congestion was encountered
BUSY: Behave as if a busy signal was encountered
CONTINUE: Hangup the called party and allow the calling party to
continue dialplan execution at the next priority
GOTO:[[<context>^]<exten>^]<priority>: Transfer the call to the
specified destination.
ABORT和CONTINUE都应该做您想做的事。
答案 1 :(得分:0)
使用转盘的L选项。这样您可以调整通话时间。来自https://www.voip-info.org/asterisk-cmd-dial: L(x [:y] [:z]):将通话限制为“ x”毫秒,当剩下“ y”毫秒时发出警告,每“ z”毫秒重复一次)。 注意:如果要向SIP提供程序进行呼叫,则它们将舍入处理时间(如果设置L(1),即使设置为1 ms,也将计为1秒)。此外,他们很可能会因wangiri欺诈而暂停您的帐户。