我想在回答后挂断电话。
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()
有什么想法吗?我尝试了一个宏,但它不起作用。
来自星号doc
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.
流产和继续都应该做您想做的事。
使用Dial的L选项。这样,您可以调整呼叫的长度。来自https://www.voip-info.org/asterisk-cmd-dial:l(x [:y] [:z](:将呼叫限制为" x" MS,警告" Y" MS时,重复每个" Z" MS(。注意:如果您将通话打给SIP提供商,他们将汇总UP时间(如果您设置L(1(,即使它是1 ms,它也会算作1秒(。此外,他们很可能会因wangiri欺诈而暂停您的帐户。